-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8333727: Use JOpt in jpackage to parse command line #27564
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
8333727: Use JOpt in jpackage to parse command line #27564
Conversation
|
👋 Welcome back asemenyuk! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@alexeysemenyukoracle 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. |
b41135c to
7b80329
Compare
|
@alexeysemenyukoracle Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
7b80329 to
0cd5595
Compare
|
@alexeysemenyukoracle Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
0cd5595 to
6a0f15c
Compare
|
@alexeysemenyukoracle Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
6a0f15c to
20137ae
Compare
|
@alexeysemenyukoracle Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
20137ae to
c299be6
Compare
|
@alexeysemenyukoracle Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
c299be6 to
b3be7ff
Compare
|
@alexeysemenyukoracle Please do not rebase or force-push to an active PR as it invalidates existing review comments. Note for future reference, the bots always squash all changes into a single commit automatically as part of the integration. See OpenJDK Developers’ Guide for more information. |
...tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/StandardValidatorTest.java
Outdated
Show resolved
Hide resolved
...tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/StandardValidatorTest.java
Outdated
Show resolved
Hide resolved
...kage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/OptionValueExceptionFactoryTest.java
Outdated
Show resolved
Hide resolved
|
@turbanoff thank you for the review. I'll go ahead and apply all your suggested fixes. Heads up: this PR is still a draft (I accidentally moved it out of this state), it is not yet 100% ready for review. |
a61508f to
7edbaf1
Compare
|
@alexeysemenyukoracle this pull request can not be integrated into git checkout app-pkg-same-app-image-layout+JDK-8333727-merge
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
7edbaf1 to
e26c57b
Compare
f604400 to
848bfe1
Compare
…erationDescriptor. Rework BundlingEnvironment.
…and options; copy ObjectMapper from test/jdk/tools/jpackage/helpers/jdk/jpackage/test/ObjectMapper.java
…tead of `ERR_NoUniqueName`
…Resources.properties: remove unused IDs
eb57c8d to
0e7334e
Compare
Use "JOpt Simple" from jdk.internal.joptsimple package to parse jpackage command line.
All command-line parsing code is placed in a new "jdk.jpackage.internal.cli" package with 92% unit test coverage.
Error reporting improved
Command line (Windows):
Old error output:
New error output:
Help output fixed
Options in the original help output were out of order. On macOS, options were placed in wrong sections. There were trailing whitespaces.
The old help output is captured in the 3ed5383 commit.
The reordered and filtered old help output is captured in the 1a5874c commit.
Help output in this PR is captured in the 2237322 commit. Use it to see the diff between the new and old filtered and reordered help output.
Functional changes
Old tool provider implementation jdk.jpackage.internal.JPackageToolProvider had lousy thread-safety protection that didn't work when multiple instances of jpackage tool provider are created and invoked asynchronously. This patch fixes this issue. It is safe to invoke the same jpackage tool provider instance asynchronously, and also safe to invoke multiple instances of jpackage tool provider.
Like other JDK tools, jpackage will print help output if the
-?option is specified on the command line.In addition to
--option-name <value>variant to set option value, supports--option-name=<value>,-option-name=<value>,-option-name <value>variants - courtesy of jdk.internal.joptsimple package.Misc
All "params"-specific code removed.
The format of the
.jpackage.xmlfile has changed:@nameattribute of the/jpackage-state/main-launcherelement./jpackage-stateelement with the values of the main launcher properties are stored as child elements of the/jpackage-state/main-launcherelement./jpackage-state/add-launcher/serviceelement instead of the value of the/jpackage-state/add-launcher/@serviceattribute.Changes to the format of the
.jpackage.xmlfile are to simplify handling of properties of additional and the main launcher.Autogenerated summary of all recognized options (jdk/test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/jpackage-options.md).
Testing
The same testing as in the #19668 PR. Additionally, verified no unexpected diffs in the test logs after running all jpackage tests.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27564/head:pull/27564$ git checkout pull/27564Update a local copy of the PR:
$ git checkout pull/27564$ git pull https://git.openjdk.org/jdk.git pull/27564/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27564View PR using the GUI difftool:
$ git pr show -t 27564Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27564.diff