Skip to content

Add ability to temporarily unlink swiftly #315

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

Merged
merged 12 commits into from
Apr 30, 2025

Conversation

plemarquand
Copy link
Contributor

Adds two new commands, swiftly unlink and swiftly link, which will disable and reenable swiftly's management of the active toolchain.

The unlink command removes the symlinks to toolchain binaries in the swiftly bin directory that is in the user's path. This allows the rest of the $PATH to be searched for available toolchain installations, falling back to the system default. On macOS with Xcode installed this has the effect of falling back to the toolchain in the user's installed Xcode.

The link command reinstates the symlinks to the inUse toolchain, which allows swiftly to resume management of the active toolchain.

@plemarquand plemarquand force-pushed the unlink-link branch 2 times, most recently from e8cfcee to bfac041 Compare April 17, 2025 20:44
@plemarquand plemarquand force-pushed the unlink-link branch 2 times, most recently from f131884 to ac4b473 Compare April 22, 2025 17:46
@plemarquand plemarquand marked this pull request as ready for review April 22, 2025 18:20
@plemarquand plemarquand force-pushed the unlink-link branch 2 times, most recently from 3555391 to e076b0f Compare April 28, 2025 01:39
Copy link
Member

@cmcgee1024 cmcgee1024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks good. There's just the merge conflicts (another PR to provide gentle update messages).

Adds two new commands, `swiftly unlink` and `swiftly link`, which
will disable and reenable swiftly's management of the active toolchain.

The `unlink` command removes the symlinks to toolchain binaries in the
swiftly bin directory that is in the user's path. This allows the rest
of the `$PATH` to be searched for available toolchain installations,
falling back to the system default. On macOS with Xcode installed this
has the effect of falling back to the toolchain in the user's installed
Xcode.

The `link` command reinstates the symlinks to the `inUse` toolchain,
which allows swiftly to resume management of the active toolchain.
@cmcgee1024
Copy link
Member

@swift-ci test macOS

@cmcgee1024 cmcgee1024 merged commit d15d77a into swiftlang:main Apr 30, 2025
23 checks passed
@plemarquand plemarquand deleted the unlink-link branch April 30, 2025 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants