Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8216402

Command-line help wrong for javac --module

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 12
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Docs only change, to match the existing implementation
    • Interface Kind:
      add/remove/modify command line option
    • Scope:
      JDK

      Description

      Summary

      The javac command-line help for the --module option should be changed to match the implementation.

      Problem

      The command line help for --module / -m indicates that it only takes a single module-name as an argument. In fact, it accepts a comma-separated list of names.

      In addition, this option is inconsistent with regard to other options that accept modules names. The command-line help for --module uses <module-name>, but other options just use <module> to match the runtime behavior. The runtime equivalent for --module also uses <module>.

      Solution

      Update the command-line help to indicate that it accepts a comnma-separate list of module names, represented by <module>

      Specification

      $ hg diff
      diff -r 28ec06beb091 src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties
      --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties     Tue Jan 08 13:04:04 2019 -0800
      +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties     Tue Jan 08 16:56:05 2019 -0800
      @@ -44,7 +44,7 @@
       javac.opt.sourcepath=\
           Specify where to find input source files
       javac.opt.m=\
      -    Compile only the specified module, check timestamps
      +    Compile only the specified module(s), check timestamps
       javac.opt.modulesourcepath=\
           Specify where to find input source files for multiple modules
       javac.opt.bootclasspath=\
      @@ -108,7 +108,7 @@
       javac.opt.arg.mspath=\
           <module-source-path>
       javac.opt.arg.m=\
      -    <module-name>
      +    <module>(,<module>)*
       javac.opt.arg.jdk=\
           <jdk>|none
       javac.opt.arg.dirs=\

      With those edits, the command-line help for the --module option will appear as follows:

        --module <module>(,<module>)*, -m <module>(,<module>)*
              Compile only the specified module(s), check timestamps

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jjg Jonathan Gibbons
                Reporter:
                jjg Jonathan Gibbons
                Reviewed By:
                Alan Bateman, Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: