Default interop mode to "complete" for swift-tools-version >= 6.4#9857
Conversation
61a5c3a to
48110a4
Compare
| packages: root.packages, | ||
| observabilityScope: self.observabilityScope | ||
| ) | ||
| return rootManifests.values.first.map { $0.toolsVersion } |
There was a problem hiding this comment.
What if there is more than one root package?
There was a problem hiding this comment.
Hmm, it seems to me that constructTestEnvironment gets all the test products without grouping by package. Ideally (?) we could go group those together by package and figure out the tools version for each so we run each package with the appropriate default interop mode. Seems like a lot of effort and code restructuring for like not that much reward to me though.
If the multiple root packages case is rare, I think a "good enough" fallback behaviour would just take the lowest toolsVersion out of all the packages. Does that sound reasonable?
|
@swift-ci Please test |
|
@swift-ci Please test |
|
@swift-ci Please test Windows |
Set environment variable SWIFT_TESTING_XCTEST_INTEROP_MODE=complete at runtime if the user has not already provided an override. Note we don't bother retrieving interop mode for getTestSuites since it's not relevant there. * Only set interop mode if the user hasn't already provided an override * Tools version prior to 6.4 doesn't modify default interop mode * Testing: e2e testing for the different scenarios Resolves rdar://173410320
This is due to swiftlang#9420
c49bb55 to
c992621
Compare
|
@swift-ci Please test |
|
@swift-ci Please test |
|
@swift-ci Please test Windows |
Set environment variable SWIFT_TESTING_XCTEST_INTEROP_MODE=complete at runtime if the user has not already provided an override.
More details in the evolution proposal: https://github.com/swiftlang/swift-evolution/blob/main/proposals/testing/0021-targeted-interoperability-swift-testing-and-xctest.md
Motivation:
This opts in new projects (and existing projects that bump tools version) to the complete interop mode.
Modifications:
Update
constructTestEnvironmentto take in a desired interop modeOnly set interop mode if the user hasn't already provided an override
Tools version prior to 6.4 doesn't modify default interop mode
Testing: e2e testing for the different scenarios
Result:
Note we don't bother retrieving interop mode for getTestSuites since it's not relevant there.
Resolves rdar://173410320