-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Serialization] Don't fail the precise tag check if only the last digit doesn't match #63639
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
Conversation
Rename the env var to SWIFT_IGNORE_SWIFTMODULE_REVISION as it's recommended for use outside of testing.
…ag check Weaken the precise tag check at loading swiftmodule to accept binary modules build by a compiler with a tag where only the last digit is different. We assume that the other digit in the version should ensure compiler and stdlib compatibility. If the last digit doesn't match, still raise a remark. rdar://105158258
@swift-ci Please smoke test |
@swift-ci Please smoke test Linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for incorporating this use case🙏
if (moduleRevision != compilerRevision) { | ||
result.status = Status::RevisionIncompatible; | ||
// The module versions are mismatching, record it and diagnose later. | ||
result.problematicRevision = moduleRevision; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could go with mismatchedRevision
, but problematic
is okay too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was working in diagnostics at the same time where we do use the generic problematic
but here mismatched
would be more precise. I'll try to update it next time I work in this code.
version::Version compatibilityVersion = {}; | ||
llvm::VersionTuple userModuleVersion; | ||
StringRef sdkName = {}; | ||
StringRef problematicRevision = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the {}
aren't actually needed here - they'd already all be default initialized (like VersionTuple
).
@swift-ci Please smoke test macos |
Weaken the precise tag check at loading swiftmodules to accept binary modules build by a compiler with a tag where only the last digit is different. This relies on the assumption that the other digits in the version should ensure compiler and stdlib compatibility. If the last digit doesn't match, raise a remark.
The new
getCurrentCompilerSerializationTag
can be used to add vendor-specific information in the tag.The precise tag check can be disabled with the env var
SWIFT_IGNORE_SWIFTMODULE_REVISION
.rdar://105158258