Skip to content

PackageModel: support the unified swift modules for XCTest #4300

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
Apr 18, 2022

Conversation

compnerd
Copy link
Member

XCTest accidentally did not use the directory form of the swiftmodule,
which did not matter with a single architecture being available.
Migrate to the directory form to match the SDK setup. With the SDK
migrating to the architecture independent directory for the modules,
follow suit and provide a compatibility path that will allow use of
either.

Co-dependents:
swiftlang/swift#42419
swiftlang/swift-installer-scripts#119
swiftlang/swift-driver#1063

`XCTest` accidentally did not use the directory form of the swiftmodule,
which did not matter with a single architecture being available.
Migrate to the directory form to match the SDK setup.  With the SDK
migrating to the architecture independent directory for the modules,
follow suit and provide a compatibility path that will allow use of
either.
@compnerd
Copy link
Member Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor

Thanks @compnerd. Is there a reasonable unit test that would make sure this doesn't break in the future?

@compnerd
Copy link
Member Author

I don't see a good way to test this - a mock setup would work, but would require checking in a full SDK and I'm not sure that is desirable (or am I wrong on that?). Also note that this wasn't broken, this is setup for the new path while retaining the backwards compatibility. At some point (possibly Swift 6), I'd like to consider dropping support for the migration path.

@abertelrud
Copy link
Contributor

I don't see a good way to test this - a mock setup would work, but would require checking in a full SDK and I'm not sure that is desirable (or am I wrong on that?). Also note that this wasn't broken, this is setup for the new path while retaining the backwards compatibility. At some point (possibly Swift 6), I'd like to consider dropping support for the migration path.

Makes sense, but I always ask when a PR doesn't have a test. :) In the past, in a different project, I've had success with mock SDKs that contain just enough bits to test the specific thing that's being tested. That of course carries the risk that you're not testing the real thing. I agree it would not be appropriate to check in a full SDKs.

Thanks!

@elsh
Copy link
Contributor

elsh commented Apr 18, 2022

@compnerd feel free to merge when other PRs are ready

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.

5 participants