Skip to content

Do not build Swift interface files into binary modules when performing a canImport query. #39139

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
Sep 2, 2021

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Sep 2, 2021

We should hold off actually building the binary module file until it is imported.
canImport queries can happen, for example, during dependency scanning, when we do not wish to have the scanner tool execute any module builds.

Resolves rdar://82603098

@artemcm artemcm requested a review from nkcsgexi September 2, 2021 16:45
@artemcm
Copy link
Contributor Author

artemcm commented Sep 2, 2021

@swift-ci please test

Copy link
Contributor

@nkcsgexi nkcsgexi left a comment

Choose a reason for hiding this comment

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

Looking great! Can we rename isCanImportQuery to skipBuildingInterface to be more generic?

@artemcm artemcm force-pushed the DoNotBuildOnCanImport branch from 208fc9d to 484a389 Compare September 2, 2021 16:57
@artemcm
Copy link
Contributor Author

artemcm commented Sep 2, 2021

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Sep 2, 2021

@swift-ci please test Windows platform

@swift-ci
Copy link
Contributor

swift-ci commented Sep 2, 2021

Build failed
Swift Test Linux Platform
Git Sha - 484a389a9afae622b70afb3a39587bdb2fb7992f

@swift-ci
Copy link
Contributor

swift-ci commented Sep 2, 2021

Build failed
Swift Test OS X Platform
Git Sha - 484a389a9afae622b70afb3a39587bdb2fb7992f

…g a `canImport` query.

We should hold off actually building the binary module file until it is imported.
`canImport` queries can happen, for example, during dependency scanning, when we do not wish to have the scanner tool execute any module builds.

Resolves rdar://82603098
@artemcm artemcm force-pushed the DoNotBuildOnCanImport branch from 484a389 to 1b7d555 Compare September 2, 2021 19:10
@artemcm
Copy link
Contributor Author

artemcm commented Sep 2, 2021

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Sep 2, 2021

@swift-ci please test Windows platform

@artemcm artemcm merged commit 842b909 into swiftlang:main Sep 2, 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.

3 participants