Skip to content
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
wants to merge 42 commits into
base: main
Choose a base branch
from

Conversation

cmcgee1024
Copy link
Member

@cmcgee1024 cmcgee1024 commented Oct 20, 2024

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 increase in automation.

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
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.
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
Add support for these new platforms to swiftly, the autodetection,
the tests, and docker support.

Remove the swiftly installer portion of the code.
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 cmcgee1024 changed the title Streamlined init process Streamline the swiftly init process Oct 20, 2024
@cmcgee1024 cmcgee1024 marked this pull request as draft October 20, 2024 18:25
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024
Copy link
Member Author

macOS tests are passing:

Test Suite 'All tests' passed at 2024-10-20 21:52:52.505.
	 Executed 67 tests, with 0 failures (0 unexpected) in 291.251 (291.260) seconds

@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

Provide more verbose untarring messages in Linux behind the verbose flag
@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

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.

1 participant