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

JLine 3.24.1 and JAnsi 2.4.0. #7419

Merged
merged 1 commit into from
Nov 2, 2023
Merged

Conversation

hvesalai
Copy link
Contributor

@hvesalai hvesalai commented Oct 26, 2023

@hvesalai
Copy link
Contributor Author

hvesalai commented Oct 26, 2023

This PR is still waiting for an update on sbt/jline2.

@hvesalai hvesalai changed the title JLine 3.24.0 and JAnsi 2.4.0. JLine 3.24.0 and JAnsi 2.4.0. Fix #7371 Oct 26, 2023
@hvesalai hvesalai changed the title JLine 3.24.0 and JAnsi 2.4.0. Fix #7371 JLine 3.24.0 and JAnsi 2.4.0. Oct 26, 2023
project/Dependencies.scala Outdated Show resolved Hide resolved
@SethTisue
Copy link
Member

SethTisue commented Oct 29, 2023

JLine 3.24 doesn't work on JDK 8 — better stop at 3.23 (reference: scala/scala-dev#856)

(I think that's what Yoshida-san is trying to alert us to, above)

@hvesalai
Copy link
Contributor Author

hvesalai commented Oct 31, 2023

JLine 3.24 contains the fix I need. I could ask the developer of JLine to backport it to 3.23.1, but I don't know how he will feel about it since no other such patch releases have been done in the past. I made the request: jline/jline3#888

Optionally we could create our own branch of JLine3 as we have done with JLine2, but at some point cleaning up the whole JLine dependency thing should be planned. I can help if there is a clear direction we are going to take.

Does this imply that scala will try to support JDK8 for ever?

@SethTisue
Copy link
Member

SethTisue commented Oct 31, 2023

Does this imply that scala will try to support JDK8 for ever?

Unclear. So far, keeping support hasn't been painful. Perhaps at some point we'll decide a tipping point has been reached for the costs of continuing support have become too high.

Anyway, it's a moot point for now, as I see that the JLine 3 maintainer just said that they will restore JDK 8 support in 3.24.1. So let's wait for that.

@SethTisue SethTisue marked this pull request as draft October 31, 2023 14:49
@hvesalai hvesalai force-pushed the jline3.24.0-jansi2.4.0 branch from f12c074 to 1f3b982 Compare November 1, 2023 19:15
@hvesalai hvesalai changed the title JLine 3.24.0 and JAnsi 2.4.0. JLine 3.24.1 and JAnsi 2.4.0. Nov 1, 2023
@hvesalai
Copy link
Contributor Author

hvesalai commented Nov 1, 2023

Updated the PR with JLine 3.24.1 (was 3.24.0)

@hvesalai
Copy link
Contributor Author

hvesalai commented Nov 1, 2023

@eed3si9n did you get a chance to release sbt/jline2 already? If you could tell the version number, I can update it to this PR.

@eed3si9n
Copy link
Member

eed3si9n commented Nov 1, 2023

Yea, I released it - https://repo1.maven.org/maven2/org/scala-sbt/jline/jline/2.14.7-sbt-9c3b6aca11c57e339441442bbf58e550cdfecb79/

@hvesalai hvesalai force-pushed the jline3.24.0-jansi2.4.0 branch from 1f3b982 to c07ee84 Compare November 1, 2023 19:25
@hvesalai hvesalai requested a review from xuwei-k November 1, 2023 19:26
@hvesalai hvesalai marked this pull request as ready for review November 1, 2023 19:26
Copy link
Member

@eed3si9n eed3si9n left a comment

Choose a reason for hiding this comment

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

Thanks!

@eed3si9n eed3si9n merged commit fb8ca26 into sbt:1.10.x Nov 2, 2023
10 checks passed
@hvesalai hvesalai deleted the jline3.24.0-jansi2.4.0 branch November 2, 2023 11:34
@lrytz
Copy link
Contributor

lrytz commented Dec 20, 2023

When I take current 1.10.x, run sbt publishLocal, then rm -rf ~/.sbt/boot/scala-2.12.18/org.scala-sbt/sbt/1.9.7-SNAPSHOT and then try 1.9.7-SNAPSHOT in a test project, I get

➜ sbtproj sbt
[info] [launcher] getting org.scala-sbt sbt 1.9.7-SNAPSHOT  (this may take some time)...
java.lang.NoClassDefFoundError: org/jline/terminal/spi/JansiSupport
	at java.base/java.lang.ClassLoader.defineClass1(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
	at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
	at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:580)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	at sbt.internal.util.JLine3$.<init>(JLine3.scala:53)
	at sbt.internal.util.JLine3$.<clinit>(JLine3.scala)
	at sbt.internal.util.Terminal$.newConsoleTerminal(Terminal.scala:805)
	at sbt.internal.util.Terminal$.withStreams(Terminal.scala:386)
	at sbt.xMain$.withStreams$1(Main.scala:88)
	at sbt.xMain$.run(Main.scala:123)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at sbt.internal.XMainConfiguration.run(XMainConfiguration.java:59)
	at sbt.xMain.run(Main.scala:47)
	at xsbt.boot.Launch$.$anonfun$run$1(Launch.scala:149)
	at xsbt.boot.Launch$.withContextLoader(Launch.scala:176)
	at xsbt.boot.Launch$.run(Launch.scala:149)
	at xsbt.boot.Launch$.$anonfun$apply$1(Launch.scala:44)
	at xsbt.boot.Launch$.launch(Launch.scala:159)
	at xsbt.boot.Launch$.apply(Launch.scala:44)
	at xsbt.boot.Launch$.apply(Launch.scala:21)
	at xsbt.boot.Boot$.runImpl(Boot.scala:78)
	at xsbt.boot.Boot$.run(Boot.scala:73)
	at xsbt.boot.Boot$.main(Boot.scala:21)
	at xsbt.boot.Boot.main(Boot.scala)
Caused by: java.lang.ClassNotFoundException: org.jline.terminal.spi.JansiSupport
	at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
	... 34 more
[error] [launcher] error during sbt launcher: java.lang.NoClassDefFoundError: org/jline/terminal/spi/JansiSupport

@hvesalai / @eed3si9n does it work for you?

@lrytz
Copy link
Contributor

lrytz commented Dec 20, 2023

macOS 14.2, OpenJDK Runtime Environment Temurin-17.0.9+9 (build 17.0.9+9)

@eed3si9n
Copy link
Member

I can reproduce the problem. The fix is to bump the version number to 1.10.0-SNAPSHOT. This is likely side effect of multi-repo (Zinc etc) using util packages from sbt/sbt but with 1.10.0-M1.

@lrytz
Copy link
Contributor

lrytz commented Dec 21, 2023

Thanks Eugene, that fixes it 👍

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

Successfully merging this pull request may close these issues.

Console broken (to varying degrees) for TERM=dumb
5 participants