On Tue, 28 Apr 2026 15:27:06 GMT, Jan Lahoda <[email protected]> wrote:
>> This upgrades the JLine embedded in the JDK to JLine 4.0.12. >> >> The upgrade as such was not very difficult, but for historical reasons was >> done in two steps: I first upgraded to 4.0.9 using a usual process of taking >> a diff between existing master and the corresponding JLine (3.29.0 in this >> case), then replacing it with unmodified new version of JLine and >> re-applying the patch. The I upgraded from 4.0.9 to 4.0.12 by applying just >> the relevant differences between these two versions. >> >> Other important notes: >> - I had to manually disable running of infocmp: >> https://github.com/lahodaj/jdk/blob/1455a3279f9261ca9ee8590172b1e4d1fc5e35ca/src/jdk.internal.le/share/classes/jdk/internal/org/jline/utils/InfoCmp.java#L606 >> ; `jdk.internal.le` will implicitly now fallback on `ansi` if it does not >> recognize the terminal. >> - when reading a password on a dumb terminal, the new JLine uses a >> background thread to remove the password from the terminal. To keep tests >> stable and predictable, I had to add a way to disable this, see: >> https://github.com/lahodaj/jdk/blob/1455a3279f9261ca9ee8590172b1e4d1fc5e35ca/src/jdk.internal.le/share/classes/jdk/internal/org/jline/reader/impl/LineReaderImpl.java#L95 >> and the usages. >> - the new JLine has some support for graphics on the terminal, but that >> requires a dependency on `java.desktop`, and we don't have a use for it at >> this time. And the graphics support is fairly standalone, can be >> avoided/not-included. So this upgrade is not including this graphics support. >> >> To potentially help with the review, this is the patch between JLine 3.29.0 >> and master: >> https://cr.openjdk.org/~jlahoda/8381868/jline-patch-3.29.0-2.diff >> >> this is the patch between JLine 4.0.12 and the code proposed in this PR: >> https://cr.openjdk.org/~jlahoda/8381868/jline-patch-4.0.12.diff >> >> and this is a meta-diff between these two diffs: >> https://cr.openjdk.org/~jlahoda/8381868/diff-of-diffs-3.29.0-4.0.12.diff >> >> the meta diff is not straightforward to read, but I went through it, and it >> seems OK to me. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Jan Lahoda has updated the pull request incrementally with one additional > commit since the last revision: > > Using \u2500, which matches the upstream character. (#13) Marked as reviewed by asotona (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/30767#pullrequestreview-4190148901
