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

java exception during first attempt to do REPL completion by TAB in sbt console on Scala 3.4.1 #7560

Open
bjornregnell opened this issue May 16, 2024 · 3 comments
Labels

Comments

@bjornregnell
Copy link

steps

Use Scala 3.4.1 and any sbt of version 1.9.8, 1.9.9, 1.10.0.

Start the console and type Seq. and press TAB for completion.

image

problem

There is this exception when pressing TAB for the first time:

exception caught when loading class module-info: java.lang.AssertionError: assertion failed: attempt to parse java.lang.Object from classfile

expectation

There should not be an exception.

notes

It works fine with Scala 3.3.3.

REPL completion works fine with scala-cli 1.3.1 and Scala 3.4.1.

Discord discussion:
https://discord.com/channels/632150470000902164/632628489719382036/1240625302317830214

@som-snytt
Copy link
Contributor

IDK but scala 3 PR on -experimental says

Besides being a performance issue, this could also lead to a crash if the current package is the empty package, because we could end up forcing the magic module-info.class that Java modules place there. For some reason, this appear to only happen when building with sbt, hence the additional scripted test.

@bjornregnell
Copy link
Author

bjornregnell commented May 16, 2024

@som-snytt Can you also reproduce this on your machine? (So that I can relax and not worry about if it's not just my box playing tricks...)

@bjornregnell
Copy link
Author

Cross-posted here: scala/scala3#20421
If it is verified that the root cause is not sbt then this should be closed.

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

No branches or pull requests

2 participants