Skip to content

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
merged 2 commits into from
May 9, 2025

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented May 8, 2025

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 and embedded.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.

# 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.
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) May 8, 2025 16:55
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

Copy link
Member

@kateinoigakukun kateinoigakukun left a 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

@MaxDesiatov MaxDesiatov merged commit 3448da6 into main May 9, 2025
6 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/swift-sdk-metadata-paths branch May 9, 2025 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants