Skip to content

Setup the 3.4.1 development #19321

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ object DottyJSPlugin extends AutoPlugin {
object Build {
import ScaladocConfigs._

val referenceVersion = "3.3.1"
val referenceVersion = "3.4.0-RC1"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should either wait to have 3.4.0-RC2 that has the correct minor TASTy version or keep using 3.3.1

Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be 3.4.0? why would we start 3.4.1 before 3.4.0 was released?


val baseVersion = "3.4.0-RC1"
val baseVersion = "3.4.1-RC1"
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add some tests that check that the minor version N (3.N.X) is equal to the minor TASTy version minus one.


// Versions used by the vscode extension to create a new project
// This should be the latest published releases.
Expand Down
57 changes: 57 additions & 0 deletions project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,66 @@ object MiMaFilters {
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TypeReprMethods.dealiasKeepOpaques"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.paramVariance"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TypeLambdaMethods.paramVariances"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.internal.AssignedNonLocally"),
Copy link
Contributor

Choose a reason for hiding this comment

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

We should check MiMa against 3.4.0-RC1 and not 3.3.1. See #19469.

ProblemFilters.exclude[MissingClassProblem]("scala.annotation.internal.CaptureChecked"),
ProblemFilters.exclude[MissingClassProblem]("scala.annotation.internal.reachCapability"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefTypeTest"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefMethods"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.paramVariance"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TypeLambdaMethods.paramVariances"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#TypeReprMethods.dealiasKeepOpaques"),
ProblemFilters.exclude[MissingClassProblem]("scala.quoted.Quotes$reflectModule$ValOrDefDefMethods"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#defnModule.FunctionClass"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.quoted.Quotes#reflectModule#defnModule.PolyFunctionClass"),
ProblemFilters.exclude[DirectMissingMethodProblem]("scala.runtime.Tuples.reverse"),
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.4-migration"),
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.4"),
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.5-migration"),
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language.3.5"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E4$"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E4$minusmigration$"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E5$"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$3$u002E5$minusmigration$"),
ProblemFilters.exclude[MissingFieldProblem]("scala.runtime.stdLibPatches.language#deprecated.ascriptionVarargsUnpacking"),
ProblemFilters.exclude[MissingClassProblem]("scala.runtime.stdLibPatches.language$deprecated$ascriptionVarargsUnpacking$")
)
val TastyCore: Seq[ProblemFilter] = Seq(
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.EXPLICITtpt"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyBuffer.writeUtf8"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.AttributesSection"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.CAPTURECHECKEDattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.ELIDED"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.EXPLICITNULLSattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.JAVAattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.OUTLINEattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.SCALA2STANDARDLIBRARYattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.SOURCEFILEattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.WITHPUREFUNSattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.attributeTagToString"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.isBooleanAttrTag"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.isStringAttrTag"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.AttributesSection"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.ELIDED"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.isBooleanAttrTag"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.SCALA2STANDARDLIBRARYattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.EXPLICITNULLSattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.CAPTURECHECKEDattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.WITHPUREFUNSattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.JAVAattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.OUTLINEattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.isStringAttrTag"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.SOURCEFILEattr"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyFormat.attributeTagToString"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyHeaderUnpickler.this"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyHeaderUnpickler.this"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.TastyHeaderUnpickler$Compatibility$"),
ProblemFilters.exclude[DirectMissingMethodProblem]("dotty.tools.tasty.TastyReader.readUtf8"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.TastyVersion"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.TastyVersion$"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.UnpicklerConfig"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.UnpicklerConfig$"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.UnpicklerConfig$DefaultTastyVersion"),
ProblemFilters.exclude[MissingClassProblem]("dotty.tools.tasty.UnpicklerConfig$Generic")
)
val Interfaces: Seq[ProblemFilter] = Seq(
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object ScalaJSLink:
val result = PathIRContainer
.fromClasspath(cpEntries.toSeq.map(entry => new File(entry).toPath()))
.map(_._1)
.flatMap(cache.cached _)
.flatMap(cache.cached)
.flatMap(linker.link(_, moduleInitializers, PathOutputDirectory(dir), logger))

val report = Await.result(result, Duration.Inf)
Expand Down
2 changes: 1 addition & 1 deletion tasty/src/dotty/tools/tasty/TastyFormat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ object TastyFormat {
* compatibility, but remains backwards compatible, with all
* preceeding `MinorVersion`.
*/
final val MinorVersion: Int = 4
final val MinorVersion: Int = 5
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
final val MinorVersion: Int = 5
final val MinorVersion: Int = 4

See #13447

Copy link
Contributor Author

@Kordyjan Kordyjan Jan 18, 2024

Choose a reason for hiding this comment

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

I'm even more confused now. We are now setting up a tasty version for the nightly releases. According to this diagram and this table, when we have a nightly version in form 3.x.y, where y > 0, tasty should have version 28.(x+1)-exp1. That means it should be 28.5-exp1 now, as we will release nightlies for 3.4.1.

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, based on those diagrams the Nighlies should be on 28.5. I do not know why nightlies should have a different version. It seems it would make more sense for them to have the same version. I guess that the current check does not take this into account. @bishabosha could you clarify this?

Copy link
Contributor

@nicolasstucki nicolasstucki Jan 19, 2024

Choose a reason for hiding this comment

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

We released Scala 3.4.0-RC1 with a 28.4-1 TASTy version. Based on the diagram it should have been 28.4-2, or maybe 28.4-0 (this might be a typo in the diagram). The error we got is consistent with this problem

Backward incompatible TASTy file has version 28.4-experimental-1, produced by Scala 3.4.0-RC1,
  expected stable TASTy from 28.0 to 28.4, or exactly 28.5-experimental-1.

However I am not sure if the check would take the -2 in 28.4-2 into account
https://github.com/lampepfl/dotty/blob/e64a5a5f08563af4790c808a541ed55454489dcc/tasty/src/dotty/tools/tasty/TastyFormat.scala#L339-L385

Copy link
Contributor

Choose a reason for hiding this comment

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

We should be able to update the TASTy minor version using 3.3.1 for now. See #19483. We can later update the reference version to 3.4.0-RC2. We just need to make sure we have the correct version for that one.

Copy link
Member

@bishabosha bishabosha Jan 19, 2024

Choose a reason for hiding this comment

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

Right, based on those diagrams the Nighlies should be on 28.5. I do not know why nightlies should have a different version. It seems it would make more sense for them to have the same version. I guess that the current check does not take this into account. @bishabosha could you clarify this?

Nightlies should be 1 minor version ahead because experimental is treated as before the next stable version - so 28.4-exp-1 can only read 3.3.x compiled code, therefore to read the 3.4.0 std lib, the 3.4.1-RC1-NIGHTLY must have 28.5-exp-1, however the 3.4.1-RC1 final must also have 28.4-0 tasty version

Copy link
Contributor

@nicolasstucki nicolasstucki Jan 19, 2024

Choose a reason for hiding this comment

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

however the 3.4.1-RC1 final must also have 28.4-0 tasty version

Should it be 28.4-0 or 28.4-2 as in the diagram?

Copy link
Member

@bishabosha bishabosha Jan 19, 2024

Choose a reason for hiding this comment

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

the 28.(x+1)-2 is only for RC when patch version is 0 (for minor version x), as that is considered still a preview before the minor is frozen. for RC of some patch release >0, it should be 28.x-0 because RC in the same minor should be forward compatible


/** Natural Number. The `ExperimentalVersion` allows for
* experimentation with changes to TASTy without committing
Expand Down