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

Test against JDK20 #1774

Merged
merged 1 commit into from Jul 4, 2023
Merged

Test against JDK20 #1774

merged 1 commit into from Jul 4, 2023

Conversation

bjaglin
Copy link
Collaborator

@bjaglin bjaglin commented Jun 3, 2023

No description provided.

@bjaglin bjaglin changed the title Jdk20 Test against JDK20 Jun 3, 2023
@bjaglin
Copy link
Collaborator Author

bjaglin commented Jun 3, 2023

 - PrettyTest.scala *** FAILED *** (792 milliseconds)
  java.lang.IllegalArgumentException: Unsupported class file major version 64
  at scala.tools.asm.ClassReader.<init>(ClassReader.java:199)
  at scala.tools.asm.ClassReader.<init>(ClassReader.java:180)
  at scala.tools.asm.ClassReader.<init>(ClassReader.java:166)
  at scala.tools.asm.ClassReader.<init>(ClassReader.java:287)
  at scala.meta.internal.metacp.package$.scala$meta$internal$metacp$package$$readInputStreamToClassNode(package.scala:89)
  at scala.meta.internal.metacp.package$XtensionAsmClassfileOps$.hasScalaSig$extension(package.scala:78)
  at scala.meta.internal.scalacp.SymbolIndex.$anonfun$lookup$1(SymbolIndex.scala:30)
  at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:454)
  at scala.meta.internal.scalacp.SymbolIndex.lookup(SymbolIndex.scala:13)
  at scala.meta.internal.scalacp.SymbolOps$XtensionSymbolSSpec.descriptor(SymbolOps.scala:115)

@bjaglin
Copy link
Collaborator Author

bjaglin commented Jun 3, 2023

This shows that JDK20 should work fine, as the only failures seem to be related to the test runner rather than the SUT, only with the unpublished scala 3 artifacts anyway. These false positives will be fixed by the next release of scalameta which will bring a JDK20-compatible scalap, so I don't think it's worth hacking the build to force an eviction of org.scala-lang artifacts.

@SethTisue
Copy link
Contributor

SethTisue commented Jun 14, 2023

(since you might want to tackle 20 and 21 together...)

in the Scala 2.13 community build, I'm seeing a test failure on JDK 21 (after upgrading to sbt 1.9.0, since earlier versions don't work on JDK 21): https://scala-ci.typesafe.com/job/scala-2.13.x-jdk21-integrate-community-build/44/artifact/logs/scalafix-build.log

the failure reproduces for me locally as well:

[info] SymbolInformationSuite:
[info] - java/lang/System#lineSeparator(). *** FAILED *** (51 milliseconds)
[info]   java.lang.NullPointerException: Cannot invoke "String.isEmpty()" because "$this" is null
[info]   at scala.collection.StringOps$.head$extension(StringOps.scala:1124)
[info]   at scala.meta.internal.semanticdb.Scala$Names$.encode(Scala.scala:181)
[info]   at scala.meta.internal.semanticdb.Scala$Descriptor.toString(Scala.scala:147)
[info]   at scala.meta.internal.semanticdb.Scala$Descriptor.toString$(Scala.scala:140)
[info]   at scala.meta.internal.semanticdb.Scala$Descriptor$Parameter.toString(Scala.scala:158)
[info]   at scala.meta.internal.semanticdb.Scala$Symbols$.Global(Scala.scala:14)
[info]   at scala.meta.internal.javacp.Javacp$.$anonfun$sinfos$13(Javacp.scala:175)
[info]   at scala.collection.immutable.List.map(List.scala:246)
[info]   at scala.meta.internal.javacp.Javacp$.$anonfun$sinfos$9(Javacp.scala:169)
[info]   at scala.collection.IterableOnceOps.foreach(IterableOnce.scala:576)
[info]   ...

@SethTisue
Copy link
Contributor

oh, and integration2_13/test fails with the same error in PrettyExpectSuite

@bjaglin bjaglin marked this pull request as ready for review July 4, 2023 19:56
@bjaglin bjaglin merged commit 22534ba into scalacenter:main Jul 4, 2023
8 checks passed
@bjaglin
Copy link
Collaborator Author

bjaglin commented Jul 4, 2023

I'll follow up on JDK21 compatibility in #1810

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.

None yet

2 participants