RFR: 8327476: Upgrade JLine to 3.25.1

Jan Lahoda jlahoda at openjdk.org
Wed Mar 6 21:26:51 UTC 2024


This is a patch that:
a) upgrades the JLine inside the JDK to 3.25.1
b) since the new version of JLine has a FFM backend, our custom native backends are removed, and replaced with the FFM backend

Some changes had to be made to the original JLine in order to fit into the JDK. Most of them were already done for the previous version (repackaging, avoiding non-ASCII characters, commenting out logging, adding ability to modify to wrap the InputStream used by the terminal), and have only been transferred to the new one. The main two new changes are:
- fixes to the FFM backend, so that it works on Linux and JDK 22. These have been proposed to JLine itself: https://github.com/jline/jline3/pull/945
- disabling the `NativeFileDescriptorCreator`, as I believe we don't need it, and cannot make it work easily

There's a full patch between the `src/jdk.internal.le/share/classes/jdk/internal/org` and the merged content of the corresponding sources of these original JLine sub-projects:
https://github.com/jline/jline3/tree/jline-parent-3.25.1/reader
https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal-ffm
https://github.com/jline/jline3/tree/jline-parent-3.25.1/terminal
the patch is here:
https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade.diff

I've also cleaned the patch a little removing most of the changes for the rename. The result is here:
https://cr.openjdk.org/~jlahoda/8327476/jline-3.25.1-upgrade-significant.diff

-------------

Depends on: https://git.openjdk.org/jdk/pull/18106

Commit messages:
 - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1
 - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1
 - Re-enabling the exec provider.
 - Cleanup.
 - Fixing test.
 - Fixing Crl-C/VINTR handling on Linux.
 - Cleanup.
 - Enabling native access for jdk.internal.le.
 - Merge branch 'native-access-modules1' into jline-upgrade-3.25.1
 - Ctrl-C should not kill JShell.
 - ... and 8 more: https://git.openjdk.org/jdk/compare/e30e4529...d6c2072f

Changes: https://git.openjdk.org/jdk/pull/18142/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18142&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8327476
  Stats: 12893 lines in 142 files changed: 5623 ins; 5298 del; 1972 mod
  Patch: https://git.openjdk.org/jdk/pull/18142.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/18142/head:pull/18142

PR: https://git.openjdk.org/jdk/pull/18142


More information about the build-dev mailing list