julianhyde / sqlline

Shell for issuing SQL to relational databases via JDBC
BSD 3-Clause "New" or "Revised" License
618 stars 146 forks source link

Update jLine to 3.21.0 to include fix for Apple/M1 architecture #444

Closed vvysotskyi closed 2 years ago

vvysotskyi commented 2 years ago

As @cgivre noticed, SqlLine fails to start on the Apple M1 arch and fails with the following error:

Exception in thread "main" com.sun.jna.LastErrorException: [14] Bad address
    at com.sun.jna.Native.invokeVoid(Native Method)
    at com.sun.jna.Function.invoke(Function.java:415)
    at com.sun.jna.Function.invoke(Function.java:361)
    at com.sun.jna.Library$Handler.invoke(Library.java:265)
    at com.sun.proxy.$Proxy0.ioctl(Unknown Source)
    at org.jline.terminal.impl.jna.osx.OsXNativePty.getSize(OsXNativePty.java:82)
    at org.jline.terminal.impl.AbstractPosixTerminal.getSize(AbstractPosixTerminal.java:60)
    at org.jline.terminal.Terminal.getWidth(Terminal.java:196)
    at sqlline.SqlLine.getConsoleReader(SqlLine.java:594)
    at sqlline.SqlLine.begin(SqlLine.java:511)
    at sqlline.SqlLine.start(SqlLine.java:267)
    at sqlline.SqlLine.main(SqlLine.java:206)

The issue is in jLine, and was fixed in 3.21.0 (https://github.com/jline/jline3/commit/fd2589f7818d2b0ba1d88fc9011c657f92824ff8) which was released 12 hours ago, so it will appear soon in maven central;

snuyanzin commented 2 years ago

+1

just for the history: there was an issue https://github.com/jline/jline3/issues/699 between 3.18.0 and 3.21.0 that fails some sqlline's tests for completion. in 3.21.0 it has been fixed => should not be an issue to make update

snuyanzin commented 2 years ago

merged at https://github.com/julianhyde/sqlline/commit/a3029aadc2196b8554697b83364b190af1f1b022