-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8327476: Upgrade JLine to 3.26.1 #18142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…Based on a patch by mcimadamore.
Co-authored-by: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Co-authored-by: Maurizio Cimadamore <54672762+mcimadamore@users.noreply.github.com>
…ive-access-modules1
|
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
| TCSADRAIN = 0x1; | ||
| TCSAFLUSH = 0x2; | ||
|
|
||
| VINTR = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just curious: How did you arrive at these values? They seem like they are generated somehow. (I guess you did not just make them up and write them down here). Can that process be documented? Or saved as a script in case they ever need to be updated?
|
|
||
| static { | ||
| System.loadLibrary("msvcrt"); | ||
| System.loadLibrary("Kernel32"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency:
| System.loadLibrary("Kernel32"); | |
| System.loadLibrary("kernel32"); |
| @SuppressWarnings({"unused", "restricted"}) | ||
| final class Kernel32 { | ||
|
|
||
| public static final int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is another bunch of constants that seem generated. Is this file created by jextract? (I'm sorry, I have not played around enough with jextract to recognize the output it generates).
In any way, some documentation on how this file was created, if any kind of automation was involved, would be nice.
|
Aha, now I understand! The new files in I guess that means my comments are still valid, but should be asked upstream instead. And that you don't need to address them here. |
|
Update: since JLine 3.26.1 was release, I tried to upgrade to that directly. I made a diff of the relevant files between JLine 3.25.1 and 3.26.1, and applied that diff to our code. Some additional cleanup was done as well, as suggested by Magnus. |
|
/integrate |
|
Going to push as commit aaa90b3.
Your commit was automatically rebased without conflicts. |
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:
NativeFileDescriptorCreator, as I believe we don't need it, and cannot make it work easilyThere's a full patch between the
src/jdk.internal.le/share/classes/jdk/internal/organd 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
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18142/head:pull/18142$ git checkout pull/18142Update a local copy of the PR:
$ git checkout pull/18142$ git pull https://git.openjdk.org/jdk.git pull/18142/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 18142View PR using the GUI difftool:
$ git pr show -t 18142Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18142.diff
Webrev
Link to Webrev Comment