Skip to content

[Explicit Modules] Fix detection of a type-checking action in ExplicitModuleInterfaceBuilder #68598

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 19, 2023

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Sep 18, 2023

When we run an interface verification tasks with Explicit module builds, we directly invoke a -explicit-interface-module-build instance with a -typecheck-module-from-interface action. So the builder needs to recognize this as a type-checking invocation. In implicit builds, this gets lowered into a separate compiler sub-instance with a -typecheck action, for some reason.

resolves rdar://115565571

@artemcm artemcm requested review from xymus and nkcsgexi September 18, 2023 21:33
@artemcm artemcm requested a review from tshortli as a code owner September 18, 2023 21:33
@nkcsgexi
Copy link
Contributor

Thank you! Could you add a test case using the blocklist mechanism instead of using -downgrade-typecheck-interface-error? One example is test/ModuleInterface/blocklist_action.swift.

@artemcm artemcm force-pushed the ExplicitInterfaceTypecheckFix branch from c595801 to 901b370 Compare September 18, 2023 21:48
@artemcm
Copy link
Contributor Author

artemcm commented Sep 18, 2023

@swift-ci smoke test and merge

@artemcm
Copy link
Contributor Author

artemcm commented Sep 18, 2023

Thank you! Could you add a test case using the blocklist mechanism instead of using -downgrade-typecheck-interface-error? One example is test/ModuleInterface/blocklist_action.swift.

Done, thanks!

@bnbarham
Copy link
Contributor

@swift-ci smoke test and merge

@artemcm
Copy link
Contributor Author

artemcm commented Sep 19, 2023

Debug build of a compiler with asserts is crashing with this change. Taking a look.

…itModuleInterfaceBuilder'

When we run an interface verification tasks with Explicit module builds, we directly invoke a '-explicit-interface-module-build' instance with a '-typecheck-module-from-interface' action. So the builder needs to recognize this as a typechecking invocation. In implicit builds, this gets lowered into a separate compiler sub-instance with a '-typecheck' action, for some reason.

resolves rdar://115565571
@artemcm artemcm force-pushed the ExplicitInterfaceTypecheckFix branch from 901b370 to 373d491 Compare September 19, 2023 17:38
@artemcm
Copy link
Contributor Author

artemcm commented Sep 19, 2023

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 8b97d43 into swiftlang:main Sep 19, 2023
@artemcm artemcm deleted the ExplicitInterfaceTypecheckFix branch September 19, 2023 21:59
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.

6 participants