diff options
author | brandjon <brandjon@google.com> | 2017-03-31 20:05:26 +0000 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-04-03 13:37:16 +0200 |
commit | 94261751bf2babe093696c35208e09768e3fd05e (patch) | |
tree | 6ba6ff401e0442d43f611db22b1a9ec84b0983e7 /src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java | |
parent | be5f25ca01d443193a97dae99ff4d1e90311bdaf (diff) |
Add --all_incompatible_changes, the user's shorthand for turning on all --incompatible_* flags
Note that if a developer adds a poorly-formatted incompatible change @Option, constructing an OptionsParser will now fail with an unchecked exception. This can cause some unit tests to fail in unexpected ways, but the developer should see an appropriate error message when the server starts up.
To be added: A separate integration test that ensures the expansions of --all_incompatible_changes don't clobber each other.
RELNOTES: None
PiperOrigin-RevId: 151858287
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java index 2afb774217..8e6cc14b31 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java @@ -97,6 +97,18 @@ public class CommonCommandOptions extends OptionsBase { } + // To create a new incompatible change, see the javadoc for AllIncompatibleChangesExpansion. + @Option( + name = "all_incompatible_changes", + defaultValue = "null", + category = "misc", + expansionFunction = AllIncompatibleChangesExpansion.class, + help = + "Enables all options of the form --incompatible_*. Use this option to find places where " + + "your build may break in the future due to deprecations or other changes." + ) + public Void allIncompatibleChanges; + @Option(name = "config", defaultValue = "", category = "misc", |