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

8346773: Fix unmatched brackets in some misc files #22861

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

MaxXSoft
Copy link
Member

@MaxXSoft MaxXSoft commented Dec 23, 2024

This patch fixes unmatched brackets in some files, mostly in comments, docs and man pages.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (3 reviews required, with at least 3 Reviewers)

Issue

  • JDK-8346773: Fix unmatched brackets in some misc files (Enhancement - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22861

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 23, 2024

👋 Welcome back qxing! 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
Copy link

openjdk bot commented Dec 23, 2024

@MaxXSoft This change is no longer ready for integration - check the PR body for details.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 23, 2024
@openjdk
Copy link

openjdk bot commented Dec 23, 2024

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

  • build
  • client
  • compiler
  • core-libs
  • hotspot
  • i18n
  • serviceability

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.

@mlbridge
Copy link

mlbridge bot commented Dec 23, 2024

Webrevs

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

I can really only review the doc files and the Makefile.

@@ -172,7 +172,7 @@ Provide informative, but not too verbose error messages.
All GoogleTest asserts print compared expressions and their values, so
there is no need to have them in error messages. Asserts print only
compared values, they do not print any of interim variables, e.g.
`ASSERT_TRUE((val1 == val2 && isFail(foo(8)) || i == 18)` prints only
`ASSERT_TRUE(val1 == val2 && isFail(foo(8)) || i == 18)` prints only
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this expression, I believe the intention is this.

Suggested change
`ASSERT_TRUE(val1 == val2 && isFail(foo(8)) || i == 18)` prints only
`ASSERT_TRUE((val1 == val2 && isFail(foo(8))) || i == 18)` prints only

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 for the suggestion, updated.

@@ -1082,7 +1082,7 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<type key="calendar" type="indian">ಭಾರತೀಯ ರಾಷ್ಟ್ರೀಯ ಕ್ಯಾಲೆಂಡರ್</type>
<type key="calendar" type="islamic">ಇಸ್ಲಾಮಿಕ್ ಕ್ಯಾಲೆಂಡರ್</type>
<type key="calendar" type="islamic-civil">ಇಸ್ಲಾಮಿಕ್-ಸಿವಿಲ್ ಕ್ಯಾಲೆಂಡರ್</type>
<type key="calendar" type="islamic-rgsa" draft="contributed">ಇಸ್ಲಾಮಿಕ್‌ ಕ್ಯಾಲೆಂಡರ್‌ (ಸೌದಿ ಅರೇಬಿಯಾ, ಸೈಟಿಂಗ್‌)bia, sighting)</type>
<type key="calendar" type="islamic-rgsa" draft="contributed">ಇಸ್ಲಾಮಿಕ್‌ ಕ್ಯಾಲೆಂಡರ್‌ (ಸೌದಿ ಅರೇಬಿಯಾ, ಸೈಟಿಂಗ್‌)</type>
Copy link
Member

Choose a reason for hiding this comment

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

Hi, we would not modify the contents of upstream data from CLDR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I've reverted these changes in the latest commit.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

I strongly suggest avoiding omnibus changes like this when possible (which it
is here). Just because it's all about one "kind" of change doesn't make it a
cohesive change. This is touching many distinct areas of the JDK, and several
different languages as well. That makes it harder to review and to manage the
review, because it is large and affects a wide range of areas, so may need
many reviewers. And the whole thing might get stalled by discussion of one
piece.

There is also no mention of what testing has been done for this PR. Some of
the changes are in executable code, and need to be tested.

I think that all of the files in make/data/cldr/common are from the Unicode
Consortium, and should not be modified here.

@@ -245,7 +245,7 @@ <h3 id="error-messages">Error messages</h3>
<p>All GoogleTest asserts print compared expressions and their values,
so there is no need to have them in error messages. Asserts print only
compared values, they do not print any of interim variables, e.g.
<code>ASSERT_TRUE((val1 == val2 &amp;&amp; isFail(foo(8)) || i == 18)</code>
<code>ASSERT_TRUE(val1 == val2 &amp;&amp; isFail(foo(8)) || i == 18)</code>

Choose a reason for hiding this comment

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

This file is generated from the .md file, and should not be edited directly.

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated both .md and .html using make update-build-docs in the latest commit.

@@ -47,7 +47,7 @@ LIB_FILES = $(shell find $(TESTLIBRARY_DIR)/jdk/test/lib/ \
$(TESTLIBRARY_DIR)/jdk/test/lib/process \
$(TESTLIBRARY_DIR)/jdk/test/lib/util \
$(TESTLIBRARY_DIR)/jtreg \
-maxdepth 1 -name '*.java'))
-maxdepth 1 -name '*.java')

Choose a reason for hiding this comment

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

I wonder why this hasn't caused problems and been found long ago? Does make just drop that stray
close-paren?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've tested this by running make, and the previous Makefile reports an error like file test/lib/jtreg/SkippedException.java) not found. So this fix is necessary.

I also checked the git log, this change was introduced in #22420, not that long ago.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, apparently this is not run as part of tier 1-3, which I ran in my patch. I wonder how this test is run. And it means this patch needs to be backported to 24.

Choose a reason for hiding this comment

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

Only this small piece would be appropriate for backport to 24. I suggest splitting this out into its own bug,
fixing it in isolation, and backporting that.

Choose a reason for hiding this comment

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

