Skip to content
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

[5.9] Fix testable executables once more #6881

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

neonichu
Copy link
Member

A previous problem here was fixed in #6723, this new fix is attempting to resolve issues where macros are used transitively by a product that a test is depending on. It seems to me that those transitively available macros should not be statically linked into tests and in fact doing so can cause various issues such as linker errors on non-Darwin platforms.

It does feel like eventually we need to get away from computeDependencies(of:) being a computation on the entire package graph and instead let each package produce separate products which we can then just use transitively, but that is a much bigger change to SwiftPM's build system.

rdar://115071012

(cherry picked from commit 00a64df)

A previous problem here was fixed in #6723, this new fix is attempting to resolve issues where macros are used transitively by a product that a test is depending on. It seems to me that those transitively available macros should not be statically linked into tests and in fact doing so can cause various issues such as linker errors on non-Darwin platforms.

It does feel like eventually we need to get away from `computeDependencies(of:)` being a computation on the entire package graph and instead let each package produce separate products which we can then just use transitively, but that is a much bigger change to SwiftPM's build system.

rdar://115071012

(cherry picked from commit 00a64df)
@neonichu neonichu added the swift 5.9 This PR targets the 5.9 branch label Sep 11, 2023
@neonichu neonichu self-assigned this Sep 11, 2023
@neonichu
Copy link
Member Author

@swift-ci please smoke test

@neonichu
Copy link
Member Author

@swift-ci please test

@neonichu neonichu merged commit 71633ac into release/5.9 Sep 11, 2023
5 checks passed
@neonichu neonichu deleted the fix-testable-executables-once-more-5.9 branch September 11, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift 5.9 This PR targets the 5.9 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants