JDK-8230649 : Make jpackage tool an experimental feature
  • Type: Enhancement
  • Component: tools
  • Sub-Component: jpackage
  • Affected Version: internal
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-09-05
  • Updated: 2019-09-26
  • Resolved: 2019-09-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
internalFixed
Related Reports
Relates :  
Description
We wish to propose jpackage as an experimental feature. That would give us the freedom to improve it incompatibly over one or two release cycles before it is commit to a final version.

There is no formal provision for experimental tools, in the same sense that there is for language features, but it will be sufficient to do the same in principal. We should use the option for generating the jmod described in JEP 11 (see the Description section). It should produce a warning whenever the jdk.jpackage module is resolved, and 'jpackage --help' should indicate that it is experimental and subject to change.

In the JEP, we would add [experimental] in title and in the Description.
Comments
as initial proposal I have used : WARNING: Using experimental tool jpackage webrev: http://cr.openjdk.java.net/~herrick/8230649/webrev.03/
26-09-2019

We cannot use the JMOD_FLAG --warn-if-resolved=incubating because jdk.jpackage eagerly participates in service binding because it "provides java.util.spi.ToolProvider" In this case, java.base uses ToolProvider so jdk.jpackage will be resolved when it is observable. As a result the warning would show when running any java tool, even "java -version". Would it be sufficient for us to: 1.) set the JMOD_FLAG --do-not-resolve-by-default for jpackage module. 2.) output the warning message from jpackage itself when it is invoked (either by running tool or calling from tool provider interface.) A.) since jdk.jpackage does not export any public API, what would be the purpose of setting JMOD_FLAG --do-not-resolve-by-default ? B.) The warning resulting from setting JMOD_FLAGS --warn-if-resolved was: WARNING: Using incubator modules: jdk.jpackage what is the appropriate message if we put message in jpackage itself ?
16-09-2019

webrev: http://cr.openjdk.java.net/~herrick/8230649/webrev.01/
15-09-2019

The only other change for this initial implementation of "make this tool an experimental feature" is in tests when looking at the output of jpackage commands, ignore the warning: "WARNING: Using incubator modules: jdk.jpackage "
15-09-2019

JEP 11 says experimental code should be moved to the jdk.incubator package so that standard makefiles will add flags : JMOD_FLAGS += --do-not-resolve-by-default JMOD_FLAGS += --warn-if-resolved=incubating I haven't changed the packaging to move jpackage code from jdk.jpackage to jdk.incubator.jpackage. Instead I added lines in CreateJmods.gmk to add these flags if module is jdk.jpackage, It is now getting warning: WARNING: Using incubator modules: jdk.jpackage both building and running and working to adjust the tests accordingly.
15-09-2019

That seems like a good approach. We want to use the same mechanism as incubator modules, but leave it in the jdk.jpackage module.
13-09-2019