Move analysis testing improvements out of "experimental".

* Removes --experimental_analysis_testing_improvements flag, moving functionality previously guarded under this flag to be usable without the flag.
* Renames --experimental_allow_analysis_failures to --allow_analysis_failures

This change is a "silent launch" of these features. Documentation on these features soon to follow: after release, bazel-skylib will be updated to incorporate a number of these improvements, and announcements with thorough documentation will be made then.

Progress toward #6237

RELNOTES: None.
PiperOrigin-RevId: 222106622
diff --git a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
index 438c9f4..ad30f46 100644
--- a/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
+++ b/src/test/java/com/google/devtools/build/lib/syntax/SkylarkEvaluationTest.java
@@ -2262,7 +2262,7 @@
 
     AnalysisFailureInfo info = AnalysisFailureInfo.forAnalysisFailures(ImmutableList.of(cause));
 
-    new SkylarkTest("--experimental_analysis_testing_improvements=true")
+    new SkylarkTest()
         .update("val", info)
         .setUp(
             "causes = val.causes",
@@ -2270,15 +2270,6 @@
             "message = causes.to_list()[0].message")
         .testLookup("label", Label.create("test", "test"))
         .testLookup("message", "ErrorMessage");
-
-    new SkylarkTest()
-        .update("val", info)
-        .testIfErrorContains("'AnalysisFailureInfo' has no field 'causes'", "val.causes");
-
-    new SkylarkTest()
-        .update("val", cause)
-        .testIfErrorContains("'AnalysisFailure' has no field 'message'", "val.message")
-        .testIfErrorContains("'AnalysisFailure' has no field 'label'", "val.label");
   }
 
   @Test
@@ -2286,36 +2277,25 @@
     // This test uses an arbitrary experimental flag to verify this functionality. If this
     // experimental flag were to go away, this test may be updated to use any experimental flag.
     // The flag itself is unimportant to the test.
-    FlagGuardedValue val = FlagGuardedValue.onlyWhenExperimentalFlagIsTrue(
-        FlagIdentifier.EXPERIMENTAL_ANALYSIS_TESTING_IMPROVEMENTS,
-        "foo");
-    String errorMessage = "GlobalSymbol is experimental and thus unavailable with the current "
-        + "flags. It may be enabled by setting --experimental_analysis_testing_improvements";
+    FlagGuardedValue val =
+        FlagGuardedValue.onlyWhenExperimentalFlagIsTrue(
+            FlagIdentifier.EXPERIMENTAL_BUILD_SETTING_API, "foo");
+    String errorMessage =
+        "GlobalSymbol is experimental and thus unavailable with the current "
+            + "flags. It may be enabled by setting --experimental_build_setting_api";
 
-    new SkylarkTest(
-            ImmutableMap.of("GlobalSymbol", val),
-            "--experimental_analysis_testing_improvements=true")
+    new SkylarkTest(ImmutableMap.of("GlobalSymbol", val), "--experimental_build_setting_api=true")
         .setUp("var = GlobalSymbol")
         .testLookup("var", "foo");
 
-    new SkylarkTest(
-            ImmutableMap.of("GlobalSymbol", val),
-            "--experimental_analysis_testing_improvements=false")
-        .testIfErrorContains(errorMessage,
-            "var = GlobalSymbol");
+    new SkylarkTest(ImmutableMap.of("GlobalSymbol", val), "--experimental_build_setting_api=false")
+        .testIfErrorContains(errorMessage, "var = GlobalSymbol");
 
-    new SkylarkTest(
-            ImmutableMap.of("GlobalSymbol", val),
-            "--experimental_analysis_testing_improvements=false")
-        .testIfErrorContains(errorMessage,
-            "def my_function():",
-            "  var = GlobalSymbol");
+    new SkylarkTest(ImmutableMap.of("GlobalSymbol", val), "--experimental_build_setting_api=false")
+        .testIfErrorContains(errorMessage, "def my_function():", "  var = GlobalSymbol");
 
-    new SkylarkTest(
-            ImmutableMap.of("GlobalSymbol", val),
-            "--experimental_analysis_testing_improvements=false")
-        .setUp("GlobalSymbol = 'other'",
-            "var = GlobalSymbol")
+    new SkylarkTest(ImmutableMap.of("GlobalSymbol", val), "--experimental_build_setting_api=false")
+        .setUp("GlobalSymbol = 'other'", "var = GlobalSymbol")
         .testLookup("var", "other");
   }