-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Support Swift SDKs w/ many metadata files in same directory #8638
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
Conversation
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
# Motivation Swift SDK artifact bundle for WASI now can support both embedded and non-embedded Swift SDKs. Majority of their content is overlapping, thus to avoid duplication they live in the same source tree. Currently, SwiftPM requires that Swift SDKs are located in separate directories, with `swift-sdk.json` metadata at the root of each directory. # Modification SwiftPM can now parse Swift SDK metadata that points directly to metadata JSON files instead of their root directories. This means we can avoid changing file system layout in the WASI artifact bundles and just place sibling "nonembedded.json" and "embedded.json" Swift SDK metadata files in the same directory in the existing layout.
@swift-ci test |
@swift-ci test |
@swift-ci test windows |
kateinoigakukun
approved these changes
May 8, 2025
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.
Seems reasonable to me
dschaefer2
approved these changes
May 9, 2025
This was referenced May 15, 2025
MaxDesiatov
added a commit
to swiftlang/swift-sdk-generator
that referenced
this pull request
May 16, 2025
**Explanation**: This updates `release/6.2` branch of the generator used when building 6.2 Swift 6.2 toolchain with recent changes. Most notably: * Embedded Swift SDK for WASI within existing Swift SDK for WASI artifact bundles, thanks to swiftlang/swift-package-manager#8638 * Bump to Swift 5.9 in `// swift-tools-version` * Bump to generating with Swift 6.1 release tag by default (as opposed to 6.0 previously) * Support for Debian 11 and Debian 12 together with support for downloading and unpacking Debian packages as dependencies. * Additional test suite additions that cover these changes. **Scope**: Isolated to cross-compilation and only impacts existing Ubuntu toolchain job that generates Swift SDK for WASI. **Risk**: Low, most of the changes LoC-wise were incubated on the `main` branch for a month. **Testing**: Expanded test suite, corresponding toolchain builds are passing https://ci.swift.org/job/oss-swift-pr-test-crosscompile-wasm-ubuntu-20_04/ **Issue**: rdar://151475169 **Reviewers**: @kateinoigakukun @euanh --------- Co-authored-by: Jesse L. Zamora <[email protected]> Co-authored-by: Euan Harris <[email protected]>
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.
Motivation:
Swift SDK artifact bundle for WASI now supports both embedded and non-embedded modes. Majority of their content is overlapping, thus to avoid duplication they live in the same source tree.
Currently, SwiftPM requires that Swift SDKs are located in separate directories, with
swift-sdk.json
metadata at the root of each directory.Modification:
SwiftPM can now parse Swift SDK metadata that points directly to metadata JSON files instead of their root directories.
Result:
We can avoid changing file system layout in the artifact bundles for WASI and just place sibling
nonembedded.json
andembedded.json
Swift SDK metadata files in the same directory in their existing layout.The change is transparent to Swift SDK users and is an optional and incremental addition for Swift SDK authors.
As Swift SDKs are required to exactly match the version of the host toolchain, there are no backward compatibility concerns with this change.