Skip to content

Conversation

@WojciechMazur
Copy link
Contributor

Fixes #24161
Based on and superseeds #24180

We're now actively removing Scala 2 pickle annotations and emit synthetic TASTY attributes (for primary classes). Both of validations are now checked at build time

@WojciechMazur WojciechMazur changed the title Fix/24161 Actively remove Scala 2 pickles and emit synthetic TASTy attribute for copied stdlib .class files Dec 29, 2025
@WojciechMazur WojciechMazur requested a review from sjrd December 29, 2025 01:33
@WojciechMazur WojciechMazur added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Dec 29, 2025
@WojciechMazur WojciechMazur added this to the 3.8.0 milestone Dec 29, 2025
def validRange: String = {
val min = TastyVersion(major, 0, 0)
val max = if (experimental == 0) this else TastyVersion(major, minor - 1, 0)
val extra = Option.when(experimental > 0)(this)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's compiled using Scala 2.12. For the sake of correctness we're adding tasty sources to unamanged sources of sbt build. See project/build.sbt changes

var stamps = analysis.stamps

val classDir = (Compile / classDirectory).value
val sourceDir = (LocalProject("scala-library-nonbootstrapped") / sourceDirectory).value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the plugin know about scala-library-nonbootstrapped? It shouldn't.
And even if it were to know about it, why doesn't it know about scala-library-bootstrapped too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

actively remove the pickle annotations when "copying" the class files over from Scala 2

3 participants