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

Make REPL work again on Mac M1 (upgrade JLine & JNA) #9807

Merged
merged 1 commit into from Nov 14, 2021

Conversation

SethTisue
Copy link
Member

fixes scala/bug#12491 (REPL support on M1)

@SethTisue
Copy link
Member Author

I don't have an M1 to test on. @xuwei-k would you be able to give this a try?

for testing, you can check out my branch, then run sbt dist/mkPack, then run ./build/pack/bin/scala to run the REPL. (I guess you should also verify that the same method of testing on master shows the bug.)

@SethTisue SethTisue added the prio:blocker release blocker (used only by core team, only near release time) label Nov 11, 2021
Copy link
Contributor

@xuwei-k xuwei-k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 🎉

$ ./build/pack/bin/scala 
Welcome to Scala 2.13.8-20211111-150758-2152d38 (OpenJDK 64-Bit Server VM, Java 17.0.1).
Type in expressions for evaluation. Or try :help.

@SethTisue
Copy link
Member Author

SethTisue commented Nov 11, 2021

sweeeeet. thank you Yoshida-san!

@SethTisue SethTisue added the release-notes worth highlighting in next release notes label Nov 11, 2021
Copy link
Member

@joroKr21 joroKr21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just gonna report a bug and it's already fixed 🚀

@SethTisue SethTisue removed the prio:blocker release blocker (used only by core team, only near release time) label Nov 14, 2021
@SethTisue SethTisue merged commit b8cc1f7 into scala:2.13.x Nov 14, 2021
@SethTisue SethTisue deleted the jline-3.21 branch November 14, 2021 03:25
@SethTisue SethTisue changed the title JLine 3.21.0 / JNA 5.9.0 (was 3.20.0 / 5.8.0) Fix REPL on Mac M1 (upgrade to JLine 3.21.0 / JNA 5.9.0) Nov 14, 2021
@SethTisue SethTisue added the tool:REPL Changes in the Scala REPL Interpreter label Nov 14, 2021
@SethTisue SethTisue changed the title Fix REPL on Mac M1 (upgrade to JLine 3.21.0 / JNA 5.9.0) Fix REPL on Mac M1 (upgrade JLine & JNA) Nov 14, 2021
@retronym
Copy link
Member

retronym commented Nov 23, 2021

As a workaround, you can use coursier to launch a released version of the REPL with the new versions of JNA/JLine

$ cs launch scala:2.12.15 -V org.jline:jline:3.21.0 -V net.java.dev.jna:jna:5.9.0 -- -nc -e 'println(sys.props("os.arch"))'
aarch64

Or, disable use of JNA to interact with the terminal:

 cs launch scala:2.12.15 -J-Dorg.jline.terminal.jna=false -- -nc -e 'println(sys.props("os.arch"))'
aarch64

@lrytz
Copy link
Member

lrytz commented Nov 25, 2021

As a workaround

Another workaround is to switch to a x86 JDK for running the REPL

@SethTisue SethTisue changed the title Fix REPL on Mac M1 (upgrade JLine & JNA) Make REPL work again on Mac M1 (upgrade JLine & JNA) Dec 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes tool:REPL Changes in the Scala REPL Interpreter
Projects
None yet
6 participants