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

Ammonite REPL cannot run on Java 21 #1380

Closed
guofengzh opened this issue Oct 18, 2023 · 2 comments
Closed

Ammonite REPL cannot run on Java 21 #1380

guofengzh opened this issue Oct 18, 2023 · 2 comments

Comments

@guofengzh
Copy link

Because of the issue ClassfileParser: allow missing param names (for JDK 21), Ammonite REPL cannot run on Java 21.

Scala 3.3.1 has fixed its issue. It is kind to release a new Ammonite version that supports Scala 3.3.1 soon.

When runs Ammonite on Java 21, I got:

Loading...
Welcome to the Ammonite Repl 2.5.11 (Scala 3.2.2 Java 21)
@ error while loading ElementType,
class file java/lang/annotation/ElementType.class is broken, reading aborted with class java.lang.RuntimeException
bad constant pool index: 0 at pos: 1220
error while loading AccessFlag,
class file java/lang/reflect/AccessFlag.class is broken, reading aborted with class java.lang.RuntimeException
bad constant pool index: 0 at pos: 5189
@typingArtist
Copy link
Contributor

The version 3.0.0-M0 release contains builds against Scala 3.3.1 from the 3.3-3.0.0-M0-53-084f7f4e build onwards. This and any following builds against Scala 3.3 work. This was released on Sep 13. The latest 2.5.11 release is from Sep 28 and doesn’t contain builds against Scala 3.3 as of now.

@lolgab
Copy link
Member

lolgab commented Nov 17, 2023

Closing since this works on Ammonite versions published for Scala 3.3.1.
Install the latest with:

sh -c '(echo "#!/usr/bin/env sh" && curl -L https://github.com/com-lihaoyi/Ammonite/releases/download/3.0.0-M0/3.3-3.0.0-M0-59-cdeaa580) > /usr/local/bin/amm && chmod +x /usr/local/bin/amm' && amm

@lolgab lolgab closed this as completed Nov 17, 2023
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

No branches or pull requests

3 participants