Skip to content

Commit

Permalink
Remove code for experimental_cc_skylark_api_enabled_packages
Browse files Browse the repository at this point in the history
This flag is not checked anywhere anymore.

RELNOTES:none
PiperOrigin-RevId: 364752652
  • Loading branch information
oquenchil authored and copybara-github committed Mar 24, 2021
1 parent 09c621e commit ba258e8
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
/**
* A module that contains Starlark utilities for C++ support.
*
* <p>This is a work in progress. The API is guarded behind
* --experimental_cc_skylark_api_enabled_packages. The API is under development and unstable.
*/
public class BazelCcModule extends CcModule
implements BazelCcModuleApi<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ public class BuildLanguageOptions extends OptionsBase implements Serializable {
+ " key.")
public List<String> experimentalBuiltinsInjectionOverride;


@Option(
name = "experimental_cc_skylark_api_enabled_packages",
converter = CommaSeparatedOptionListConverter.class,
Expand Down Expand Up @@ -644,9 +645,6 @@ public StarlarkSemantics toStarlarkSemantics() {
.set(EXPERIMENTAL_BUILTINS_BZL_PATH, experimentalBuiltinsBzlPath)
.setBool(EXPERIMENTAL_BUILTINS_DUMMY, experimentalBuiltinsDummy)
.set(EXPERIMENTAL_BUILTINS_INJECTION_OVERRIDE, experimentalBuiltinsInjectionOverride)
.set(
EXPERIMENTAL_CC_STARLARK_API_ENABLED_PACKAGES,
ImmutableList.copyOf(experimentalCcStarlarkApiEnabledPackages))
.setBool(
EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS, experimentalEnableAndroidMigrationApis)
.setBool(EXPERIMENTAL_GOOGLE_LEGACY_API, experimentalGoogleLegacyApi)
Expand Down Expand Up @@ -776,10 +774,6 @@ public StarlarkSemantics toStarlarkSemantics() {
new StarlarkSemantics.Key<>("experimental_builtins_bzl_path", "");
public static final StarlarkSemantics.Key<List<String>> EXPERIMENTAL_BUILTINS_INJECTION_OVERRIDE =
new StarlarkSemantics.Key<>("experimental_builtins_injection_override", ImmutableList.of());
public static final StarlarkSemantics.Key<ImmutableList<String>>
EXPERIMENTAL_CC_STARLARK_API_ENABLED_PACKAGES =
new StarlarkSemantics.Key<>(
"experimental_cc_starlark_api_enabled_packages", ImmutableList.of());
public static final StarlarkSemantics.Key<Long> MAX_COMPUTATION_STEPS =
new StarlarkSemantics.Key<>("max_computation_steps", 0L);
public static final StarlarkSemantics.Key<Integer> NESTED_SET_DEPTH_LIMIT =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import static com.google.common.truth.Truth.assertThat;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.lib.skyframe.serialization.DeserializationContext;
import com.google.devtools.build.lib.skyframe.serialization.DynamicCodec;
Expand Down Expand Up @@ -121,10 +120,6 @@ private static BuildLanguageOptions buildRandomOptions(Random rand) throws Excep
"--experimental_sibling_repository_layout=" + rand.nextBoolean(),
"--experimental_builtins_bzl_path=" + rand.nextDouble(),
"--experimental_builtins_dummy=" + rand.nextBoolean(),
"--experimental_cc_skylark_api_enabled_packages="
+ rand.nextDouble()
+ ","
+ rand.nextDouble(),
"--experimental_enable_android_migration_apis=" + rand.nextBoolean(),
"--experimental_google_legacy_api=" + rand.nextBoolean(),
"--experimental_ninja_actions=" + rand.nextBoolean(),
Expand Down Expand Up @@ -170,9 +165,6 @@ private static StarlarkSemantics buildRandomSemantics(Random rand) {
.setBool(BuildLanguageOptions.EXPERIMENTAL_SIBLING_REPOSITORY_LAYOUT, rand.nextBoolean())
.set(BuildLanguageOptions.EXPERIMENTAL_BUILTINS_BZL_PATH, String.valueOf(rand.nextDouble()))
.setBool(BuildLanguageOptions.EXPERIMENTAL_BUILTINS_DUMMY, rand.nextBoolean())
.set(
BuildLanguageOptions.EXPERIMENTAL_CC_STARLARK_API_ENABLED_PACKAGES,
ImmutableList.of(String.valueOf(rand.nextDouble()), String.valueOf(rand.nextDouble())))
.setBool(
BuildLanguageOptions.EXPERIMENTAL_ENABLE_ANDROID_MIGRATION_APIS, rand.nextBoolean())
.setBool(BuildLanguageOptions.EXPERIMENTAL_GOOGLE_LEGACY_API, rand.nextBoolean())
Expand Down
8 changes: 0 additions & 8 deletions src/test/java/com/google/devtools/build/lib/rules/cpp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ java_library(
name = "CcImportBaseConfiguredTargetTest",
srcs = ["CcImportBaseConfiguredTargetTest.java"],
deps = [
":StarlarkCcCommonTestHelper",
"//src/main/java/com/google/devtools/build/lib/actions",
"//src/main/java/com/google/devtools/build/lib/actions:artifacts",
"//src/main/java/com/google/devtools/build/lib/analysis:configured_target",
"//src/main/java/com/google/devtools/build/lib/collect/nestedset",
Expand All @@ -77,11 +75,6 @@ java_library(
],
)

java_library(
name = "StarlarkCcCommonTestHelper",
srcs = ["StarlarkCcCommonTestHelper.java"],
)

java_test(
name = "CcBadDependenciesTest",
srcs = ["CcBadDependenciesTest.java"],
Expand Down Expand Up @@ -661,7 +654,6 @@ java_test(
srcs = ["StarlarkCcCommonTest.java"],
shard_count = 4,
deps = [
":StarlarkCcCommonTestHelper",
"//src/main/java/com/google/devtools/build/lib/actions:artifacts",
"//src/main/java/com/google/devtools/build/lib/actions:commandline_item",
"//src/main/java/com/google/devtools/build/lib/analysis:analysis_cluster",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ public abstract class CcImportBaseConfiguredTargetTest extends BuildViewTestCase

@Before
public void setStarlarkImplementationLoadStatement() throws Exception {
setBuildLanguageOptions(StarlarkCcCommonTestHelper.CC_STARLARK_WHITELIST_FLAG);
invalidatePackages();
setIsStarlarkImplementation();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@
public class StarlarkCcCommonTest extends BuildViewTestCase {

@Before
public void setBuildLanguageOptions() throws Exception {
this.setBuildLanguageOptions(StarlarkCcCommonTestHelper.CC_STARLARK_WHITELIST_FLAG);
invalidatePackages();

public void setUp() throws Exception {
scratch.file("myinfo/myinfo.bzl", "MyInfo = provider()");

scratch.file("myinfo/BUILD");
Expand Down

This file was deleted.

0 comments on commit ba258e8

Please sign in to comment.