-
Notifications
You must be signed in to change notification settings - Fork 250
update[static-sdk]: expand installation section #1143
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,55 +108,85 @@ and can be installed by simply copying. | |
|
||
### Installing the SDK | ||
|
||
Before you start, it's important to note: | ||
#### (1) Prerequisites | ||
|
||
* You will need to [install an Open Source toolchain from | ||
swift.org](/install/). | ||
Before starting, please note the following requirements: | ||
|
||
* You cannot use the toolchain provided with Xcode to build programs | ||
using the SDK. | ||
* You need to install an open-source [Swift toolchain](/install/) from | ||
swift.org. | ||
|
||
* If you are using macOS, you will also need to ensure that you use | ||
the Swift compiler from this toolchain by [following the | ||
instructions | ||
here](/install/macos/package_installer/). | ||
* If you are using macOS, note that you cannot use the toolchain | ||
provided with Xcode to build programs using the SDK. Instead, you | ||
must use the Swift compiler from the open-source toolchain (see | ||
above). | ||
|
||
* The toolchain must match the version of the Static Linux SDK that | ||
you install. The Static Linux SDK includes the corresponding Swift | ||
version in its filename to help identify the correct version of the | ||
SDK. | ||
#### (2) Pre-Installation Notes | ||
|
||
* When installing Swift SDKs from remote URLs, you have to pass a | ||
`--checksum` option with the corresponding checksum provided by the | ||
author of the Swift SDK. | ||
Please be aware of: | ||
|
||
Once that is out of the way, actually installing the Static Linux SDK | ||
is easy; at a prompt, enter | ||
* Version compatibility: The Swift toolchain must match the version of | ||
the Static Linux SDK that you install. | ||
|
||
* Clean installation: If you previously installed an SDK for a | ||
different Swift toolchain version, remove the old one before | ||
installing the new one (see management commands below). | ||
|
||
* Checksum verification: When installing Swift SDKs from remote URLs, | ||
you must pass a `--checksum` option with the corresponding checksum | ||
provided by the SDK author. | ||
|
||
* Command pattern: The installation follows the pattern described in | ||
the next sections. | ||
|
||
#### (3) Download and Install the Static Linux SDK | ||
|
||
To obtain the Static Linux SDK: | ||
|
||
* Visit the swift.org [installation | ||
page](https://www.swift.org/install) for complete Static Linux SDK | ||
installation instructions, where you can download directly or click | ||
"Copy install command". | ||
|
||
* For previous releases, navigate to "Previous Releases" on the | ||
installation page. | ||
|
||
* For development snapshots, access the static-sdk YAML file for your | ||
target branch (e.g., swift-6.2-branch snapshots | ||
[here](https://github.com/swiftlang/swift-org-website/blob/main/_data/builds/swift-6_2-branch/static-sdk.yml)) | ||
to quickly construct the install command (following the pattern | ||
explained below) by browsing the available checksums. | ||
|
||
#### (4) Installation Commands Pattern | ||
|
||
The basic installation command follows this pattern: | ||
|
||
```console | ||
$ swift sdk install <URL-or-filename-here> [--checksum <checksum-for-archive-URL>] | ||
``` | ||
|
||
giving the URL (and a corresponding checksum) or filename at which the SDK can be found. | ||
You can provide either a URL (with corresponding checksum) or a local | ||
filename where the SDK can be found. | ||
|
||
For instance, assuming you have installed the | ||
`swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-02-a` toolchain, you would | ||
need to enter | ||
For example, if you have installed the `swift-6.1.2-RELEASE` toolchain, you would enter: | ||
|
||
```console | ||
$ swift sdk install https://download.swift.org/swift-6.0-branch/static-sdk/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-02-a/swift-6.0-DEVELOPMENT-SNAPSHOT-2024-07-02-a_static-linux-0.0.1.artifactbundle.tar.gz --checksum 42a361e1a240e97e4bb3a388f2f947409011dcd3d3f20b396c28999e9736df36 | ||
$ swift sdk install https://download.swift.org/swift-6.1.2-release/static-sdk/swift-6.1.2-RELEASE/swift-6.1.2-RELEASE_static-linux-0.0.1.artifactbundle.tar.gz --checksum df0b40b9b582598e7e3d70c82ab503fd6fbfdff71fd17e7f1ab37115a0665b3b | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should replace this with logic to look up the latest from https://github.com/swiftlang/swift-org-website/blob/main/_data/builds/swift_releases.yml file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How would you propose to do that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For example:
|
||
``` | ||
|
||
to install the corresponding Static Linux SDK. | ||
This will download and install the corresponding Static Linux SDK on | ||
your system. | ||
|
||
#### (5) Managing Installed SDKs | ||
|
||
After installation, you can manage your SDKs using these commands: | ||
|
||
Swift will download and install the SDK on your system. You can get a | ||
list of installed SDKs with | ||
List all installed SDKs: | ||
|
||
```console | ||
$ swift sdk list | ||
``` | ||
|
||
and it's also possible to remove them using | ||
Remove an SDK: | ||
|
||
```console | ||
$ swift sdk remove <name-of-SDK> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned elsewhere, I think directing people to work out the URL for a YAML file is less than ideal. I'm not even sure that the URLs for these files are necessarily fixed in stone, or indeed documented anywhere. @shahmishal, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should point them to the installation page, and avoid hardcoding because it will get out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I kindly request to elaborate?
We’ve already pointed to the installation page, which provides guidance on navigating past releases.
However, it appears that the development snapshots are not being published on swift.org. Could you suggest a more user-friendly method for users to retrieve the checksums, particularly for the development snapshots, so that they can more conveniently construct the installation command?