-
Notifications
You must be signed in to change notification settings - Fork 28
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
Streamline the swiftly init process #177
Draft
cmcgee1024
wants to merge
42
commits into
swiftlang:main
Choose a base branch
from
cmcgee1024:streamlined_init
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
Member
cmcgee1024
commented
Oct 20, 2024
•
edited
Loading
edited
Add a design proposal for the new swiftly proxy system
…ocation clarify the boundaries of the swiftly toolchain abstraction and elaborate on how to work around them
…new swiftly run command
Change the nature of the swiftly symlinks so that they point to the swiftly executable at install time. These do not change when new toolchains are used. Toolchain selection happens each time when the proxies are run. The proxies are created for a well-known set of toolchain binaries that are constant for a wide variety of toolchain versions and platforms. Add support for .swift-version files for toolchain selection. Update the use command so that it can point out which toolchain is in use based on context, such as swift version files that are located in the current working directory or above. The fallback selection comes from the global default configuration's 'inUse' setting. When querying for what's in use the global default is shown with the "(default)" tag. If the in-use toolchain is selected by a swift-version file the path to that file is displayed. Provide a print location flag to the use subcommand that can print the file path of the toolchain that is in use in the current context. When using a new toolchain, depending on whether a swift version is selecting the current one, update the swift version file with the selected toolchain version. If no swift version file can be located, attempt to create a new one at the top of the git worktree. If there is no git worktree, then fallback to updating the global default in the configuration. Provide a global default flag for the use subcommand so that only the global default in-use toolchain is considered and not any of the swift version files.
…esult and centralized error messages
Provide a run command that allows arbitrary commands to be run in the context of the selected toolchain. Provide a one-off selection mechanism with a special syntax on the run command.
With no arguments the install subcommand will install the currently selected toolchain from the `.swift-version` files.
…swiftly install`. Guard automatic creation of .swift-version file from `swiftly use` around a prompt overridable using an `--assume-yes`. Minor cleanup
Fix all of the swift.org urls so that they use www.swift.org to avoid redirection
Fix symlink target selection for swiftly when it is system managed
Print the error in a better way
Add support for these new platforms to swiftly, the autodetection, the tests, and docker support. Remove the swiftly installer portion of the code.
…r relevant anymore
The init process just installs swiftly itself at the moment. Most users will immediately install a swift toolchain, most likely the latest available one. On Linux, there's confusing gpg messages that most users don't need to be aware. The init process will provide a summary of things that are going to happen to the user's system, including the addition of GnuPG keys on Linux, and the installation of the latest swift toolchain so that they can agree, or abort the entire process. When the process runs the user is given line-level and high level processes, not internal details. Add a verbose mode for more details, such as the messages that come from GnuPG on Linux. Add an option to the init subcommand to allow swiftly to be installed without the latest available swift toolchain so that advanced users can decide how to install a toolchain themselves after the swiftly installation. Update the documentation with the more automated workflow.
cmcgee1024
changed the title
Streamlined init process
Streamline the swiftly init process
Oct 20, 2024
@swift-ci test macOS |
macOS tests are passing:
|
…x/macOS and hide platform-specific details
…ly into streamlined_init
@swift-ci test macOS |
@swift-ci test macOS |
Provide more verbose untarring messages in Linux behind the verbose flag
@swift-ci test macOS |
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.