Add a check to not print deprecated flag warnings from flags set by the invocation policy.
Invocation policies are not always entirely synced with the current non-deprecated set of blaze flags. Therefore, sometimes they set flags that are deprecated or no longer exist. For the latter case, we log and ignore the invocation policy trying to set the flag. For the former case, we'll now do a more similar thing and not print a spammy warning when the invocation policy tries to set a deprecated flag.
PiperOrigin-RevId: 210403153
diff --git a/src/test/java/com/google/devtools/common/options/TestOptions.java b/src/test/java/com/google/devtools/common/options/TestOptions.java
index c38d975..d006240 100644
--- a/src/test/java/com/google/devtools/common/options/TestOptions.java
+++ b/src/test/java/com/google/devtools/common/options/TestOptions.java
@@ -315,4 +315,12 @@
defaultValue = "false"
)
public boolean specialExpBar;
+
+ @Option(
+ name = "test_deprecated",
+ defaultValue = "default",
+ deprecationWarning = "Flag for testing deprecation behavior.",
+ documentationCategory = OptionDocumentationCategory.UNCATEGORIZED,
+ effectTags = {OptionEffectTag.NO_OP})
+ public String testDeprecated;
}