-
Notifications
You must be signed in to change notification settings - Fork 745
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
Check that -XDshould-stop.ifError=FLOW
is set when running Error Prone
#4618
Conversation
This is necessary to ensure javac compiles the 'flow' phase for subsequent compilation units after Error Prone reports diagnostics. The 'flow' phase is necessary among other things to set `EFFECTIVELY_FINAL`. Configuring a later stop policy also causes more diagnostics to be shown at once for failing builds when using `-XDcompilePolicy=simple`, which is helpful. #4595 RELNOTES=The javac flag `-XDshould-stop.ifError=FLOW` is now required when running Error Prone, see #4595 PiperOrigin-RevId: 686102738
77d732e
to
5828416
Compare
@cushon Do you know off-hand if versions of ErrorProne before 2.11 (those versions compatible with JDK 8) would benefit from the JDK 8 Fwiw, I won't write a test for that; I apparently can just pass both options and javac doesn't care and just ignores the unknown one, but if you tell me it's useless to pass the JDK 8 variant then I'll just pass the JDK 9+ variant. |
Yes, I believe the same behaviour exists in JDK 8 and it would benefit from the equivalent flag. (The flag got renamed in JDK 9 by openjdk/jdk@29aa24a) I also left a related note in #4595 (comment), I'm not completely sure what form of the flag we want to recommend when this change is released. |
Oh, BTW, I noticed 2 uses of the JDK 8 name in the codebase (in tests): https://github.com/search?q=repo%3Agoogle%2Ferror-prone%20shouldStopPolicyIfError&type=code |
Thanks! I will clean those up |
May I ask you for a quick review? tbroyer/gradle-errorprone-plugin#109 I might revisit this later to conditionally pass |
…stop=ifError=FLOW` is the default As pointed out in #4618 (comment) PiperOrigin-RevId: 686640507
…stop=ifError=FLOW` is the default As pointed out in #4618 (comment) PiperOrigin-RevId: 686916247
Check that
-XDshould-stop.ifError=FLOW
is set when running Error ProneThis is necessary to ensure javac compiles the 'flow' phase for subsequent compilation units after Error Prone reports diagnostics. The 'flow' phase is necessary among other things to set
EFFECTIVELY_FINAL
. Configuring a later stop policy also causes more diagnostics to be shown at once for failing builds when using-XDcompilePolicy=simple
, which is helpful.#4595
RELNOTES=The javac flag
-XDshould-stop.ifError=FLOW
is now required when running Error Prone, see #4595