Skip to content

[ModuleInterface] Support loading an aliased module with an underlying module #62044

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 2 commits into from
Nov 11, 2022

Conversation

xymus
Copy link
Contributor

@xymus xymus commented Nov 11, 2022

Ensure we can import a module given an alias (using -module-alias) in the case where it has an underlying clang module. Prior to this fix it was wrongfully reported as a cyclic dependency.

Also introduce an env var to test this feature before turning it on by default.

This is a fix for the workaround introduced in #61941.

rdar://102217790

…module

Importing a module using an alias (set with -module-alias) fails if the
imported module has an underlying clang module.

rdar://102217790
Set the env var SWIFT_ALIAS_MODULE_NAMES_IN_INTERFACES to turn on
generating swiftinterfaces with the AliasModuleNames workaround by
default.
@xymus xymus requested review from elsh and tshortli November 11, 2022 00:39
@xymus
Copy link
Contributor Author

xymus commented Nov 11, 2022

@swift-ci Please smoke test

@xymus xymus merged commit b526205 into swiftlang:main Nov 11, 2022
@xymus xymus deleted the module-alias-disambiguate-fix branch November 11, 2022 19:55
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.

2 participants