Fixes #24233: Remove misleading JDK compatibility hint for TASTy errors#25171
Merged
tgodzik merged 7 commits intoscala:mainfrom Feb 4, 2026
Merged
Fixes #24233: Remove misleading JDK compatibility hint for TASTy errors#25171tgodzik merged 7 commits intoscala:mainfrom
tgodzik merged 7 commits intoscala:mainfrom
Conversation
… errors When a TASTy version mismatch occurs (e.g., reading a TASTy file from a newer compiler), the error incorrectly suggests checking "JDK compatibility" even though the issue is with TASTy format versions, not Java classfile versions. This change: - Adds pattern matching in exception handlers to detect UnpickleException - Suppresses the JDK compatibility addendum for TASTy unpickling errors - Preserves the JDK hint for actual classfile version issues - Applies fix to both ClassfileParser and ClassfileTastyUUIDParser for consistency
Contributor
Author
|
Hi! Some CI checks (
I've tried triggering re-runs by pushing new commits, but the same infrastructure errors keep occurring. Could a maintainer please click Re-run cancelled jobs when you get a chance? Thank you! |
WojciechMazur
approved these changes
Feb 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix misleading JDK compatibility error message for TASTy version mismatches
Fixes #24233
Description
When the compiler encounters a TASTy version mismatch (e.g., attempting to read a TASTy file produced by a newer compiler version like 3.7.1 with compiler 3.3.6), it throws an
UnpickleException. The error handling code inClassfileParserandClassfileTastyUUIDParserwas catching this as a genericRuntimeExceptionand appending a misleading message suggesting to "check the JDK compatibility of your Scala version."This message was confusing because:
The error is about TASTy format versions (majorVersion: 28), not Java classfile versions
The JDK version suggestion is irrelevant to TASTy compatibility issues
Changes Made
ClassfileParser.scalaandClassfileTastyUUIDParser.scalaUnpickleExceptionspecificallyExample
Before:
After:
The UnpickleException message already contains clear information about the TASTy version mismatch, making the JDK hint unnecessary and confusing.
Testing