RFR: JDK-8264488: Improve warning for module names ending with digits
Alex Buckley
alex.buckley at oracle.com
Tue May 23 16:24:13 UTC 2023
Any warning or error message from javac is seen by tens of thousands of
people every day, so discussion is warranted, especially if changing an
older message.
The current message is:
module name component {0} should avoid terminal digits
The term "module name component" is highly unusual, and the term
"terminal digits" is hard to understand.
However, it appears the proposed message is:
module name component {0} ends with a digit. Module names should not
encode version information in module names
which preserves "module name component", reads strangely (because the
term "module names" is used twice), and has a grammatical flaw (sentence
does not end with a period).
Also, the message implies that the digits encode version information
about the module itself, but that's not true in the rather unfortunate
cases where an external brand/name is referenced, e.g., a module
relating to the PKCS11 standard or to the Olympics 2024.
Also, multi-sentence messages are unusual in compiler.properties, so
let's not have one here. Try this:
module name {0} should not end with a number, since it may be wrongly
interpreted as a version number
Alex
On 5/23/2023 8:11 AM, Sebastian Stenzel wrote:
> Since this is a rather trivial change, I didn't start a new discussion, as I deem this sufficiently discussed [back in early 2021](https://mail.openjdk.org/pipermail/discuss/2021-March/005779.html).
>
> -------------
>
> Commit messages:
> - missed to remove old message
> - update "module [...] avoid terminal digits" warning
>
> Changes: https://git.openjdk.org/jdk/pull/14099/files
> Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14099&range=00
> Issue: https://bugs.openjdk.org/browse/JDK-8264488
> Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
> Patch: https://git.openjdk.org/jdk/pull/14099.diff
> Fetch: git fetch https://git.openjdk.org/jdk.git pull/14099/head:pull/14099
>
> PR: https://git.openjdk.org/jdk/pull/14099
More information about the compiler-dev
mailing list