Skip to content

Commit

Permalink
REPL: JLine: follow recommendation to use JNI, not JNA; also JLine 3.…
Browse files Browse the repository at this point in the history
…27.1 (was 3.27.0) (#22205)

as per the https://github.com/jline/jline3 readme
 
and as per discussion and linked items on #22201 

fixes #22201

note that as far as I can tell, the stuff I removed from
libexec/common-shared is dead code

@philwalk dunno if you're still around but judging from #12405 you might
be a good reviewer here

note that I believe we _don't_ need to also port
scala/scala#10889 here, since we are already
using separate JLine JARs rather than the all-in-one JAR

I've chosen not to upgrade all the way to JLine 3.28.0 at the moment, as
it is quite new (2 days ago) and doesn't appear to have any fixes that
might be critical.
  • Loading branch information
WojciechMazur authored Dec 19, 2024
2 parents 0041987 + e5e4c40 commit 7ae2d65
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions dist/libexec/common-shared
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function onExit() {
# to reenable echo if we are interrupted before completing.
trap onExit INT TERM EXIT

unset cygwin mingw msys darwin conemu
unset cygwin mingw msys darwin

# COLUMNS is used together with command line option '-pageWidth'.
if command -v tput >/dev/null 2>&1; then
Expand Down Expand Up @@ -57,8 +57,6 @@ esac

unset CYGPATHCMD
if [[ ${cygwin-} || ${mingw-} || ${msys-} ]]; then
# ConEmu terminal is incompatible with jna-5.*.jar
[[ (${CONEMUANSI-} || ${ConEmuANSI-}) ]] && conemu=true
# cygpath is used by various windows shells: cygwin, git-sdk, gitbash, msys, etc.
CYGPATHCMD=`which cygpath 2>/dev/null`
case "$TERM" in
Expand Down
6 changes: 3 additions & 3 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -763,9 +763,9 @@ object Build {
libraryDependencies ++= Seq(
"org.scala-lang.modules" % "scala-asm" % "9.7.0-scala-2", // used by the backend
Dependencies.compilerInterface,
"org.jline" % "jline-reader" % "3.27.0", // used by the REPL
"org.jline" % "jline-terminal" % "3.27.0",
"org.jline" % "jline-terminal-jna" % "3.27.0", // needed for Windows
"org.jline" % "jline-reader" % "3.27.1", // used by the REPL
"org.jline" % "jline-terminal" % "3.27.1",
"org.jline" % "jline-terminal-jni" % "3.27.1", // needed for Windows
("io.get-coursier" %% "coursier" % "2.0.16" % Test).cross(CrossVersion.for3Use2_13),
),

Expand Down

0 comments on commit 7ae2d65

Please sign in to comment.