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

Closed
pivovarit opened this issue Sep 11, 2024 · 8 comments
Closed

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

pivovarit opened this issue Sep 11, 2024 · 8 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

@KrnSaurabh
Copy link
Contributor

Hi @pivovarit , I also see -Werror warnings related to serialization problem with JDK21. I am able to build version/0.x branch on JDK8/JDK17/JDK21 simultaneously. I can work on fixing those serialization issues. Please let me know if we want to put effort towards the same.

@pivovarit
Copy link
Member Author

pivovarit commented Sep 28, 2024

Yes, we should handle those - I guess that would be the last thing we could fix before releasing 0.10.5 :) I'm in US now and might be slow to respond.

The problems are caused, most likely, by missing Serializable marker interface somewhere in the type hierarchy

@KrnSaurabh
Copy link
Contributor

no issues. I will work on the changes. Thanks for the info.

@pivovarit
Copy link
Member Author

fyi: #2857

@pivovarit
Copy link
Member Author

I believe this is done :) thanks everyone!

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