-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8247403: JShell: No custom input (e.g. from GUI) possible with JavaShellToolBuilder #2509
Conversation
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
LGTM
@lahodaj 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:
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 676 new commits pushed to the
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 |
… sent to the output stream more consistent with the legacy behavior.
…the output terminal size.
It turned out some users/clients of JavaShellToolBuilder do not attach a full terminal to it, but rather parse the output, and since we have changed the output by using a newer JLine, this became more complicated. So the new iteration of the patch supports two modes: a (default) simpler mode, which does not use escape sequences much, and a more for real terminals, where JShell will use escape sequences to provide a good experiment to a user reading on the terminal. Please also see the associated CSR: |
/csr |
@vicente-romero-oracle this pull request will not be integrated until the CSR request JDK-8265966 for issue JDK-8247403 has been approved. |
in the CSR and in the new method spec, please consider adding in the @implSpec section a mention to that the provided default implementation does something in the lines of:
apart from this I think the patch is good to go |
/integrate |
@lahodaj Since your change was applied there have been 728 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 2c8e94f. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
@@ -4157,7 +4157,7 @@ private AttributedString expandPromptPattern(String pattern, int padToWidth, | |||
} else | |||
sb.append(ch); | |||
} | |||
if (padToWidth > cols) { |
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.
Random blast-from-the-past question: would it be appropriate to submit this change back to the jline project? It doesn't appear to be in the current jline3 master.
Basically, JShell's ConsoleIOContext always uses the JLine's default terminal, which uses System.in, or equivalent, for input. But, if the JShell tool has been created using JavaShellToolBuilder, a different input might have been provided. The proposed solution is to use a different JLine's terminal in this case, based on the provided input.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/2509/head:pull/2509
$ git checkout pull/2509
Update a local copy of the PR:
$ git checkout pull/2509
$ git pull https://git.openjdk.java.net/jdk pull/2509/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2509
View PR using the GUI difftool:
$ git pr show -t 2509
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/2509.diff