Swift needs serious cleanâup, potentially a full rewrite, and solving the mysterious Hydra build issues. There are a couple of people who have expressed interest in doing so for 25.05 in the Nix on macOS Matrix room and Iâd like to assist such efforts, which should be easier now that Randyâs macOS SDK rework is in.
The plan would ideally be to update to 5.10, the last version that can be bootstrapped without an existing Swift compiler, and then use that to build Swift 6. If youâre interested in helping out then come say hi on Matrix!
Knowing things about the Swift build system would be a big help! Experience with Nix packaging would also of course be necessary, and weâd want to make modifications to the existing LLVM package infrastructure to accommodate Swiftâs fork. However we already have lots of people with extensive experience with Nixpkgs and LLVM and relatively few with interest and knowledge of the Swift compiler and its build system and bootstrap process, so thatâs the skill that would help the effort most on the margin.
Another way one could help is by having a body of Swift code that can be tested with the packaged compiler. If Swift support is going to be reworked, itâs an opportunity to improve things for Swift users.
Iâve started work on cleaning up Swift, so I can update it to Swift 6.1. I am targeting it for 25.11, though I expect it to land sooner rather than later.
Thanks for that PR! It helped me find an issue with my changes. When Swift imports a module, it sometimes needs help with headers because it bypasses the Clang wrapper.
Anyway, this is ab example of mas after the update. fetchSwiftPMDdeps is new. Itâs similar to fetchCargoVendor. The hook functionality of swiftpm has been split into a separate hook.
My current status is I have Swift 5.10.1 building, which is needed to bootstrap Swift 6.1. Iâm currently doing some testing and working on updating the rest of the packages in swiftPackages.
Status update: I have swiftPackages_5 building with all the tools. Swift provides swift-driver. Nothing is wrapped. I have run into a few complications with Swift 6.1.
Swift 6.1 has started using C++ in bridging headers, which goes through its ClangImporter library instead of using the wrapped clang binary.
Swift 6.1 requires compiler-rt features that only became available upstream in LLVM 20. While Swift builds its own LLVM, it uses the default compiler-rt.
I spent the last few days working on a patch to Swift to make it read libcxx-cxxflags from the clang wrapper. It works and can build Swift 5.10.1 with C++ interop. I expect Swift 6.1 should also work with the patch, but I need to update the default version of LLVM to LLVM 20 (which was planned for 25.11 anyway).