Remove third party license checking from Bazel.
This doesn't remove --incompatible_disable_third_party_license_checking
but makes it a no-op. This is so the Google version of Bazel can migrate
on its own timeframe.
Because this logic was created before Bazel existed, removing it
from Google is going to take more time. We don't want that to slow
Bazel development.
See https://github.com/bazelbuild/bazel/issues/7444.
PiperOrigin-RevId: 241946385
diff --git a/src/main/java/com/google/devtools/build/lib/BUILD b/src/main/java/com/google/devtools/build/lib/BUILD
index 119de1b..d1c5fa3 100644
--- a/src/main/java/com/google/devtools/build/lib/BUILD
+++ b/src/main/java/com/google/devtools/build/lib/BUILD
@@ -816,22 +816,6 @@
)
java_library(
- name = "bazel/LicenseCheckingModule",
- srcs = ["bazel/LicenseCheckingModule.java"],
- deps = [
- ":build-base",
- ":events",
- ":packages-internal",
- ":runtime",
- "//src/main/java/com/google/devtools/build/lib/cmdline",
- "//src/main/java/com/google/devtools/build/lib/collect",
- "//src/main/java/com/google/devtools/build/lib/collect/nestedset",
- "//src/main/java/com/google/devtools/build/lib/profiler",
- "//third_party:guava",
- ],
-)
-
-java_library(
name = "bazel-main",
srcs = ["bazel/Bazel.java"],
resources = [
@@ -869,10 +853,8 @@
exclude = [
"bazel/Bazel.java",
"bazel/BazelRepositoryModule.java",
- "bazel/LicenseCheckingModule.java",
],
),
- exports = [":bazel/LicenseCheckingModule"],
deps = [
":build-base",
":build-info",
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/Bazel.java b/src/main/java/com/google/devtools/build/lib/bazel/Bazel.java
index 4ece65e..f2829af 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/Bazel.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/Bazel.java
@@ -43,7 +43,6 @@
com.google.devtools.build.lib.bazel.BazelWorkspaceStatusModule.class,
com.google.devtools.build.lib.bazel.BazelDiffAwarenessModule.class,
com.google.devtools.build.lib.bazel.BazelRepositoryModule.class,
- com.google.devtools.build.lib.bazel.LicenseCheckingModule.class,
com.google.devtools.build.lib.bazel.debug.WorkspaceRuleModule.class,
com.google.devtools.build.lib.bazel.coverage.BazelCoverageReportModule.class,
com.google.devtools.build.lib.skylarkdebug.module.SkylarkDebuggerModule.class,
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/LicenseCheckingModule.java b/src/main/java/com/google/devtools/build/lib/bazel/LicenseCheckingModule.java
deleted file mode 100644
index 6cb5025..0000000
--- a/src/main/java/com/google/devtools/build/lib/bazel/LicenseCheckingModule.java
+++ /dev/null
@@ -1,261 +0,0 @@
-// Copyright 2019 The Bazel Authors. All rights reserved.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package com.google.devtools.build.lib.bazel;
-
-import com.google.common.annotations.VisibleForTesting;
-import com.google.common.collect.HashBasedTable;
-import com.google.common.collect.ImmutableTable;
-import com.google.common.collect.Table;
-import com.google.devtools.build.lib.analysis.ConfiguredTarget;
-import com.google.devtools.build.lib.analysis.LicensesProvider;
-import com.google.devtools.build.lib.analysis.LicensesProvider.TargetLicense;
-import com.google.devtools.build.lib.analysis.StaticallyLinkedMarkerProvider;
-import com.google.devtools.build.lib.analysis.ViewCreationFailedException;
-import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
-import com.google.devtools.build.lib.analysis.config.BuildOptions;
-import com.google.devtools.build.lib.buildtool.BuildRequest;
-import com.google.devtools.build.lib.cmdline.Label;
-import com.google.devtools.build.lib.collect.nestedset.NestedSet;
-import com.google.devtools.build.lib.events.Event;
-import com.google.devtools.build.lib.events.EventHandler;
-import com.google.devtools.build.lib.events.Location;
-import com.google.devtools.build.lib.packages.InputFile;
-import com.google.devtools.build.lib.packages.License;
-import com.google.devtools.build.lib.packages.License.DistributionType;
-import com.google.devtools.build.lib.packages.License.LicenseType;
-import com.google.devtools.build.lib.packages.NoSuchPackageException;
-import com.google.devtools.build.lib.packages.NoSuchTargetException;
-import com.google.devtools.build.lib.packages.Rule;
-import com.google.devtools.build.lib.packages.StarlarkSemanticsOptions;
-import com.google.devtools.build.lib.packages.Target;
-import com.google.devtools.build.lib.packages.TargetUtils;
-import com.google.devtools.build.lib.profiler.ProfilePhase;
-import com.google.devtools.build.lib.profiler.Profiler;
-import com.google.devtools.build.lib.profiler.SilentCloseable;
-import com.google.devtools.build.lib.runtime.BlazeModule;
-import com.google.devtools.build.lib.runtime.CommandEnvironment;
-import java.util.EnumSet;
-import java.util.Set;
-
-/**
- * Module responsible for checking third party license compliance.
- *
- * <p><b>This is outdated logic marked for removal.</b> See <a
- * href="https://github.com/bazelbuild/bazel/issues/7444">#7444</a> for details.
- */
-public class LicenseCheckingModule extends BlazeModule {
-
- protected boolean shouldCheckLicenses(BuildRequest request, BuildOptions buildOptions) {
- if (request.getOptions(StarlarkSemanticsOptions.class)
- .incompatibleDisableThirdPartyLicenseChecking) {
- return false;
- }
- return buildOptions.get(BuildConfiguration.Options.class).checkLicenses;
- }
-
- @Override
- public void afterAnalysis(
- CommandEnvironment env,
- BuildRequest request,
- BuildOptions buildOptions,
- Iterable<ConfiguredTarget> configuredTargets)
- throws InterruptedException, ViewCreationFailedException {
- // Check licenses.
- // We check licenses if the first target configuration has license checking enabled. Right
- // now, it is not possible to have multiple target configurations with different settings
- // for this flag, which allows us to take this short cut.
- if (shouldCheckLicenses(request, buildOptions)) {
- Profiler.instance().markPhase(ProfilePhase.LICENSE);
- try (SilentCloseable c = Profiler.instance().profile("validateLicensingForTargets")) {
- validateLicensingForTargets(env, configuredTargets, request.getKeepGoing());
- }
- }
- }
-
- /**
- * Takes a set of configured targets, and checks if the distribution methods declared for the
- * targets are compatible with the constraints imposed by their prerequisites' licenses.
- *
- * @param configuredTargets the targets to check
- * @param keepGoing if false, and a licensing error is encountered, both generates an error
- * message on the reporter, <em>and</em> throws an exception. If true, then just generates a
- * message on the reporter.
- * @throws ViewCreationFailedException if the license checking failed (and not --keep_going)
- */
- private static void validateLicensingForTargets(
- CommandEnvironment env, Iterable<ConfiguredTarget> configuredTargets, boolean keepGoing)
- throws ViewCreationFailedException {
- for (ConfiguredTarget configuredTarget : configuredTargets) {
- Target target = null;
- try {
- target = env.getPackageManager().getTarget(env.getReporter(), configuredTarget.getLabel());
- } catch (NoSuchPackageException | NoSuchTargetException | InterruptedException e) {
- env.getReporter().handle(Event.error("Failed to get target to validate license"));
- throw new ViewCreationFailedException(
- "Build aborted due to issue getting targets to validate licenses", e);
- }
-
- if (TargetUtils.isTestRule(target)) {
- continue; // Tests are exempt from license checking
- }
-
- final Set<DistributionType> distribs = target.getDistributions();
- StaticallyLinkedMarkerProvider markerProvider =
- configuredTarget.getProvider(StaticallyLinkedMarkerProvider.class);
- boolean staticallyLinked = markerProvider != null && markerProvider.isLinkedStatically();
-
- LicensesProvider provider = configuredTarget.getProvider(LicensesProvider.class);
- if (provider != null) {
- NestedSet<TargetLicense> licenses = provider.getTransitiveLicenses();
- for (TargetLicense targetLicense : licenses) {
- if (!checkCompatibility(
- targetLicense.getLicense(),
- distribs,
- target,
- targetLicense.getLabel(),
- env.getReporter(),
- staticallyLinked)) {
- if (!keepGoing) {
- throw new ViewCreationFailedException("Build aborted due to licensing error");
- }
- }
- }
- } else if (target instanceof InputFile) {
- // Input file targets do not provide licenses because they do not
- // depend on the rule where their license is taken from. This is usually
- // not a problem, because the transitive collection of licenses always
- // hits the rule they come from, except when the input file is a
- // top-level target. Thus, we need to handle that case specially here.
- //
- // See FileTarget#getLicense for more information about the handling of
- // license issues with File targets.
- License license = target.getLicense();
- if (!checkCompatibility(
- license,
- distribs,
- target,
- configuredTarget.getLabel(),
- env.getReporter(),
- staticallyLinked)) {
- if (!keepGoing) {
- throw new ViewCreationFailedException("Build aborted due to licensing error");
- }
- }
- }
- }
- }
-
- private static final Object MARKER = new Object();
-
- /**
- * The license incompatibility set. This contains the set of (Distribution,License) pairs that
- * should generate errors.
- */
- private static final Table<DistributionType, LicenseType, Object> licenseIncompatibilies =
- createLicenseIncompatibilitySet();
-
- private static Table<DistributionType, LicenseType, Object> createLicenseIncompatibilitySet() {
- Table<DistributionType, LicenseType, Object> result = HashBasedTable.create();
- result.put(DistributionType.CLIENT, LicenseType.RESTRICTED, MARKER);
- result.put(DistributionType.EMBEDDED, LicenseType.RESTRICTED, MARKER);
- result.put(DistributionType.INTERNAL, LicenseType.BY_EXCEPTION_ONLY, MARKER);
- result.put(DistributionType.CLIENT, LicenseType.BY_EXCEPTION_ONLY, MARKER);
- result.put(DistributionType.WEB, LicenseType.BY_EXCEPTION_ONLY, MARKER);
- result.put(DistributionType.EMBEDDED, LicenseType.BY_EXCEPTION_ONLY, MARKER);
- return ImmutableTable.copyOf(result);
- }
-
- /**
- * The license warning set. This contains the set of (Distribution,License) pairs that should
- * generate warnings when the user requests verbose license checking.
- */
- private static final Table<DistributionType, LicenseType, Object> licenseWarnings =
- createLicenseWarningsSet();
-
- private static Table<DistributionType, LicenseType, Object> createLicenseWarningsSet() {
- Table<DistributionType, LicenseType, Object> result = HashBasedTable.create();
- result.put(DistributionType.CLIENT, LicenseType.RECIPROCAL, MARKER);
- result.put(DistributionType.EMBEDDED, LicenseType.RECIPROCAL, MARKER);
- result.put(DistributionType.CLIENT, LicenseType.NOTICE, MARKER);
- result.put(DistributionType.EMBEDDED, LicenseType.NOTICE, MARKER);
- return ImmutableTable.copyOf(result);
- }
-
- /**
- * Checks if the given license is compatible with distributing a particular target in some set of
- * distribution modes.
- *
- * @param license the license to check
- * @param dists the modes of distribution
- * @param target the target which is being checked, and which will be used for checking exceptions
- * @param licensedTarget the target which declared the license being checked.
- * @param eventHandler a reporter where any licensing issues discovered should be reported
- * @param staticallyLinked whether the target is statically linked under this command
- * @return true if the license is compatible with the distributions
- */
- @VisibleForTesting
- public static boolean checkCompatibility(
- License license,
- Set<DistributionType> dists,
- Target target,
- Label licensedTarget,
- EventHandler eventHandler,
- boolean staticallyLinked) {
- Location location = (target instanceof Rule) ? ((Rule) target).getLocation() : null;
-
- LicenseType leastRestrictiveLicense;
- if (license.getLicenseTypes().contains(LicenseType.RESTRICTED_IF_STATICALLY_LINKED)) {
- Set<LicenseType> tempLicenses = EnumSet.copyOf(license.getLicenseTypes());
- tempLicenses.remove(LicenseType.RESTRICTED_IF_STATICALLY_LINKED);
- if (staticallyLinked) {
- tempLicenses.add(LicenseType.RESTRICTED);
- } else {
- tempLicenses.add(LicenseType.UNENCUMBERED);
- }
- leastRestrictiveLicense = License.leastRestrictive(tempLicenses);
- } else {
- leastRestrictiveLicense = License.leastRestrictive(license.getLicenseTypes());
- }
- for (DistributionType dt : dists) {
- if (licenseIncompatibilies.contains(dt, leastRestrictiveLicense)) {
- if (!license.getExceptions().contains(target.getLabel())) {
- eventHandler.handle(
- Event.error(
- location,
- "Build target '"
- + target.getLabel()
- + "' is not compatible with license '"
- + license
- + "' from target '"
- + licensedTarget
- + "'"));
- return false;
- }
- } else if (licenseWarnings.contains(dt, leastRestrictiveLicense)) {
- eventHandler.handle(
- Event.warn(
- location,
- "Build target '"
- + target
- + "' has a potential licensing issue with a '"
- + license
- + "' license from target '"
- + licensedTarget
- + "'"));
- }
- }
- return true;
- }
-}
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
index 29a9750..f89e03e 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelRuleClassProvider.java
@@ -53,6 +53,7 @@
import com.google.devtools.build.lib.bazel.rules.workspace.MavenJarRule;
import com.google.devtools.build.lib.bazel.rules.workspace.MavenServerRule;
import com.google.devtools.build.lib.cmdline.LabelConstants;
+import com.google.devtools.build.lib.packages.RuleClass.Builder.ThirdPartyLicenseExistencePolicy;
import com.google.devtools.build.lib.rules.android.AarImportBaseRule;
import com.google.devtools.build.lib.rules.android.AndroidConfiguration;
import com.google.devtools.build.lib.rules.android.AndroidDeviceBrokerInfo;
@@ -198,9 +199,7 @@
public static ConfiguredRuleClassProvider create() {
ConfiguredRuleClassProvider.Builder builder = new ConfiguredRuleClassProvider.Builder();
builder.setToolsRepository(TOOLS_REPOSITORY);
- // TODO(gregce): uncomment the below line in the same change that retires
- // --incompatible_disable_third_party_license_checking. See the flag's comments for details.
- // builder.setThirdPartyLicenseExistencePolicy(ThirdPartyLicenseExistencePolicy.NEVER_CHECK);
+ builder.setThirdPartyLicenseExistencePolicy(ThirdPartyLicenseExistencePolicy.NEVER_CHECK);
setup(builder);
return builder.build();
}
@@ -209,6 +208,7 @@
for (RuleSet ruleSet : RULE_SETS) {
ruleSet.init(builder);
}
+ builder.setThirdPartyLicenseExistencePolicy(ThirdPartyLicenseExistencePolicy.NEVER_CHECK);
}
public static final RuleSet BAZEL_SETUP =
diff --git a/src/main/java/com/google/devtools/build/lib/packages/License.java b/src/main/java/com/google/devtools/build/lib/packages/License.java
index c980444..3c44a0e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/License.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/License.java
@@ -14,7 +14,6 @@
package com.google.devtools.build.lib.packages;
-import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Sets;
@@ -76,7 +75,6 @@
* @param types a collection of license types
* @return the least restrictive license type
*/
- @VisibleForTesting
public static LicenseType leastRestrictive(Collection<LicenseType> types) {
// TODO(gregce): move this method to LicenseCheckingModule when Bazel's tests no longer use it
return types.isEmpty() ? LicenseType.BY_EXCEPTION_ONLY : Collections.max(types);
diff --git a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
index 64c982b..9dc7cca 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/PackageFactory.java
@@ -751,9 +751,7 @@
== ThirdPartyLicenseExistencePolicy.NEVER_CHECK) {
checkLicenses = false;
} else {
- checkLicenses =
- env.getSemantics().checkThirdPartyTargetsHaveLicenses()
- && !env.getSemantics().incompatibleDisableThirdPartyLicenseChecking();
+ checkLicenses = !env.getSemantics().incompatibleDisableThirdPartyLicenseChecking();
}
if (checkLicenses
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index 328a840..4bdf988 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -693,17 +693,20 @@
public enum ThirdPartyLicenseExistencePolicy {
/**
* Always do this check, overriding whatever {@link
- * StarlarkSemanticsOptions#checkThirdPartyTargetsHaveLicenses} says.
+ * StarlarkSemanticsOptions#incompatibleDisableThirdPartyLicenseChecking} says.
*/
ALWAYS_CHECK,
/**
* Never do this check, overriding whatever {@link
- * StarlarkSemanticsOptions#checkThirdPartyTargetsHaveLicenses} says.
+ * StarlarkSemanticsOptions#incompatibleDisableThirdPartyLicenseChecking} says.
*/
NEVER_CHECK,
- /** Do whatever {@link StarlarkSemanticsOptions#checkThirdPartyTargetsHaveLicenses} says. */
+ /**
+ * Do whatever {@link StarlarkSemanticsOptions#incompatibleDisableThirdPartyLicenseChecking}
+ * says.
+ */
USER_CONTROLLABLE
}
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java b/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java
index efea73a..35517ed 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java
@@ -128,20 +128,14 @@
AttributesAndLocation generator =
generatorAttributesForMacros(attributeValues, env, location, label);
try {
- // Examines --check_third_party_targets_have_licenses and
- // --incompatible_disable_third_party_license_checking to see if we should check third_party
- // targets for license existence. The latter flag overrides the former.
+ // Examines --incompatible_disable_third_party_license_checking to see if we should check
+ // third party targets for license existence.
//
- // Note that *both* flags are overridable by RuleClass.ThirdPartyLicenseEnforcementPolicy
- // (which is checked in RuleClass). This lets Bazel and Blaze migrate away from license logic
- // on independent timelines. See --incompatible_disable_third_party_license_checking comments
- // for details.
- boolean checkThirdPartyLicenses;
- if (env == null || env.getSemantics().incompatibleDisableThirdPartyLicenseChecking()) {
- checkThirdPartyLicenses = false;
- } else {
- checkThirdPartyLicenses = env.getSemantics().checkThirdPartyTargetsHaveLicenses();
- }
+ // This flag is overridable by RuleClass.ThirdPartyLicenseEnforcementPolicy (which is checked
+ // in RuleClass). This lets Bazel and Blaze migrate away from license logic on independent
+ // timelines. See --incompatible_disable_third_party_license_checking comments for details.
+ boolean checkThirdPartyLicenses =
+ env != null && !env.getSemantics().incompatibleDisableThirdPartyLicenseChecking();
return ruleClass.createRule(
pkgBuilder,
label,
diff --git a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
index af68aa1..29a2f4a 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/StarlarkSemanticsOptions.java
@@ -60,18 +60,6 @@
// <== Add new options here in alphabetic order ==>
- /**
- * This can be overridden by {@link RuleClass.Builder.ThirdPartyLicenseExistencePolicy} and {@link
- * #incompatibleDisableThirdPartyLicenseChecking}.
- */
- @Option(
- name = "check_third_party_targets_have_licenses",
- defaultValue = "true",
- documentationCategory = OptionDocumentationCategory.STARLARK_SEMANTICS,
- effectTags = OptionEffectTag.BUILD_FILE_SEMANTICS,
- help = "If true, all rules and files under //third_party must declare licenses([])")
- public boolean checkThirdPartyTargetsHaveLicenses;
-
@Option(
name = "experimental_build_setting_api",
defaultValue = "false",
@@ -221,22 +209,14 @@
help = "If set to true, disallow use of deprecated resource fields on the Objc provider.")
public boolean incompatibleDisableObjcProviderResources;
- // Once this migration is complete, instead of removing this flag we need to make it a no-op.
- // This is because we'll need to keep it around for a while so Google's migration can complete
- // after Bazel's. This is an example of Bazel's Google roots being methodically torn out:
- // because this functionality was introduced for Google before Bazel existed, Google's
- // dependency on it is deeper. We don't want this to add unnecessary baggage to Bazel or slow
- // down Bazel's development. So this approach, while slightly awkward, relieves Bazel of
- // Google's technical debt (which shouldn't be Bazel's problem). This means you as a Bazel
- // user are getting better code than Google has! (for a while, at least)
+ // For Bazel, this flag is a no-op. Bazel doesn't support built-in third party license checking
+ // (see https://github.com/bazelbuild/bazel/issues/7444).
//
- // Track migration at https://github.com/bazelbuild/bazel/issues/7444. When we're ready to
- // remove Bazel support, instead of removing the flag we should do these things:
- //
- // 1) BazelRuleClassProvider: set the third party license existence policy to NEVER_CHECK (see
- // the related TODO(gregce) comment in that file).
- // 2) Remove LicenseCheckingModule.
- // 3) Remove --check_third_party_targets_have_licenses.
+ // For Blaze in Google, this flag is still needed to deprecate the logic that's already been
+ // removed from Bazel. That logic was introduced before Bazel existed, so Google's dependency on
+ // it is deeper. But we don't want that to add unnecessary baggage to Bazel or slow down Bazel's
+ // development. So this flag lets Blaze migrate on a slower timeline without blocking Bazel. This
+ // means you as a Bazel user are getting better code than Google has! (for a while, at least)
@Option(
name = "incompatible_disable_third_party_license_checking",
defaultValue = "true",
@@ -246,9 +226,7 @@
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
- help =
- "If true, disables all license checking logic. This overrides "
- + "--check_third_party_targets_have_licenses")
+ help = "If true, disables all license checking logic")
public boolean incompatibleDisableThirdPartyLicenseChecking;
@Option(
@@ -534,7 +512,6 @@
public StarlarkSemantics toSkylarkSemantics() {
return StarlarkSemantics.builder()
// <== Add new options here in alphabetic order ==>
- .checkThirdPartyTargetsHaveLicenses(checkThirdPartyTargetsHaveLicenses)
.experimentalBuildSettingApi(experimentalBuildSettingApi)
.experimentalCcSkylarkApiEnabledPackages(experimentalCcSkylarkApiEnabledPackages)
.experimentalEnableAndroidMigrationApis(experimentalEnableAndroidMigrationApis)
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
index e84aca4..f8a1dc0 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/StarlarkSemantics.java
@@ -112,8 +112,6 @@
AutoValue_StarlarkSemantics.class;
// <== Add new options here in alphabetic order ==>
- public abstract boolean checkThirdPartyTargetsHaveLicenses();
-
public abstract boolean experimentalBuildSettingApi();
public abstract ImmutableList<String> experimentalCcSkylarkApiEnabledPackages();
@@ -197,7 +195,6 @@
public static final StarlarkSemantics DEFAULT_SEMANTICS =
builder()
// <== Add new options here in alphabetic order ==>
- .checkThirdPartyTargetsHaveLicenses(true)
.experimentalBuildSettingApi(false)
.experimentalCcSkylarkApiEnabledPackages(ImmutableList.of())
.experimentalEnableAndroidMigrationApis(false)
@@ -239,8 +236,6 @@
public abstract static class Builder {
// <== Add new options here in alphabetic order ==>
- public abstract Builder checkThirdPartyTargetsHaveLicenses(boolean value);
-
public abstract Builder experimentalBuildSettingApi(boolean value);
public abstract Builder experimentalCcSkylarkApiEnabledPackages(List<String> value);