-
Notifications
You must be signed in to change notification settings - Fork 21
MainGenericRunner: do not load jline classes until they are needed #11654
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
Comments
Thanks, I noticed that too, when I was experimenting with class paths. |
@unkarjedy scala/docs.scala-lang#1486 looks like a report from @tahsmith of this same issue. is there any workaround? |
that link doesn't work for me? do you mean https://youtrack.jetbrains.com/issue/SCL-15948 ? |
Indeed,
But after spending a few minutes trying to remember the pieces on the garage floor, I remembered someone started a PR for JLine3, where this doesn't seem to be an issue. (Obviously, I don't remember what changed. Maybe everything.)
|
yes, the original link is to our internal ticket, I've added this link to the description |
The workaround is adding jline 2.14.6 to the classpath If you use IntelliJ non-sbt (JPS) project you should add JLine in your SDK. We will automate this workaround soon in one of the bugfix releases of Scala Plugin |
this is fixed for 2.13.2
results in a working REPL. |
just for the record, |
scala/scala#8906 restores the flag under deprecation. This is like when the company rehires you because they forgot to make you train your replacement. |
…L-17504 fixed - see scala/bug#11654
…L-17504 fixed - see scala/bug#11654
…or 2.13.2 #SCL-17504 fixed - see scala/bug#11654
In Scala Plugin we use
MainGenericRunner.main
to start Scala REPL instance. Usage example:In Scala <=2.12 It works ok even if
jline.x.jar
is not present in the classpath.Unfortunately, in 2.13 some changes were made that make it throw
java.lang.NoClassDefFoundError
exception.The behaviour is even observed if
-Xnojline
parameter (Do not use JLine for editing) is passed explicitly (https://docs.scala-lang.org/overviews/compiler-options/index.html). It's strange that it tries to resolve Jline even if it doesn't need it.AFAIU this is because some Jline stuff is still referenced in some classes and is being resolved during class loading:
related issues:
https://youtrack.jetbrains.com/issue/SCL-15948
https://youtrack.jetbrains.com/issue/SCL-15818
The text was updated successfully, but these errors were encountered: