Enable installing Swiftly via Select Toolchain command#2121
Open
vanshkamra12 wants to merge 1 commit into
Open
Enable installing Swiftly via Select Toolchain command#2121vanshkamra12 wants to merge 1 commit into
vanshkamra12 wants to merge 1 commit into
Conversation
- Add installSwiftly() function to show confirmation dialog and install Swiftly - Export installSwiftlyWithProgress and promptToRestartVSCode functions - Show 'Install Swiftly for toolchain management' action when Swiftly not installed - Add comprehensive test coverage for all user flows Fixes swiftlang#2065
Author
|
@adam-fowler @0xTim @award999 please review this...!! |
Contributor
|
@matthewbastien would be the best reviewer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2065
-> Problem
Previously, when users ran the "Swift: Select Toolchain" command and Swiftly was not installed, they were only directed to the Swift.org website with a link. This required leaving VS Code, manually installing Swiftly via terminal commands, and then restarting VS Code.
-> Solution
This PR adds a new "Install Swiftly for toolchain management..." action that appears in the Select Toolchain quick pick when:
Swiftly is not installed
The platform is macOS or Linux (where Swiftly is supported)
When the user selects this action:
A confirmation dialog appears explaining what will happen
User can choose:
Continue - Proceeds with installation
Open Swiftly Documentation - Opens the Swiftly docs for manual installation
Cancel - Dismisses the dialog
If user continues, Swiftly installs with a progress notification
After successful installation, user is prompted to restart VS Code
Added comprehensive test suite "Install Swiftly action" with 5 test cases:
Shows action when Swiftly not installed
Hides action when Swiftly is installed
Installs Swiftly when user confirms
Does not install when user cancels
Opens documentation when user selects doc link
-> Testing
All existing tests pass, plus 5 new unit tests covering: