Skip to content
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

8308591: JLine as the default Console provider #14271

Closed
wants to merge 17 commits into from

Conversation

naotoj
Copy link
Member

@naotoj naotoj commented Jun 1, 2023

This is to bring the JLine-based Console implementation as the default, which was the initial intention in JDK-8295803. A corresponding CSR has also been drafted.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Change requires CSR request JDK-8309141 to be approved
  • Commit message must refer to an issue

Issues

  • JDK-8308591: JLine as the default Console provider (Enhancement - P4)
  • JDK-8309141: JLine as the default Console provider (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14271/head:pull/14271
$ git checkout pull/14271

Update a local copy of the PR:
$ git checkout pull/14271
$ git pull https://git.openjdk.org/jdk.git pull/14271/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14271

View PR using the GUI difftool:
$ git pr show -t 14271

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14271.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 1, 2023

👋 Welcome back naoto! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Jun 1, 2023
@openjdk
Copy link

openjdk bot commented Jun 1, 2023

@naotoj The following labels will be automatically applied to this pull request:

  • core-libs
  • kulla

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org kulla kulla-dev@openjdk.org labels Jun 1, 2023
@naotoj naotoj marked this pull request as ready for review July 14, 2023 17:10
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 14, 2023
@mlbridge
Copy link

mlbridge bot commented Jul 14, 2023

Webrevs

@AlanBateman
Copy link
Contributor

This looks quite good. I think Console::isTerminal works as a method name but we might have to iterate a bit on the javadoc to more clearly define it.

For the CSR I think the behavior change to call out is that System::console will return a Console for cases where it didn't previously (at least not by default) and that will be observed by code that assumes non-null means isatty, cue the new method to provide a standard way to test this.

@naotoj
Copy link
Member Author

naotoj commented Jul 17, 2023

Thanks, Alan.

This looks quite good. I think Console::isTerminal works as a method name but we might have to iterate a bit on the javadoc to more clearly define it.

Do you think adding an implNote that describes the platform behavior, e.g., on Unix it is equivalent to calling isatty(stdin/out) and stdin/out file descriptor are valid character devices on Windows, would help?

* provided by the underlying platform, typically its input and output
* character devices are available to the {@code Console}. Otherwise it could
* mean that the implementation of the {@code Console} may simulate those
* devices within.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implNote helps as this is a difficult method to specify in a platform independent way.

The class description uses "interactive command line" and "will typically be connected to the keyboard and display" and maybe we could re-use that here. Here's a suggestion for the second paragraph:

"This method returns true if the console device, associated with the current Java virtual machine, is a terminal, typically an interactive command line connected to a keyboard and display."

I don't have any other comments on the implementation changes, they look fine.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Replaced the second paragraph with your suggested sentence.

@openjdk
Copy link

openjdk bot commented Jul 19, 2023

@naotoj This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8308591: JLine as the default Console provider

Reviewed-by: alanb

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 44 new commits pushed to the master branch:

  • b5b6f4e: 8312164: Refactor Arrays.hashCode for long, boolean, double, float, and Object arrays
  • 14cf035: 8302987: Add uniform and spatially equidistributed bounded double streams to RandomGenerator
  • d1c788c: 8312392: ARM32 build broken since 8311035
  • c119037: 8311971: SA's ConstantPool.java uses incorrect computation to read long value in the constant pool
  • 028068a: 8312166: (dc) DatagramChannel's socket adaptor does not release carrier thread when blocking in receive
  • e7adbdb: 8311923: TestIRMatching.java fails on RISC-V
  • c6ab9c2: 8308103: Massive (up to ~30x) increase in C2 compilation time since JDK 17
  • d33e8e6: 8312200: Fix Parse::catch_call_exceptions memory leak
  • f677793: 8312190: Fix c++11-narrowing warnings in hotspot code
  • 82612e2: 8312329: Minimal build failure after JDK-8311541
  • ... and 34 more: https://git.openjdk.org/jdk/compare/e73796879299c6170b63edb998439db4764ceae0...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jul 19, 2023
@naotoj
Copy link
Member Author

naotoj commented Jul 20, 2023

/integrate

@openjdk
Copy link

openjdk bot commented Jul 20, 2023

Going to push as commit bae2247.
Since your change was applied there have been 58 commits pushed to the master branch:

  • b772e67: 8312395: Improve assertions in growableArray
  • 9fa944e: 8312019: Simplify and modernize java.util.BitSet.equals
  • fe41910: 8312459: Problem list java/awt/GraphicsDevice/DisplayModes/CycleDMImage.java for macOS
  • 8d29329: 8312320: Remove javax/rmi/ssl/SSLSocketParametersTest.sh from ProblemList
  • 94eb44b: 8312394: [linux] SIGSEGV if kernel was built without hugepage support
  • 3283328: 8311130: AArch64: Sync SVE related CPU features with VM options
  • a742767: 8312246: NPE when HSDB visits bad oop
  • 37c756a: 8305506: Add support for fractional values of SafepointTimeoutDelay
  • dfe764e: 8309032: jpackage does not work for module projects unless --module-path is specified
  • 61ab270: 8310835: Address gaps in -Xlint:serial checks
  • ... and 48 more: https://git.openjdk.org/jdk/compare/e73796879299c6170b63edb998439db4764ceae0...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jul 20, 2023
@openjdk openjdk bot closed this Jul 20, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 20, 2023
@openjdk
Copy link

openjdk bot commented Jul 20, 2023

@naotoj Pushed as commit bae2247.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated kulla kulla-dev@openjdk.org
2 participants