-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Traits] Integrate traits into module loading #7689
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
[Traits] Integrate traits into module loading #7689
Conversation
@swift-ci please test |
# Motivation In my previous PR I landed the APIs for package traits. We now have to take this information into consideration when evaluating the module graph. # Modification This PR implements the various trait features in the module graph loading stage. Including resolving optional dependencies, enabled traits of dependencies, build settings based on traits and passing defines for traits. This PR also contains an exhaustive test fixtures which we can use to check if all trait functionality is working as expected.
4451034
to
5e4c28b
Compare
@swift-ci please test |
5e4c28b
to
28ca7a4
Compare
@swift-ci please test |
Sources/PackageModel/Manifest/PackageDependencyDescription.swift
Outdated
Show resolved
Hide resolved
Sources/PackageModel/Manifest/PackageDependencyDescription.swift
Outdated
Show resolved
Hide resolved
Sources/PackageModel/Manifest/PackageDependencyDescription.swift
Outdated
Show resolved
Hide resolved
Sources/PackageModel/Manifest/PackageDependencyDescription.swift
Outdated
Show resolved
Hide resolved
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.
Overall SGTM, my only nit is for the error message and gratuitous use of public
instead of package
.
@swift-ci please test |
@swift-ci test windows |
305afc8
to
25f57e1
Compare
@swift-ci please test |
@swift-ci test windows |
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.
Splendid, thank you!
@swift-ci test windows |
@swift-ci please test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
Motivation
In my previous PR I landed the APIs for package traits. We now have to take this information into consideration when evaluating the module graph.
Modification
This PR implements the various trait features in the module graph loading stage. Including resolving optional dependencies, enabled traits of dependencies, build settings based on traits and passing defines for traits.
This PR also contains an exhaustive test fixtures which we can use to check if all trait functionality is working as expected.