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

add JDK 21 Early Access to nightly CI #10394

Closed
wants to merge 14 commits into from
Closed

add JDK 21 Early Access to nightly CI #10394

wants to merge 14 commits into from

Conversation

SethTisue
Copy link
Member

@SethTisue SethTisue commented May 10, 2023

prompted by scala/bug#12783

@scala-jenkins scala-jenkins added this to the 2.12.18 milestone May 10, 2023
@SethTisue
Copy link
Member Author

I had hoped that this would be as easy adding 21-ea, but nooooooooooo, Error: Could not find satisfied version for SemVer '21'

@SethTisue
Copy link
Member Author

SethTisue commented May 10, 2023

okay, I got the CI config correct I think

but the new jobs are now failing because of scala/bug#12783 (which is the root cause of sbt/sbt#7235)

and note that it fails trying to even start sbt

so, eventually we do want to merge this PR, but we won't able to use this PR's setup to test the fix for 12783, because of the circularity involved

we'll need to make the fix, locally publish a Scala with the fix (2.12.18-M2, say), then test that it fixes sbt/sbt#7235 by starting sbt with that Scala version (will we need to build a new sbt, or can we tell the launcher directly to use 2.12.18-M2?). if that succeeds, then we're good

@eed3si9n if I have 2.12.18-M2 published locally, can I tell sbt to use it without having to rebuild sbt?

@SethTisue SethTisue added the internal not resulting in user-visible changes (build changes, tests, internal cleanups) label May 10, 2023
@eed3si9n
Copy link
Member

eed3si9n commented May 10, 2023

@eed3si9n if I have 2.12.18-M2 published locally, can I tell sbt to use it without having to rebuild sbt?

You could try something like launch

sbt -Dsbt.scala.version=2.12.18-M2

with potentially needing project/plugins.sbt:

// Global / resolvers += "scala-integration" at "https://scala-ci.typesafe.com/artifactory/scala-integration/"
def scala212 = "2.12.18-M2"
scalaVersion := scala212
dependencyOverrides += "org.scala-lang" % "scala-library" % scala212
dependencyOverrides += "org.scala-lang" % "scala-compiler" % scala212

@SethTisue SethTisue added the prio:hi high priority (used only by core team, only near release time) label May 16, 2023
@SethTisue
Copy link
Member Author

after #10397 goes through, this one can come next

@SethTisue
Copy link
Member Author

SethTisue commented May 16, 2023

in my local testing on top of #10397, I'm seeing some test failures:

!!  665 - run/repl-no-imports-no-predef.scala       [output differs]
!!  672 - run/repl-parens.scala                     [output differs]
!!  699 - run/sammy_after_implicit_view.scala       [output differs]
!!  711 - run/sammy_restrictions_LMF.scala          [output differs]
!! 1295 - run/t5535.scala                           [output differs]
!! 1338 - run/t5789.scala                           [output differs]
!! 1465 - run/t6434.scala                           [output differs]
!! 1643 - run/t7747-repl.scala                      [output differs]
!!  141 - neg/macro-exception                       [output differs]
!!  150 - neg/macro-invalidret                      [output differs]

a number of tests are sensitive to a toString change for lambdas, resulting in diffs like:

-res17: () => Int = <function>
+res17: () => Int = $Lambda/0x000000080177c430@52449bdb

the failing neg tests are because of test sensitivity to exact stack trace contents:

-   at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
+   at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

and run/sammy_restrictions_LMF fails with an exception, cause not immediately obvious. I'll look into it later

@lrytz
Copy link
Member

lrytz commented May 16, 2023

toString change for lambdas

Probably needs an adjustment here:

private val lambdaless = """\$Lambda\$\d+/(?:0x[a-f0-9]{16}|\d+)(@[a-fA-F0-9]+)?""".r
private def stripLambdaClassName(s: String): String = lambdaless.replaceAllIn(s, Regex.quoteReplacement("<function>"))

@som-snytt
Copy link
Contributor

  private val lambdaless = """\$Lambda\$\d+/(?:0x[a-f0-9]{16}|\d+)(@[a-fA-F0-9]+)?""".r
  private val lambdaless = """\$Lambda(?:\$\d+)?/(?:0x[a-f0-9]{16}|\d+)(@[a-fA-F0-9]+)?""".r

optional bit after $Lambda, probably I should test it if I'm going to say it.

OK also make that last group noncapturing.

val lambdaless = """\$Lambda(?:\$\d+)?/(?:0x[a-f0-9]{16}|\d+)(?:@[a-fA-F0-9]+)?""".r

@som-snytt
Copy link
Contributor

@SethTisue thanks for early action on EA. I pushed a tweak. I feel so nerdy pushing to 2.12.

@SethTisue SethTisue removed this from the 2.12.18 milestone May 18, 2023
@SethTisue
Copy link
Member Author

rebased as #10400

@SethTisue SethTisue closed this May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal not resulting in user-visible changes (build changes, tests, internal cleanups) prio:hi high priority (used only by core team, only near release time)
Projects
None yet
5 participants