Skip to content

address JDK 16 failures #1354

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
SethTisue opened this issue Feb 1, 2021 · 12 comments
Closed

address JDK 16 failures #1354

SethTisue opened this issue Feb 1, 2021 · 12 comments
Assignees

Comments

@SethTisue
Copy link
Member

SethTisue commented Feb 1, 2021

sequel to #1352

first we need an ASM 9 upgrade: scala/bug#12328

but then there are also some miscellaneous other failures, as listed in:

@SethTisue SethTisue self-assigned this Feb 1, 2021
@SethTisue SethTisue mentioned this issue Feb 1, 2021
5 tasks
@SethTisue
Copy link
Member Author

at team meeting today @retronym said there's a JVM flag we can pass to bypass errors such as "Unable to make private java.nio.DirectByteBuffer(long,int) accessible"

@SethTisue
Copy link
Member Author

#1355 will get a bunch of projects green

@retronym
Copy link
Member

retronym commented Feb 3, 2021

@SethTisue See https://openjdk.java.net/jeps/396 ("Strongly Encapsulate JDK Internals by Default") for the relevant change. java --illegal-access=permit .... is the escape hatch (although it is deprecated for removal at some future release).

@SethTisue
Copy link
Member Author

SethTisue commented Feb 5, 2021

the three parboiled-related failures:

    "play-doc",                 // Error creating extended parser class: Could not determine whether class 'play.doc.CodeReferenceParser$$parboiled' has already been loaded (Parboiled.java:58)
    "scalatest-tests",          // Error creating extended parser class: Could not determine whether class 'org.pegdown.Parser$$parboiled' has already been loaded
    "specs2-more",              // Error creating extended parser class: Could not determine whether class 'org.pegdown.Parser$$parboiled' has already been loaded (Parboiled.java:58)

seem to have been addressed in this fork: https://github.com/Byoskill/parboiled

but we can't use that fork as-is -- for one thing, build.sbt was moved aside. for another thing, we are frozen on an older parboiled because they upgraded ScalaTest to a newer version. though I guess we could deal with that by not bothering compiling or running the tests any more

so this seems fixable without big effort, but I'm reluctant to put in even medium effort. another possibility is to shrug and do nothing, leaving them as expected-to-fails, as there is no Scala bug here, and only one downstream project is blocked

I think I'm going to do nothing

@SethTisue
Copy link
Member Author

the dispatch failure is (https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-jdk16-integrate-community-build/24/artifact/logs/dispatch-build.log):

[dispatch] Running "test" in: lift-json
[dispatch] [warn] Multiple resolvers having different access mechanism configured with same name 'local'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[dispatch] [warn] Multiple resolvers having different access mechanism configured with same name 'local'. To avoid conflict, Remove duplicate project resolvers (`resolvers`) or rename publishing resolver (`publishTo`).
[dispatch] [info] compiling 1 Scala source to /home/jenkins/workspace/scala-2.12.x-jdk16-integrate-community-build/target-0.9.17/project-builds/dispatch-937b69c25d82c37612e99e10244d986bc76abd81/liftjson/target/scala-2.12/test-classes ...
[dispatch] ** COMMUNITY BUILD LINE COUNT: 18
[dispatch] [info] done compiling
[dispatch] failing seed for Lift Json.parse json is ab1gjcNDC7o9Gz5rFspYLVSLXEJ2btX6vwFYERfn2mA=
[dispatch] [info] ! Lift Json.parse json: Exception raised on property evaluation.
[dispatch] [info] > ARG_0: ""
[dispatch] [info] > Exception: java.lang.ExceptionInInitializerError: null

dispatch and lift-json are pretty dead these days. there is a nonzero chance that if I investigated I'd turn up something interesting, but I think the chance is quite low, so I'm going to ignore this one too, especially since it isn't blocking anything downstream.

@SethTisue
Copy link
Member Author

on 2.12.x, that just leaves shapeless-java-records:

[shapeless-java-records] [error] /home/jenkins/workspace/scala-2.12.x-jdk16-integrate-community-build/target-0.9.17/project-builds/shapeless-java-records-a3d3e64e090868b0b606f294214ac5302b84f90e/src/main/scala/JavaRecordGeneric.scala:48:17: value permittedSubclasses is not a member of Class[?0]
[shapeless-java-records] [error]           clazz.permittedSubclasses.map(_.displayName)
[shapeless-java-records] [error]                 ^

but @xuwei-k's own CI doesn't test on 16 (https://github.com/xuwei-k/shapeless-java-records/blob/main/.github/workflows/ci.yml), and the failure seems highly unlikely to be Scala's fault, so I'm not going to investigate

@SethTisue
Copy link
Member Author

so now let's look at 2.13.x:

    "akka",                     // Unable to make field private static java.util.IdentityHashMap java.lang.ApplicationShutdownHooks.hooks accessible: module java.base does not "opens java.lang" to unnamed module @60e89085
    "requests-scala",           // requests.RequestTests fails, unclear why

requests-scala doesn't seem worth investigating

akka just needs --illegal-access=permit, it looks like. so I've pushed that, and I can take a look tomorrow and see if that uncovers any additional failures downstream.

@xuwei-k
Copy link
Contributor

xuwei-k commented Feb 5, 2021

openjdk/jdk@637b0c6#diff-a6270f4b50989abe733607c69038b2036306d13f77276af005d023b7fc57f1a2R4424

  • jdk15 permittedSubclasses
  • jdk16 getPermittedSubclasses

😢

@xuwei-k
Copy link
Contributor

xuwei-k commented Feb 5, 2021

fixed shapeless-java-records 🙇

@SethTisue
Copy link
Member Author

@xuwei-k 9827559 👍 (merged onto 2.13.x as well)

@SethTisue
Copy link
Member Author

SethTisue commented Feb 5, 2021

akka just needs --illegal-access=permit, it looks like

when adding this to a repo, we need to be attentive about whether to add it to extra.options, for unforked tests, or javaOptions, for forked tests

@SethTisue
Copy link
Member Author

SethTisue commented Feb 6, 2021

after a series of further tweaks, https://scala-ci.typesafe.com/view/scala-2.13.x/job/scala-2.13.x-jdk16-integrate-community-build/28/console has 237 green repos (out of 272). declaring victory

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

No branches or pull requests

3 participants