-
Notifications
You must be signed in to change notification settings - Fork 6k
8271356: Modify jdb to treat an empty command as a repeat of the previous command #5290
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
👋 Welcome back jakobcornell! A progress list of the required criteria for merging this PR into |
@jakobcornell The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
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.
I'm not sure how to advise about the Chinese or Japanese localization. I don't know what the process is for getting the text updated and properly tested. Hopefully someone else has that knowledge and will comment.
What testing have you done? There are jdb tests in test/hotspot/jtreg/vmTestbase/nsk/jdb
. You'll also need to write some tests for the new functionality.
src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java
Outdated
Show resolved
Hide resolved
src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java
Outdated
Show resolved
Hide resolved
src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java
Outdated
Show resolved
Hide resolved
I think the main reason the diff was so unhelpful is that part of my original change was converting the However, reverting to the recursive approach and restoring some original variable names has made the diff much easier to understand. I do have the iterative version saved on a local branch in case it becomes useful. I've run the tests you indicated ( |
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 think overall it looks good. Still need tests and still need to resolve the localization issues.
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've added fairly thorough tests for the new stuff in this branch, including command repetition, list auto-advance, and the tentative new behavior of the =>
indicator in listings.
Chris, do you think I should give the Chinese and Japanese localizations a shot? I do actually know a little Chinese, but the Japanese would basically just be whatever Google Translate says. Or maybe during the CSR review somebody will be able to help? Not really sure how to proceed.
I would hold off on this. I'm trying to find out the proper process for getting this done. It shouldn't be left to individuals trying to push new changes. |
Looks like nothing needs to be done for localization. Theses files are in an internal list to automatically get translated at some point in the future. |
Thanks for following up on that Chris. Are there any outstanding changes that need to be made to the PR then, or are we waiting for the CSR process? |
I think we can do the CSR now. I got it started with https://bugs.openjdk.java.net/browse/JDK-8274167. If you could fill out the Description section and send it to me (posting here is fine), then I'll paste it in the CR and then ask for someone on our team to review it (I probably shouldn't be the reviewer). |
Great, thanks Chris. Before I write that up I think we need to clarify something with regard to compatibility. In the CSR ticket you mention that behavior is only changed with repeat turned on, but I made a change to how the list marker ( So we're going to have to decide whether to include this change. I think it would be confusing for this behavior to be switchable by the |
Ok. I think the list marker change is fine. I don't expect compatibility issues due to it, but yes we do need to all that out in the CSR. |
Okay great, that's what I was thinking as well. Here's a draft for the description section; while writing this up I realized I forgot to implement one aspect of the SummaryAdd automatic command repetition and ProblemThe overall problem is that JDB is not as ergonomic as other command line debuggers like GDB and PDB (the Python debugger). In particular:
SolutionA new command is added to make the new functionality available on an opt-in basis. The user may enter
An alternative way to address the usability concerns is to integrate Jline into JDB, for an experience similar to that of Jshell. While this is conceptually simpler, there was concern that the extent of the code changes necessary for this integration would be too large compared to the benefit [3]. [1] The repeatable commands are: SpecificationTo my knowledge the behavior of JDB is only specified to the extent of its help and usage messages, which are updated as appropriate in the accompanying pull request. |
I updated the CSR. One section I'd like to see improved is the readability of the Problem section. The middle sentence is long winded and hard to read. Perhaps a bullet list would be better. Also I think the repeatable commands and listing reset commands should be explicitly listed instead of referencing a diff. I made this change already. Also, no need to reference the PR from the CSR. |
Mailing list message from Jakob Cornell on serviceability-dev:
Right you are. I've revised it to use bullet points, and while I've added a bit more detail to each they should be easier to follow. If not, let me know and I can do some condensing. Jakob |
Hey Chris, is there any update on this? I've revised the Problem section so I think we're waiting on the CSR ticket to be updated accordingly and for someone to be assigned for the CSR review. |
/csr needed |
Ok. I updated the CSR with your changes. I'll try to find someone to review it. |
@plummercj this pull request will not be integrated until the CSR request JDK-8274167 for issue JDK-8271356 has been approved. |
@plummercj Looks like Serguei Spitsyn approved this about a week ago, so I wanted to make sure this is moving along. Is the CSR proposal now approved or is there a need for another reviewer? |
It looks like it needed for me to click on "finalize" so I've done that. Now it is in the "Finalized" state and is I believe waiting final approval by the CSR committee, which I think will result in closing the CSR as "Approved", and you can then complete the review of the PR and push the changes. |
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.
Hi Jacob, this is not your fault, but the "zz help text" in the Chinese and Japanese versions are in a single huge line. This makes it impossible to see what you have changed in the GitHub diffs, and impossible to tell whether you made any typos in the process.
I would recommend making a prerequisite PR first:
- Break the huge lines in those two files in the same way as TTYResources.java. Verify that TTYResources_ja.class, etc, are identical to the previous version. Integrate into openjdk.
- Revert the changes of those two files in the current PR
- Merge with the prerequisite PR
- Add the new lines into those two files
Thanks
- Ioi
@jakobcornell 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 1051 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@plummercj, @iklam) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Thanks Chris. @iklam, would you be able to review these changes again? |
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
/summary |
@jakobcornell To set a summary, use the syntax |
/integrate |
@jakobcornell |
@plummercj Looks like this is all ready to go then. Would you be willing to sponsor it for integration? |
Yes. I'm doing some testing with our CI now. I'll integrate once that is done. |
/sponsor |
Going to push as commit fe6a202.
Your commit was automatically rebased without conflicts. |
@plummercj @jakobcornell Pushed as commit fe6a202. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Thanks again, Chris and Ioi! |
@jakobcornell It looks like we have a couple of intermittent test failures that need investigating. Can you please have a look at JDK-8276208? Thanks. |
Just verified that this test still passes for me locally on LInux. I see from Daniel's test logs where the behavior is differing on the Windows build, and I'll see if I can reproduce it on a Windows system. I'll also look into fixing the issue of the Should I open a new pull request linked to 8276208 for these changes? |
I would suggest either
But those are all in jdi and jdwp tests. Jdb tests seem to almost alway use the |
The PR for 8276208 should contain the fix for the failures. If you want to also clean up the AssertionError issue at the same time, that's ok, or I can file a separate CR for that part if you wish. |
Okay, I'll change those tests to use Also, Daniel's failing Windows build seems to be caused by the command On both of these items, I'm not sure how to proceed. |
The JDK build issue is resolved (thanks David Holmes). The switch to |
Yes, I made it a draft because it's not ready for review yet. I'll undo that though to allow the email system to work. Thanks for the heads up. |
Mailing list message from David Holmes on serviceability-dev: On 1/11/2021 1:19 pm, Jakob Cornell wrote:
That issue was a problem with the boot JDK being too old. make sure you Cheers, |
This has been under discussion on and off for the past month or so on serviceability-dev, and I think a CSR request is required, so this may be a work in progress.
Notes on the patch:
list
command previously marked a line in each listing with=>
. In a barelist
this is the next line up for execution. Previously when requesting a specific location (e.g.list 5
) the requested line would be marked. With the patch applied,list
will only ever mark the next line up for execution. This is consistent with the behavior of GDB and PDB (at least).EOF
is printed when the repeat setting is on and a barelist
command follows a listing containing the last source line. This feature is from PDB; it's a somewhat softer message than the one for an explicitlist
request that's out of range.Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5290/head:pull/5290
$ git checkout pull/5290
Update a local copy of the PR:
$ git checkout pull/5290
$ git pull https://git.openjdk.java.net/jdk pull/5290/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 5290
View PR using the GUI difftool:
$ git pr show -t 5290
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5290.diff