Skip to content

[5.10 🍒][Dependency Scanning] Process implicit imports of the source module first, emulating implicit builds #68678

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

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Sep 21, 2023

Cherry-pick of #68677

• Release: Swift 5.10
• Explanation: In case import resolution order somehow sometimes matters, it's prudent to process/resolve/locate implicitly-imported modules first.
• Scope of Issue: Some projects which rely on import order-dependent behavior for Clang module resolution may be affected and see different behavior with explicit module builds.
• Risk: Minimal, this changes explicit module dependency scanning code-path only to match the behavior currently exercise by implicit module builds
• Origination: Explicit Module Build feature development. Scanner's default order of module resolution unintentionally differed from implicit module flow.

Resolves rdar://113917657

@artemcm artemcm requested a review from nkcsgexi September 21, 2023 19:58
@artemcm artemcm requested a review from a team as a code owner September 21, 2023 19:58
@artemcm
Copy link
Contributor Author

artemcm commented Sep 21, 2023

@swift-ci test

}
}

// Add user-specified `import` dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add some comments about that this needs to happen after implicit imports?

@artemcm artemcm force-pushed the 510FixImportProcessOrderForScan branch from 2f4785b to 63994e0 Compare September 21, 2023 21:15
@artemcm
Copy link
Contributor Author

artemcm commented Sep 21, 2023

@swift-ci test and merge

…irst, emulating implicit builds

In case import resolution order somehow sometimes matters, it's prudent to process/resolve/locate implicitly-imported modules first.

Resolves rdar://113917657
@artemcm artemcm force-pushed the 510FixImportProcessOrderForScan branch from 63994e0 to 6614058 Compare September 22, 2023 16:40
@artemcm
Copy link
Contributor Author

artemcm commented Sep 22, 2023

@swift-ci test

@artemcm artemcm merged commit 338d497 into swiftlang:release/5.10 Sep 25, 2023
@artemcm artemcm deleted the 510FixImportProcessOrderForScan branch September 25, 2023 16:14
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