# \[GSoC 2025\] Swiftly Integration in VS Code

**URL:** <https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285>\
**Category:** GSoC\
**Tags:** swiftly, gsoc-2025\
**Created:** [March 5, 2025, 5:57am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285 "2025-03-05T05:57:16Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 5, 2025, 5:57am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/1 "2025-03-05T05:57:16Z")

</div>

Hello 👋🏻

I am a software engineer who has worked for the last three years. I am on a career break and considering applying for GSOC 2025 with Swift. I am a beginner to open-source and getting familiar with the vscode-swift codebase.

I'm interested in working on **Swiftly Integration in VS Code.**

I have experience working with TypeScript in a professional setting and Swift, mainly as a hobby for developing iOS applications.

I have reviewed the project description and set up a local development environment for vscode-swift and learning more about the code base and working on a pull request to familiarize myself with the process.

Looking forward to your input!

Thanks,  
Priya

---

<div class="post-metadata">

**Author:** ![czjeep](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/czjeep/32/39825_2.png) [@czjeep](https://forums.swift.org/u/czjeep)\
**Post date:** [March 5, 2025, 7:21am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/2 "2025-03-05T07:21:10Z")

</div>

Hello, swift works better with Xcode. If you use vscode it's complicated to compile and run, and I don't know if it will work.

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 5, 2025, 8:41am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/3 "2025-03-05T08:41:49Z")

</div>

I’m aware of Swift in XCode, but this issue is about Swift Extension for VS Code, in which you can use Swift to program for iOS/macOS agnostic programs such as cli tools and servers

---

<div class="post-metadata">

**Author:** ![ktoso](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ktoso/32/44526_2.png) [@ktoso](https://forums.swift.org/u/ktoso)\
**Post date:** [March 5, 2025, 9:16am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/4 "2025-03-05T09:16:59Z")

</div>

Hello and welcome @roulpriya !

Great to see your interest int the project, if you have any specific questions you about the project -- remember that this phase of GSoC is all about preparing a good proposal writeup, including a timeline proposal for the work etc -- please don't hesitate to ask here.

The mentors for this project are @cmcgee1024 and @matthewbastien 🙂

---

<div class="post-metadata">

**Author:** ![0xTim](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/0xtim/32/27968_2.png) [@0xTim](https://forums.swift.org/u/0xTim)\
**Post date:** [March 5, 2025, 10:47am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/5 "2025-03-05T10:47:12Z")

</div>

> [@czjeep](#):
>
> Hello, swift works better with Xcode. If you use vscode it's complicated to compile and run, and I don't know if it will work.

This is complete rubbish - Swift works well in VSCode and is easy to compile and run Swift packages

---

<div class="post-metadata">

**Author:** ![czjeep](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/czjeep/32/39825_2.png) [@czjeep](https://forums.swift.org/u/czjeep)\
**Post date:** [March 6, 2025, 2:15am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/6 "2025-03-06T02:15:20Z")

</div>

Hello, instead of attacking me, could you explain how to configure vscode to use swift for server-side or app development, so it makes more sense

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 6, 2025, 8:57am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/7 "2025-03-06T08:57:37Z")

</div>

Thank you, @ktoso.

I am currently addressing two issues to become more familiar with the codebase.

> <https://github.com/swiftlang/vscode-swift/issues/1170>
>
> To get Dependabot back on we had to disable major updates of the various chai de…pendencies: https://github.com/swiftlang/vscode-swift/pull/1168
> 
> We should migrate to the next major versions. Should discuss if we would like to remove the Dependabot rule or if we believe we always suspect a major update would cause this issue.

> <https://github.com/swiftlang/vscode-swift/issues/1173>
>
> To get Dependabot back on we had to disable major updates of vsce: https://githu…b.com/swiftlang/vscode-swift/pull/1172
> 
> We should migrate to the next major version Node.js that VSCode now ships with at the same time we migrate to vsce 3 which depends on the Node 20 engine. Should discuss if we would like to remove the Dependabot rule or if we believe we always suspect a major update would cause this issue.

I will post any questions regarding the proposal here.

Thanks!

---

<div class="post-metadata">

**Author:** ![ptoffy](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ptoffy/32/44481_2.png) [@ptoffy](https://forums.swift.org/u/ptoffy)\
**Post date:** [March 6, 2025, 9:29am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/8 "2025-03-06T09:29:06Z")

</div>

There's an extensive tutorial on the Swift website

> **[Swift.org](https://www.swift.org/documentation/articles/getting-started-with-vscode-swift.html)**
>
> Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 10, 2025, 3:09pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/9 "2025-03-10T15:09:40Z")

</div>

While I was doing some research, I had a few questions:

1. We require macOS prebuilds to facilitate the automatic installation of Swiftly by the extension. However, as of today, I can only see builds for Linux under Github releases. Do we need to establish some CI infrastructure for MacOS?
2. Currently, Swiftly outputs data as strings, but to effectively display version information in VS Code, we should modify it to provide structured JSON output.
3. I’m reviewing other VS Code extensions that provide toolchain switching functionality, like vscode-python and vscode-go. For example, we can make some UX changes by displaying the current Swift version in the VS Code status bar.

@cmcgee1024 @matthewbastien Would love your input on this as well.

---

<div class="post-metadata">

**Author:** ![matthewbastien](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/matthewbastien/32/35842_2.png) [@matthewbastien](https://forums.swift.org/u/matthewbastien)\
**Post date:** [March 10, 2025, 8:19pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/10 "2025-03-10T20:19:08Z")

</div>

Thank you for the interest in this project and these are great questions! I'll try my best to answer them here, but I really like the direction you're going with this so far.

> 1. We require macOS prebuilds to facilitate the automatic installation of Swiftly by the extension. However, as of today, I can only see builds for Linux under Github releases. Do we need to establish some CI infrastructure for MacOS?

I'll let @cmcgee1024 answer this in more detail, but I believe there was some design work that needed to be done for Swiftly on macOS to avoid conflicting with Xcode installations.

> 1. Currently, Swiftly outputs data as strings, but to effectively display version information in VS Code, we should modify it to provide structured JSON output.

Fully agree with this. Swiftly needs to provide some machine readable output here and JSON is easy to parse in JavaScript land already. Can be enabled with a new flag called `--format=json` or something along those lines. Would be good to see how other tools such as SwiftPM allow changing the output format just so we're using similar command line options.

> 1. I’m reviewing other VS Code extensions that provide toolchain switching functionality, like vscode-python and vscode-go. For example, we can make some UX changes by displaying the current Swift version in the VS Code status bar.

I absolutely love this idea. Being able to see exactly which Swift version you have running and having a quick way to change it is a fantastic user experience. I'll only add that status bar real estate can be a precious resource when you have many extensions installed. So, we may want to limit this to only show when editing a Swift file. Something to think about to make sure we're not going to be trampling over other extensions, anyway.

---

<div class="post-metadata">

**Author:** ![cmcgee1024](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cmcgee1024/32/40419_2.png) [@cmcgee1024](https://forums.swift.org/u/cmcgee1024)\
**Post date:** [March 10, 2025, 9:07pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/11 "2025-03-10T21:07:56Z")

</div>

> 1. We require macOS prebuilds to facilitate the automatic installation of Swiftly by the extension. However, as of today, I can only see builds for Linux under Github releases. Do we need to establish some CI infrastructure for MacOS?

Note that swiftly is currently undergoing some major changes in preparation for a 1.0 release. This new release has the macOS support. It also has the functions that will be needed for this project, such as listing the available toolchains.

Until the release is finalized you can build your own release-like packages at desk by first installing a 6.x swift toolchain, cloning the swiftly code at either `main` or `release/1.0` branches, and then running the following command:

```swift
swift run build-swiftly-release --skip 0.9.9

```

Running this on macOS will produce the macOS package, on Linux x86\_64, it will be for that OS and architecture, etc.

When the release is finalized, you won't find the packages in the releases tab of GitHub. Instead, it will be offered from [swift.org](http://swift.org).

> Would be good to see how other tools such as SwiftPM allow changing the output format just so we're using similar command line options.

SwiftPM controls output formats for subcommands like `swift package show-dependencies` wth a `--format` option:

```swift
OVERVIEW: Print the resolved dependency graph

USAGE: swift package show-dependencies [--format <format>] [--output-path <output-path>]

OPTIONS:
  --format <format> text | dot | json | flatlist (default: text)

```

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 12, 2025, 6:50pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/12 "2025-03-12T18:50:51Z")

</div>

> [@matthewbastien](#):
>
> So, we may want to limit this to only show when editing a Swift file. Something to think about to make sure we're not going to be trampling over other extensions, anyway.

I agree with this idea. We can have a condition on activation events like below. This is a convention followed by other language extensions as well.

```swift
"activationEvents": [
    "onLanguage:swift"
]

```

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 17, 2025, 9:28am UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/13 "2025-03-17T09:28:59Z")

</div>

I have one more question @matthewbastien @cmcgee1024

When installing Swiftly from extension, should we install globally or in an extension managed directory?

---

<div class="post-metadata">

**Author:** ![matthewbastien](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/matthewbastien/32/35842_2.png) [@matthewbastien](https://forums.swift.org/u/matthewbastien)\
**Post date:** [March 17, 2025, 7:35pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/14 "2025-03-17T19:35:17Z")

</div>

I would expect that it'd be installed globally. Or really, it should just invoke the Swiftly install script and forward any prompts from that to the user. Would need some changes to Swiftly in order to forward the prompts (e.g. something like `GIT_ASKPASS` that's used by the git extension).

@cmcgee1024 what do you think?

---

<div class="post-metadata">

**Author:** ![cmcgee1024](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cmcgee1024/32/40419_2.png) [@cmcgee1024](https://forums.swift.org/u/cmcgee1024)\
**Post date:** [March 17, 2025, 7:42pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/15 "2025-03-17T19:42:08Z")

</div>

I agree with @matthewbastien that installing it into the user's account would probably be best.

In terms of doing headless installs of swiftly there is some documentation on the topic. Here's guide for installing swiftly in an automated/CI system that might work for this context.

[https://swiftpackageindex.com/swiftlang/swiftly/main/documentation/swiftlydocs/automated-install](https://swiftpackageindex.com/swiftlang/swiftly/main/documentation/swiftlydocs/automated-install)

The full command-line reference for the `swift init` installer is here:

[https://swiftpackageindex.com/swiftlang/swiftly/main/documentation/swiftlydocs/swiftly-cli-reference#init](https://swiftpackageindex.com/swiftlang/swiftly/main/documentation/swiftlydocs/swiftly-cli-reference#init)

I think that refreshing any existing VSCode shells to get the environment variables, and managing the post-installation steps on Linux will be interesting. There is an option for a post-install file that could be used after the installation to show the user what they need to "apt-get" or "yum" install on their system.

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 18, 2025, 6:26pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/16 "2025-03-18T18:26:47Z")

</div>

Thanks for the directions, I am currently drafting the proposal. I will share it once it's ready with all the information.

---

<div class="post-metadata">

**Author:** ![cmcgee1024](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cmcgee1024/32/40419_2.png) [@cmcgee1024](https://forums.swift.org/u/cmcgee1024)\
**Post date:** [March 19, 2025, 4:22pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/17 "2025-03-19T16:22:57Z")

</div>

@roulpriya I'm not sure if this issue could be helpful from the swiftly side. It could be a good way of communicating progress in a structured way for the VSCode UI when installing swiftly, or using swiftly to install a toolchain: [Add a progress-file option to swiftly install and swiftly init · Issue #254 · swiftlang/swiftly · GitHub](https://github.com/swiftlang/swiftly/issues/254)

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 22, 2025, 1:13pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/18 "2025-03-22T13:13:35Z")

</div>

Hi @matthewbastien @cmcgee1024

I have completed my first draft for Swiftly Integration in VS Code, here is the link: [GSOC2025- Swiftly Integration in VS Code - Google Docs](https://docs.google.com/document/d/1GD8KplfPHJzS1CHE2UatCDEChp4UO0Li-g5YEIiphnI/edit?usp=sharing)

Please review and share your suggestions/feedback.

---

<div class="post-metadata">

**Author:** ![cmcgee1024](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/cmcgee1024/32/40419_2.png) [@cmcgee1024](https://forums.swift.org/u/cmcgee1024)\
**Post date:** [March 26, 2025, 1:19pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/19 "2025-03-26T13:19:02Z")

</div>

@roulpriya how best to provide feedback on the document? Overall, it looks good to me, just looking for a method to add a few comments.

---

<div class="post-metadata">

**Author:** ![roulpriya](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/roulpriya/32/39843_2.png) [@roulpriya](https://forums.swift.org/u/roulpriya)\
**Post date:** [March 26, 2025, 3:47pm UTC](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285/20 "2025-03-26T15:47:05Z")

</div>

@cmcgee1024 Can you please request an editor/suggesting access? I will provide you the access to this doc.

[Next page](https://forums.swift.org/t/gsoc-2025-swiftly-integration-in-vs-code/78285.md?page=2)