The purpose of this Makefile seems to be to build ctw.jar. So far as I can tell, nothing in the JDK uses that jar,
or invokes that Makefile. There are some tests for the ctw component in hotspot/jtreg/testlibrary_tests/ctw. I
think if you ran tier4 testing that you would hit those. Or you could use TEST=hotspot:hotspot_misc, or
specify that directory. But those tests don't appear to use that jar. So I think there isn't a test that touches
this Makefile.

Copy link
Member

Choose a reason for hiding this comment

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

This makefile is not used by jtreg tests. The ctw code is compiled with
@library /test/lib / /testlibrary/ctw/src
so jtreg compiled the ctw library files itself.
This makefile might be used for standalone build if needed.
Thanks for fixing this!

@@ -61,8 +61,6 @@
.landscapeArea { page: land; width: 1010px; page-break-before: always; }

@page { margin: 0.1in; }

}

Choose a reason for hiding this comment

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

Does this affect the behavior of the test this is part of?

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted.

<?xml version="1.0" encoding="UTF-8"?>
<oscars xmlns:osc-results="http://www.fatdog.com/oscar-results"

Choose a reason for hiding this comment

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

I can't tell whether anything was changed in this file other than the modification of all the end of
line indicators. I've no idea whether changing those is appropriate or not, but this file came from
a 3rd party, so might not be appropriate to change here.

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to all of that. This change is un-reviewable.

<?xml version="1.0" encoding="UTF-8"?>
<oscars xmlns:osc-results="http://www.fatdog.com/oscar-results"

Choose a reason for hiding this comment

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

Does this change affect the behavior of the associated test(s)?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was also wondering how this was tested.

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, the way to test this is ..
cd test/jdk
jtreg sanity/client/SwingSet/src/TableDemoTest.java

I tried converting all ^M to \n in this file another repo and comparing with your patch but every line was different so I just can't review this.

Copy link
Member Author

Choose a reason for hiding this comment

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

For safety reasons I've restored this file as well as all the files in unit tests.

@kimbarrett
Copy link

That makes it harder to review and to manage the review, because it is large and affects a wide range of areas, so may need many reviewers.

And many of the appropriate reviewers might be unavailable for a while, since it's right before Christmas.

@prrace
Copy link
Contributor

prrace commented Dec 23, 2024

/reviewers 3 reviewer

@openjdk
Copy link

openjdk bot commented Dec 23, 2024

@prrace Only the author (@MaxXSoft) is allowed to issue the reviewer command.

@prrace
Copy link
Contributor

prrace commented Dec 23, 2024

That makes it harder to review and to manage the review, because it is large and affects a wide range of areas, so may need many reviewers.

And many of the appropriate reviewers might be unavailable for a while, since it's right before Christmas.

I think at the very least this needs multiple reviewers. Even 2 isn't enough considering it is so cross-area.
It went to 7 different mailing lists, so that should tell you something !

@erikj79
Copy link
Member

erikj79 commented Dec 24, 2024

/reviewers 2

@openjdk
Copy link

openjdk bot commented Dec 24, 2024

@erikj79
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

Copy link
Member

@erikj79 erikj79 left a comment

Choose a reason for hiding this comment

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

I've reviewed doc/hotspot-unit-tests.* and the Makefile.

Copy link
Member

@liach liach left a comment

Choose a reason for hiding this comment

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

Thanks for the ctw fix.

/reviewers 3 reviewer

@@ -47,7 +47,7 @@ LIB_FILES = $(shell find $(TESTLIBRARY_DIR)/jdk/test/lib/ \
$(TESTLIBRARY_DIR)/jdk/test/lib/process \
$(TESTLIBRARY_DIR)/jdk/test/lib/util \
$(TESTLIBRARY_DIR)/jtreg \
-maxdepth 1 -name '*.java'))
-maxdepth 1 -name '*.java')
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, apparently this is not run as part of tier 1-3, which I ran in my patch. I wonder how this test is run. And it means this patch needs to be backported to 24.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 24, 2024
@openjdk
Copy link

openjdk bot commented Dec 24, 2024

@liach
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 3 (with at least 3 Reviewers).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Dec 24, 2024
Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

The fix for the ctw Makefile should not be included in this PR. It's a bug, and needs
to be fixed separately and backported to 24 to fix the introduction there via the
backport of JDK-8334733 from 25 to 24, without dragging the rest of this back to 24.

@MaxXSoft
Copy link
Member Author

@kimbarrett @liach Thanks for your suggestions!

I've moved the fix for the CTW Makefile to a separate pull request: #22878, please check it.

Copy link

@kimbarrett kimbarrett left a comment

Choose a reason for hiding this comment

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

Looks good.

@AlanBateman
Copy link
Contributor

/label remove i18n
/label remove client

@openjdk
Copy link

openjdk bot commented Dec 26, 2024

@AlanBateman
The i18n label was successfully removed.

@openjdk
Copy link

openjdk bot commented Dec 26, 2024

@AlanBateman
The client label was successfully removed.

Copy link
Contributor

@AlanBateman AlanBateman left a comment

Choose a reason for hiding this comment

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

The title on the JBS issue is a mis-leading as it's now about man pages, docs, and a comment. Looks okay.

@MaxXSoft MaxXSoft changed the title 8346773: Fix unmatched brackets in source files 8346773: Fix unmatched brackets in some misc files Dec 26, 2024
@MaxXSoft
Copy link
Member Author

@AlanBateman Thanks for the review! I updated the title of the JBS issue and this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

8 participants