RFR: 8248843: java in source-file mode suggests javac-only options
Vicente Romero
vromero at openjdk.java.net
Mon May 24 21:52:05 UTC 2021
On Tue, 18 May 2021 14:09:07 GMT, Adam Sotona <asotona at openjdk.org> wrote:
> `java` in source-file mode (see JEP 330) displays compiler notes suggesting `recompile with -Xdiags:verbose to get full output`. According JEP 330 these advanced `javac` optionns are not allowed. The goal with JEP 330 was to support developers that are at the early stages of learning Java, so options such as `-Xdiags:verbose` are out of their scope.
>
> This patch prevents displaying `Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output` suggestion in `java` source-file mode by implicitly enabling `-Xdiags:verbose` in com.sun.tool.javac.launcher.Main for all invocations.
>
> Beside avoiding prohibited `javac` option suggestion notes this patch has positive effect of more verbose compilation diagnostic. Higher diagnostic verbosity is appreciated by users learning Java on single-source programs in `java` source-file mode.
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4094
More information about the compiler-dev
mailing list