Skip to content

SPMTestSupport should not depend on Build #3551

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
Jun 15, 2021

Conversation

neonichu
Copy link
Contributor

@neonichu neonichu commented Jun 14, 2021

Motivation:

In #3398, we introduced a way to check whether a compiler supports specific flags. This functionality relies on the Swift Driver and therefore the Build module which isn't available on all platforms and therefore shouldn't be used by SPMTestSupport.

For example, llbuild does not currently work on iOS and the Swift Driver doesn't support Windows at this time.

Moreover, we should also not proliferate use of the Build module to parts of the code base that should be separate from an actual build process, in order to keep the separation between the full SwiftPM library and the data model variant.

Modifications:

This change removes the dependency and replaces the check in tests with a check for the 5.5 Swift compiler instead.

Result:

Tests can be compiled and run again on platforms that didn't support this.

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

In #3398, we introduced a way to check whether a compiler supports specific flags. This functionality relies on the Swift Driver and therefore the `Build` module which isn't available on all platforms and therefore shouldn't be used by `SPMTestSupport`.

This change removes the dependency and replaces the check in tests with a check for the 5.5 Swift compiler instead.
@neonichu neonichu force-pushed the test-support-should-not-depend-on-build branch from 3cc6ba0 to 81d00ef Compare June 15, 2021 00:01
@neonichu
Copy link
Contributor Author

Looks like I reversed the condition accidentally for some tests 🥲

@neonichu
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@abertelrud abertelrud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @neonichu!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants