Skip to content
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

chore(deps): Update Scala, sbt and JDK #443

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

reneleonhardt
Copy link
Contributor

@reneleonhardt reneleonhardt commented May 5, 2024

Updates:

  • Build with sbt 1.9.9 and scala 2.12.19, 2.13.14 and 3.3.3
  • JDK 21.0.1 to 21.0.3
  • Most dependencies

Improvements:

I could build with JDK 21, can you double-check?
https://docs.scala-lang.org/overviews/jdk-compatibility/overview.html#scala-compatibility-table
Then you could add 21 to the matrix 😅

@reneleonhardt reneleonhardt changed the title chore(deps): Update Scala and JDK 21 chore(deps): Update Scala, sbt and JDK May 7, 2024
@lbulej
Copy link
Member

lbulej commented May 10, 2024

Thanks for the PR, I'm just afraid it can't go as is, because you are changing too many different things (CI, SBT, benchmarks, platform versions) and suites like this are rather sensitive when it comes to version numbers.

  • With Scala 3, the plan is to stay on the LTS branch (3.3), especially if moving to 3.4 breaks a benchmark.
  • With SBT, I would tend to delay 1.10 and move to 1.9.9 instead (note that we include the binaries in the repository for convenience, so they need to be updated as well and 1.10 will be changing rather frequently now).
  • Changes in benchmarks/scala-stm/scala-stm-library/dep_tests/sbt/build.sbt should not be necessary, because they are not used.
  • The runtimeInfo() method in benchmarks/actors-akka/src/main/java/edu/rice/habanero/benchmarks/Benchmark.java is also not used anywhere (the code is there just because the original idea was to import the benchmark without much changes).
  • We did not find a need for semantic/conventional commits (yet), for example because what may seems as chore (dependency update such as changing Scala version) may actually change workloads or break benchmarks and needs to pass through CI

@reneleonhardt
Copy link
Contributor Author

Thanks for the infos, did I catch/revert everything?
I extracted https://github.com/sbt/sbt/releases/download/v1.9.9/sbt-1.9.9.tgz but now the diff is showing the executable bit 100644 → 100755, is that as intended or should I --chmod=-x those files? 😅

@reneleonhardt
Copy link
Contributor Author

I updated all dependencies, the only one changing the Java version was ASM 9.7 (8 to 11).

build.sbt Show resolved Hide resolved
"com.h2database" % "h2-mvstore" % "2.2.224",
"net.openhft" % "chronicle-map" % "3.22.9",
"net.openhft" % "chronicle-map" % "3.23.5",
"net.openhft" % "affinity" % "3.23.3", // required by chronicle-map 3.23.5
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't chronicle-map pickup the affinity dependency automatically?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For me it didn't build anymore, they have a strange dependency management... ymmv, just remove this line and try yourself 😅

Copy link
Member

Choose a reason for hiding this comment

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

Various missing BOMs (or what not) was the reason I did not update to the latest versions previously (for release 0.15) and stuck to the versions SBT was able to build with.

Comment on lines +420 to +422
// scala3-compiler_3 3.3.1 is the last dotty version to support JDK 21
// https://bugs.openjdk.org/browse/JDK-8308050
// https://github.com/scala/scala3/commit/f77069a74c4df65c7f69a6476aeb6b52fa8acb48
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand the comment, perhaps you meant "the least version to support JDK21"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As far as I understood this mess, dotty 3.3.1 is the last version to support JDK 21, everything newer broke my builds.
But be my guest and try 3.3.2 or 3.3.3 yourself, maybe you have more luck 😅

Copy link
Member

Choose a reason for hiding this comment

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

OK, what confused me was the reference to the JDK-8308050, which referenced #384 here a while ago, and which was resolved in #404 by using dotty 3.3.1 on Scala 3. I would not expect things to break in 3.3.2 again. Is the Scala 3 commit you reference the commit that broke things?

@@ -414,6 +417,9 @@ lazy val scalaDottyBenchmarks = (project in file("benchmarks/scala-dotty"))
// Version 3.1.2 was the last to compile with Scala 2.13.11. Version 3.1.3-RC2
// broke compilation due to "Unsupported Scala 3 union in parameter value".
// Compiling with Scala 3.1.0+ avoids compatibility issues.
// scala3-compiler_3 3.3.1 is the last dotty version to support JDK 21
// https://bugs.openjdk.org/browse/JDK-8308050
// https://github.com/scala/scala3/commit/f77069a74c4df65c7f69a6476aeb6b52fa8acb48
"org.scala-lang" % "scala3-compiler_3" % "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.

Perhaps this could be replaced with scalaVersion3. I think the explicit version is a leftover from the time we used dotty3 with Scala 2.13.

Copy link
Member

Choose a reason for hiding this comment

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

OK, with respect to the above, we may need to keep scala3-compiler_3 version separate from scalaVersion3. How odd.

@lbulej
Copy link
Member

lbulej commented May 14, 2024

Thanks for the infos, did I catch/revert everything? I extracted https://github.com/sbt/sbt/releases/download/v1.9.9/sbt-1.9.9.tgz but now the diff is showing the executable bit 100644 → 100755, is that as intended or should I --chmod=-x those files? 😅

Yes please, strip the executable bit from the .bat, .jar, and .exe files.

@lbulej
Copy link
Member

lbulej commented May 14, 2024

In general, this is going in the right direction, thank you!

I would appreciate if you could split off the (SBT + CI) update and the benchmark dependency updates into two separate PRs.

Also, in the PR with benchmark platform/dependency updates, could you please list the platform (i.e. Scala) and the primary dependency updates per benchmark in the PR message?

This is to make version changes easier to see, because they are not just a chore. I often end up with separate commits for primary dependency updates to individual benchmarks and prior to release I try to unify the versions of common (second-level) dependencies. But given that the CI is not complaining now, I'm fine with the bundle :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants