-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
swift test
builds dependencies with -enable-testing
#8344
Comments
ahoppen
added a commit
to ahoppen/swift
that referenced
this issue
Mar 8, 2025
We can’t add the tests to the general unified build because they use testable imports and building a package with testable imports also re-builds all of its dependencies with testable imports (swiftlang/swift-package-manager#8344) and is thus incompatible with the other package’s unified build. But we should still be able to share build products between corelibs-foundation tests and swift-foundation-tests.
IMO we should change swiftpm to never build any dependencies with "-enable-testing". It does not make sense to be able to |
I absolutely agree. Just wanted to give context why I care. |
ahoppen
added a commit
to ahoppen/swift
that referenced
this issue
Mar 8, 2025
We can’t add the tests to the general unified build because they use testable imports and building a package with testable imports also re-builds all of its dependencies with testable imports (swiftlang/swift-package-manager#8344) and is thus incompatible with the other package’s unified build. But we should still be able to share build products between corelibs-foundation tests and swift-foundation-tests.
ahoppen
added a commit
to ahoppen/swift
that referenced
this issue
Mar 9, 2025
We can’t add the tests to the general unified build because they use testable imports and building a package with testable imports also re-builds all of its dependencies with testable imports (swiftlang/swift-package-manager#8344) and is thus incompatible with the other package’s unified build. But we should still be able to share build products between corelibs-foundation tests and swift-foundation-tests.
ahoppen
added a commit
to ahoppen/swift
that referenced
this issue
Mar 9, 2025
We can’t add the tests to the general unified build because they use testable imports and building a package with testable imports also re-builds all of its dependencies with testable imports (swiftlang/swift-package-manager#8344) and is thus incompatible with the other package’s unified build. But we should still be able to share build products between corelibs-foundation tests and swift-foundation-tests.
ahoppen
added a commit
to ahoppen/swift
that referenced
this issue
Mar 9, 2025
We can’t add the tests to the general unified build because they use testable imports and building a package with testable imports also re-builds all of its dependencies with testable imports (swiftlang/swift-package-manager#8344) and is thus incompatible with the other package’s unified build. But we should still be able to share build products between corelibs-foundation tests and swift-foundation-tests.
Might be able to roll this into the SE-0455 implementation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running
swift test
without-disable-testable-imports
, we need to build the modules in the current package with-enable-testing
but there is no need to build dependencies with-enable-testing
because they won’t be tested.Because of this, we can’t add
swift-foundation
to the unified build (--multiroot-data-file
) on Swift CI. swift-foundation requires@testable
imports but the other packages in the multi root do no. We should still be able to share the build of eg. swift-syntax though.The text was updated successfully, but these errors were encountered: