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
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 2afb774..8e6cc14 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 @@
   }
 
 
+  // 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",