Update to ncurses causes sbt to throw an exception on startup
See original GitHub issueAfter upgrading ncurses
, starting sbt
shows the following error:
amu ~ >sbt
[ERROR] Failed to construct terminal; falling back to unsupported
java.lang.NumberFormatException: For input string: "0x100"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at jline.internal.InfoCmp.parseInfoCmp(InfoCmp.java:59)
at jline.UnixTerminal.parseInfoCmp(UnixTerminal.java:233)
...
This is because of a recent update to ncurses
: http://invisible-island.net/ncurses/NEWS.html#index-t20170506
+ modify tic/infocmp display of numeric values to use hexadecimal when
they are "close" to a power of two, making the result more readable.
steps
I’m using Arch Linux and have ncurses updated from 6.0+20170429-1
to 6.0+20170527-1
. Just run sbt
after installing the newest version and the error will appear.
problem
sbt
uses jline
for some terminal stuff. jline
itself uses the infocmp
utility provided by ncurses
to determine terminal capabilities. It didn’t expect a hex value and only parsed decimal values. This behaviour was already fixed: https://github.com/jline/jline2/commit/c1b1676de1803278289af0622ad202f1c7a526ec
sbt
should update its jline
dependency to include the fix.
expectation
sbt
should start without issues.
notes
Using sbt version 0.13.15
.
Is it possible to force sbt
to use a locally compiled version of jline
?
Stackoverflow issue: https://stackoverflow.com/q/44317384/2014080 jline issue: https://github.com/jline/jline2/issues/281
Issue Analytics
- State:
- Created 6 years ago
- Reactions:29
- Comments:42 (17 by maintainers)
I found using
export TERM=xterm-color
better than downgrading ncursesjline-2.14.4 is out with the fix