|
22 | 22 | import static com.google.devtools.build.lib.packages.ImplicitOutputsFunction.substitutePlaceholderIntoTemplate;
|
23 | 23 | import static com.google.devtools.build.lib.packages.RuleClass.Builder.STARLARK_BUILD_SETTING_DEFAULT_ATTR_NAME;
|
24 | 24 | import static com.google.devtools.build.lib.packages.RuleClass.NO_EXTERNAL_BINDINGS;
|
| 25 | +import static com.google.devtools.build.lib.packages.RuleClass.NO_TOOLCHAINS_TO_REGISTER; |
25 | 26 | import static com.google.devtools.build.lib.packages.Type.BOOLEAN;
|
26 | 27 | import static com.google.devtools.build.lib.packages.Type.INTEGER;
|
27 | 28 | import static com.google.devtools.build.lib.packages.Type.STRING;
|
28 | 29 | import static com.google.devtools.build.lib.packages.Type.STRING_LIST;
|
29 | 30 | import static org.junit.Assert.assertThrows;
|
30 | 31 | import static org.junit.Assert.fail;
|
31 | 32 |
|
32 |
| -import com.google.common.base.Function; |
33 | 33 | import com.google.common.base.Predicate;
|
34 | 34 | import com.google.common.base.Predicates;
|
35 | 35 | import com.google.common.base.Strings;
|
@@ -122,7 +122,6 @@ private static RuleClass createRuleClassA() throws LabelSyntaxException {
|
122 | 122 | PREFERRED_DEPENDENCY_PREDICATE,
|
123 | 123 | AdvertisedProviderSet.EMPTY,
|
124 | 124 | null,
|
125 |
| - NO_EXTERNAL_BINDINGS, |
126 | 125 | ImmutableSet.<Class<?>>of(),
|
127 | 126 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
128 | 127 | true,
|
@@ -159,7 +158,6 @@ private static RuleClass createRuleClassB(RuleClass ruleClassA) {
|
159 | 158 | PREFERRED_DEPENDENCY_PREDICATE,
|
160 | 159 | AdvertisedProviderSet.EMPTY,
|
161 | 160 | null,
|
162 |
| - NO_EXTERNAL_BINDINGS, |
163 | 161 | ImmutableSet.<Class<?>>of(),
|
164 | 162 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
165 | 163 | true,
|
@@ -289,7 +287,6 @@ public void testDuplicatedDeps() throws Exception {
|
289 | 287 | PREFERRED_DEPENDENCY_PREDICATE,
|
290 | 288 | AdvertisedProviderSet.EMPTY,
|
291 | 289 | null,
|
292 |
| - NO_EXTERNAL_BINDINGS, |
293 | 290 | ImmutableSet.<Class<?>>of(),
|
294 | 291 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
295 | 292 | true,
|
@@ -336,7 +333,6 @@ public void testCreateRuleWithLegacyPublicVisibility() throws Exception {
|
336 | 333 | PREFERRED_DEPENDENCY_PREDICATE,
|
337 | 334 | AdvertisedProviderSet.EMPTY,
|
338 | 335 | null,
|
339 |
| - NO_EXTERNAL_BINDINGS, |
340 | 336 | ImmutableSet.<Class<?>>of(),
|
341 | 337 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
342 | 338 | true,
|
@@ -435,7 +431,6 @@ public void testImplicitOutputs() throws Exception {
|
435 | 431 | PREFERRED_DEPENDENCY_PREDICATE,
|
436 | 432 | AdvertisedProviderSet.EMPTY,
|
437 | 433 | null,
|
438 |
| - NO_EXTERNAL_BINDINGS, |
439 | 434 | ImmutableSet.<Class<?>>of(),
|
440 | 435 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
441 | 436 | true,
|
@@ -476,7 +471,6 @@ public void testImplicitOutsWithBasenameDirname() throws Exception {
|
476 | 471 | PREFERRED_DEPENDENCY_PREDICATE,
|
477 | 472 | AdvertisedProviderSet.EMPTY,
|
478 | 473 | null,
|
479 |
| - NO_EXTERNAL_BINDINGS, |
480 | 474 | ImmutableSet.<Class<?>>of(),
|
481 | 475 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
482 | 476 | true);
|
@@ -512,7 +506,6 @@ private static RuleClass getRuleClassWithComputedDefault(Attribute computedDefau
|
512 | 506 | PREFERRED_DEPENDENCY_PREDICATE,
|
513 | 507 | AdvertisedProviderSet.EMPTY,
|
514 | 508 | null,
|
515 |
| - NO_EXTERNAL_BINDINGS, |
516 | 509 | ImmutableSet.<Class<?>>of(),
|
517 | 510 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
518 | 511 | true,
|
@@ -681,7 +674,6 @@ public void testOutputsAreOrdered() throws Exception {
|
681 | 674 | PREFERRED_DEPENDENCY_PREDICATE,
|
682 | 675 | AdvertisedProviderSet.EMPTY,
|
683 | 676 | null,
|
684 |
| - NO_EXTERNAL_BINDINGS, |
685 | 677 | ImmutableSet.<Class<?>>of(),
|
686 | 678 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
687 | 679 | true,
|
@@ -724,7 +716,6 @@ public void testSubstitutePlaceholderIntoTemplate() throws Exception {
|
724 | 716 | PREFERRED_DEPENDENCY_PREDICATE,
|
725 | 717 | AdvertisedProviderSet.EMPTY,
|
726 | 718 | null,
|
727 |
| - NO_EXTERNAL_BINDINGS, |
728 | 719 | ImmutableSet.<Class<?>>of(),
|
729 | 720 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
730 | 721 | true,
|
@@ -881,7 +872,6 @@ private static RuleClass newRuleClass(
|
881 | 872 | Predicate<String> preferredDependencyPredicate,
|
882 | 873 | AdvertisedProviderSet advertisedProviders,
|
883 | 874 | @Nullable StarlarkFunction configuredTargetFunction,
|
884 |
| - Function<? super Rule, Map<String, Label>> externalBindingsFunction, |
885 | 875 | Set<Class<?>> allowedConfigurationFragments,
|
886 | 876 | MissingFragmentPolicy missingFragmentPolicy,
|
887 | 877 | boolean supportsConstraintChecking,
|
@@ -909,7 +899,8 @@ private static RuleClass newRuleClass(
|
909 | 899 | preferredDependencyPredicate,
|
910 | 900 | advertisedProviders,
|
911 | 901 | configuredTargetFunction,
|
912 |
| - externalBindingsFunction, |
| 902 | + NO_EXTERNAL_BINDINGS, |
| 903 | + NO_TOOLCHAINS_TO_REGISTER, |
913 | 904 | /*optionReferenceFunction=*/ RuleClass.NO_OPTION_REFERENCE,
|
914 | 905 | /*ruleDefinitionEnvironmentLabel=*/ null,
|
915 | 906 | /*ruleDefinitionEnvironmentDigest=*/ null,
|
@@ -946,7 +937,6 @@ private static RuleClass createParentRuleClass() {
|
946 | 937 | PREFERRED_DEPENDENCY_PREDICATE,
|
947 | 938 | AdvertisedProviderSet.EMPTY,
|
948 | 939 | null,
|
949 |
| - NO_EXTERNAL_BINDINGS, |
950 | 940 | ImmutableSet.<Class<?>>of(DummyFragment.class),
|
951 | 941 | MissingFragmentPolicy.FAIL_ANALYSIS,
|
952 | 942 | true,
|
|
0 commit comments