Skip to content

ModuleLoader: teach canImport to check Swift user module versions #37219

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
May 4, 2021

Conversation

nkcsgexi
Copy link
Contributor

@nkcsgexi nkcsgexi commented May 3, 2021

For config condition canImport(Foo, version: N), this patch teaches the compiler to check N
against the version of the Swift module Foo on disk. It returns true if the module version on
disk is greater or equal to N and returns false otherwise.

Part of rdar://73992299

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented May 3, 2021

@swift-ci please smoke test

@nkcsgexi nkcsgexi force-pushed the 73992299-4 branch 2 times, most recently from 1dac869 to da197b3 Compare May 3, 2021 19:17
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented May 3, 2021

@swift-ci please smoke test

For config condition `canImport(Foo, version: N)`, this patch teaches the compiler to check N
against the version of the Swift module Foo on disk. It returns true if the module version on
disk is greater or equal to N and returns false otherwise.

Part of rdar://73992299
@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented May 3, 2021

@swift-ci please smoke test

@nkcsgexi
Copy link
Contributor Author

nkcsgexi commented May 3, 2021

@swift-ci Please smoke test OS X platform

@nkcsgexi nkcsgexi merged commit c40a083 into swiftlang:main May 4, 2021
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.

1 participant