-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project-local toolchain selection #103
Comments
Project-local swift version specification was only left out for simplicity's sake because we weren't sure if it was that important to users--I think it's a totally valid feature. If it's critical to your adoption of swiftly, then I imagine there's others in the same situation, so I would be in favor of introducing it. And design/implementation is more than welcome if you'd like to contribute that, thanks in advance! A few design notes/questions:
What do you think @adam-fowler? |
Thanks for your consideration @patrickfreed!
I think we can follow the way macOS does for /usr/bin binaries. Some of /usr/bin binaries including $ for bin in /usr/bin/*; do if otool -L $bin | grep libxcselect.dylib &> /dev/null; then echo $bin; fi; done List of shims
We can choose those executables that is included in both Swift toolchain package and /usr/bin shims.
Yeah, will have detailed design later.
I think we should support .swift-version for migration path from swiftenv. And also for future possibility of custom toolchain support and Swift SDK installation support, it would be nice to have more structural configuration format like rust-toolchain.toml. |
That is a large number of shims, and I think maintaining that list would be pretty difficult (e.g. if Swift removes or adds a new executable to their toolchains, we'll be out of date and users will need to update swiftly itself). To work around that, it might be best to just shim
If we wanted to be even more minimal, we could probably just do |
That's pretty much how it works on macOS. swift, lldb and sourcekit-lsp are in /usr/bin and everything else is in the toolchain normally inside the Xcode.app folder. Although I'm not sure where it gets the version of clang or ld from as there are versions of this in /usr/bin. |
#150 might address this. |
One of the current missing pieces compared with swiftenv is "project-local" Swift version.
@patrickfreed said #52 (comment):
In our case, this feature is the main blocker to migrating from swiftenv to swiftly, so it's critical at least for us.
I'm happy to design and implement it but I'd like to hear if this feature could be accepted before starting detailed design.
This feature would depend on an architectural change: #52
The text was updated successfully, but these errors were encountered: