Anyone else having Swift 6.1 problems on Linux (VS Code, Arch, swiftly)?

I've noticed a few problems effecting my projects:

  • background indexing barely works
  • the .swift-version file not doing anything
  • unit tests crashing if a #require throws an error with a custom comment
  • excessive recompilation of the project and dependencies

I have to go back to 6.0.3 and uninstall 6.1 to get Swift usable.

My setup:

  • Arch Linux: 6.13.8-arch1-1
  • Swiftly: 1.0.0
  • VS Code: 1.98.2
  • Swift: 6.1, 6.0.3

That's weird, because I've noticed that Swift 6.1 works better for me on Ubuntu 24.04 and AlmaLinux 9 (RHEL 9) than 6.0.3 did. I'll have to check the #require thing tho since I've never used it...

1 Like
  • the .swift-version file not doing anything

Can you elaborate more on this part? Do swiftly use and swift --version report 6.1 when the .swift-version file is set to 6.1.0?

After doing more research (on the swiftly's readme) it turns out you need to manually remove previous swiftly data on the file system when upgrading to 1.0.0, which I did not do as I use the AUR (and Arch isn't officially supported). Swiftly and toolchain hot switching (and the .swift-version file) now works as expected, but the VS Code Extension no longer works (more specifically the sourcekit-lsp and CodeLLDB). Looks like I need to try other versions of Swiftly instead of ubuntu24.04, or do some tinkering.