fix bytecode attributes for patched files#24180
Closed
hamzaremmal wants to merge 1 commit intoscala:mainfrom
Closed
fix bytecode attributes for patched files#24180hamzaremmal wants to merge 1 commit intoscala:mainfrom
hamzaremmal wants to merge 1 commit intoscala:mainfrom
Conversation
Contributor
|
you intend to link 24161 |
Member
Author
Indeed, thanks for catching this |
Member
|
The CI is not happy:
|
sjrd
reviewed
Oct 15, 2025
Member
sjrd
left a comment
There was a problem hiding this comment.
as a first glance, it looks very annoying to compute in the plugin.
Is it? Since we can assume the .tasty file is well-formed and compiled by our version of the compiler, it should be rather straightforward:
- Skip 4x4 = 16 bytes (magic number, major v, minor v, experimental v)
- Read 4 bytes as
toolVersionLength - Skip
toolVersionLengthbytes - Read 16 bytes as
uuidBytes
| } | ||
|
|
||
| /* Remove Scala 2 Pickles from Classfiles */ | ||
| private def unpickler(bytes: Array[Byte]): Array[Byte] = { |
Member
There was a problem hiding this comment.
This is a very confusing name, as the "unpickler" in the compiler is the thing that actually decodes things. Consider
Suggested change
| private def unpickler(bytes: Array[Byte]): Array[Byte] = { | |
| private def removeScala2Pickles(bytes: Array[Byte]): Array[Byte] = { |
Contributor
|
@hamzaremmal do we need this in 3.8.0? this feels potentially overdue |
Contributor
|
@sjrd do you know where this stands? is this necessary for 3.8.0? |
Contributor
|
Changes were included in #24846 |
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.
We should probably add a
TASTYattribute in the bytecode too but as a first glance, it looks very annoying to compute in the plugin.Closes #24161