Skip to content

[Extensions] Add support for extension products, allowing use of extensions across packages #3298

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 1 commit into from
Feb 21, 2021

Conversation

abertelrud
Copy link
Contributor

Adds initial support for the extension product to go along with the extension target, as described in the Extensible Build Tools Pitch (with the one modification that an extension product can vend multiple extension targets, which makes it like all the other products and may be useful — the pitch will be adjusted for this).

Motivation:

This is further progress of an initial implementation of the PackageDescription interface changes proposed in the extensible build tools pitch. The goal is to have a complete implementation of the proposed PackageDescription API along with the core functionality at the start of the evolution proposal period.

Note that actual use of this is still guarded by a feature flag, since the proposal has yet to be reviewed and it is likely that there will be changes needed based on feedback.

Modifications:

Added extension product to PackageDescription
Extended ExtensionEvaluator to apply extensions referenced in the product definition
Add unit test and test fixture for cross-platform package extension use
Add validation of targets in package product

Result:

When feature flag is enabled (currently via SWIFTPM_ENABLE_EXTENSION_TARGETS=1 in environment), extension products can be used to vend extension targets.

… packages.

This completes the PackageDescription interface changes proposed in the extensible build tools pitch.  Note that actual use of this is still guarded by a feature flag, since the proposal has not been accepted yet and there may be changes needed based on review.
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud abertelrud changed the title Add support for extension products, allowing use of extensions across packages [Extensions] Add support for extension products, allowing use of extensions across packages Feb 21, 2021
@abertelrud abertelrud self-assigned this Feb 21, 2021
@abertelrud abertelrud added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Feb 21, 2021
@abertelrud abertelrud merged commit 4b18559 into swiftlang:main Feb 21, 2021
@abertelrud abertelrud deleted the extensibility-part-five branch February 21, 2021 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants