Skip to content

[Tests] Don't use invalid module to satisfy canImport check #7647

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

Conversation

cachemeifyoucan
Copy link
Contributor

Stop using a fake invalid module to satisfy canImport check for testing as swift compiler will start to evaluate such checks to false in the future.

Instead, using a valid swift interfacefile to satisify the external module import dependency.

Motivation:

In order for change in swiftlang/swift#74199 to land, update swiftpm tests to stop using invalid swiftmodule.

Stop using a fake invalid module to satisfy `canImport` check for
testing as swift compiler will start to evaluate such checks to false in
the future.

Instead, using a valid swift interfacefile to satisify the external
module import dependency.
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please test

@cachemeifyoucan cachemeifyoucan merged commit 3b9dd49 into swiftlang:main Jun 7, 2024
5 checks passed
cachemeifyoucan added a commit to cachemeifyoucan/swift-package-manager that referenced this pull request Jun 18, 2024
…ang#7647)

Stop using a fake invalid module to satisfy `canImport` check for
testing as swift compiler will start to evaluate such checks to false in
the future.

Instead, using a valid swift interfacefile to satisify the external
module import dependency.

(cherry picked from commit 3b9dd49)
@MaxDesiatov MaxDesiatov added test suite improvements to SwiftPM test suite no functional change No user-visible functional changes included labels Jun 18, 2024
cachemeifyoucan added a commit that referenced this pull request Jun 18, 2024
#7647) (#7678)

Explanation: This is a test-only change to allow for `canImport` change
swiftlang/swift#74519
Scope: Test only. Update a test that relies on an invalid module as test
input. Replace that with a swiftinterface.
Original PR: #7647
Test: Unit-Test
Reviewer: @tshortli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no functional change No user-visible functional changes included test suite improvements to SwiftPM test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants