Skip to content

[Module] Use stricter module hash #75986

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 3, 2024

Conversation

cachemeifyoucan
Copy link
Contributor

Use a stricter module hash for modules as moving towards more explicit modules. Previously, a normalized target triple without deployment target is used as part of the module hash, with the assumption that deployment target should not change binary module generated.

In reality, the binary module compilation also needs to provide the typecheck for all interface to ensure the underlying C/ObjC module that built with the correct deployment target does provide the interfaces to pass typecheck. Using a stricter module hash can avoid the potentially confusing error when importing the module.

This commit adds following to module hash to distinguish swiftmodules.

  • Deployment target
  • -application-extension

rdar://134301179

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

1 similar comment
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

cachemeifyoucan added a commit to cachemeifyoucan/llvm-project that referenced this pull request Aug 30, 2024
Update swift interface hash test after change in:
swiftlang/swift#75986
@cachemeifyoucan
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#9198

@swift-ci please smoke test

Use a stricter module hash for modules as moving towards more explicit
modules. Previously, a normalized target triple without deployment
target is used as part of the module hash, with the assumption that
deployment target should not change binary module generated.

In reality, the binary module compilation also needs to provide the
typecheck for all interface to ensure the underlying C/ObjC module that
built with the correct deployment target does provide the interfaces to
pass typecheck. Using a stricter module hash can avoid the potentially
confusing error when importing the module.

This commit adds following to module hash to distinguish swiftmodules.
* Deployment target
* -application-extension

rdar://134301179
@cachemeifyoucan
Copy link
Contributor Author

@swift-ci please smoke test

@cachemeifyoucan cachemeifyoucan merged commit f29f67c into swiftlang:main Sep 3, 2024
3 checks passed
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