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

JDK 21-23 Compatibility for 0.x branch #2811

Open
pivovarit opened this issue Sep 11, 2024 · 3 comments
Open

JDK 21-23 Compatibility for 0.x branch #2811

pivovarit opened this issue Sep 11, 2024 · 3 comments
Milestone

Comments

@pivovarit
Copy link
Member

Branch version/0.x represents a release train for "legacy" vavr and it still needs to be able to be built and verified under the newest JDKs.

At the moment, it collapses under JDK21 with:

(...)
  last tree to typer: EmptyTree
       tree position: <unknown>
            tree tpe: <notype>
              symbol: null
           call site: <none> in <none>

== Source file context for tree position ==

error: scala.reflect.internal.FatalError:
  bad constant pool index: 0 at pos: 48445
     while compiling: <no file>
        during phase: globalPhase=<no phase>, enteringPhase=<some phase>
     library version: version 2.12.6
    compiler version: version 2.12.6
@pivovarit pivovarit added this to the v0.10.5 milestone Sep 11, 2024
@micrommer
Copy link
Contributor

Hi @pivovarit ,

First of all, I’m really excited to see a new, passionate leader taking charge of the wonderful VAVR!

I compiled using the OpenJDK 64-Bit Server VM Zulu21.32+17-CA (build 21.0.2+13-LTS, mixed mode, sharing) and encountered the same exception. From what I understand, this appears to be an issue with the bytecode.

If you could provide some guidance on how to resolve this issue, I’d be happy to assist.

@pivovarit
Copy link
Member Author

Thanks! Actually, I have no clue what is the core issue here - my bet is that it's caused by outdated dependencies responsible for code generation, or Scala itself (according to scala docs, 2.12.18 is the first JDK21-friendly version)

@micrommer
Copy link
Contributor

Hi dear @pivovarit
I hope you're doing well!

Please take a look at the PR. It is probably not a comprehensive solution for the mentioned issue, but it could possibly be a path to it.
Based on my observation, the warnings are mostly related to serialization. I’ll attach the log file that shows only the warnings.
I think removing -Werror cannot be a permanent solution, and the serialization problem should be fixed.
warnings.log

Best regards

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

2 participants