@@ -3429,7 +3429,6 @@ public void testAspectRequiredProviders_listOfRequiredProvidersLists() throws Ex
3429
3429
3430
3430
@ Test
3431
3431
public void testAspectRequiredByMultipleAspects_inheritsAttrAspects () throws Exception {
3432
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
3433
3432
scratch .file (
3434
3433
"test/defs.bzl" ,
3435
3434
"prov_a = provider()" ,
@@ -3533,7 +3532,6 @@ public void testAspectRequiredByMultipleAspects_inheritsAttrAspects() throws Exc
3533
3532
3534
3533
@ Test
3535
3534
public void testAspectRequiredByMultipleAspects_inheritsRequiredProviders () throws Exception {
3536
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
3537
3535
scratch .file (
3538
3536
"test/defs.bzl" ,
3539
3537
"aspect_prov_a = provider()" ,
@@ -3686,7 +3684,6 @@ public void testAspectRequiredByMultipleAspects_inheritsRequiredProviders() thro
3686
3684
3687
3685
@ Test
3688
3686
public void testAspectRequiredByMultipleAspects_withDifferentParametersValues () throws Exception {
3689
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
3690
3687
scratch .file (
3691
3688
"test/defs.bzl" ,
3692
3689
"prov_a = provider()" ,
@@ -3820,7 +3817,6 @@ public void testAspectRequiredByMultipleAspects_withDifferentParametersValues()
3820
3817
@ Test
3821
3818
public void testAspectRequiresAspect_requireNativeAspect () throws Exception {
3822
3819
exposeNativeAspectToStarlark ();
3823
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
3824
3820
scratch .file (
3825
3821
"test/defs.bzl" ,
3826
3822
"prov_a = provider()" ,
@@ -4664,7 +4660,6 @@ public void testTopLevelAspectOnAspect_stackOfAspects() throws Exception {
4664
4660
"simple_rule(" ,
4665
4661
" name = 'dep_target'," ,
4666
4662
")" );
4667
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
4668
4663
4669
4664
AnalysisResult analysisResult =
4670
4665
update (
@@ -4769,7 +4764,6 @@ public void testTopLevelAspectOnAspect_requiredProviderProvidedTwiceFailed() thr
4769
4764
"simple_rule(" ,
4770
4765
" name = 'dep_target'," ,
4771
4766
")" );
4772
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
4773
4767
reporter .removeHandler (failFastHandler );
4774
4768
4775
4769
// The call to `update` does not throw an exception when "--keep_going" is passed in the
@@ -4854,7 +4848,6 @@ public void testTopLevelAspectOnAspect_requiredProviderProvidedTwicePassed() thr
4854
4848
"simple_rule(" ,
4855
4849
" name = 'dep_target'," ,
4856
4850
")" );
4857
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
4858
4851
4859
4852
AnalysisResult analysisResult =
4860
4853
update (
@@ -4926,7 +4919,6 @@ public void testTopLevelAspectOnAspect_requiredProviderNotProvided() throws Exce
4926
4919
"simple_rule(" ,
4927
4920
" name = 'dep_target'," ,
4928
4921
")" );
4929
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
4930
4922
4931
4923
AnalysisResult analysisResult =
4932
4924
update (ImmutableList .of ("test/defs.bzl%a2" , "test/defs.bzl%a1" ), "//test:main" );
@@ -4999,7 +4991,6 @@ public void testTopLevelAspectOnAspect_requiredProviderProvidedAfterTheAspect()
4999
4991
"simple_rule(" ,
5000
4992
" name = 'dep_target'," ,
5001
4993
")" );
5002
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5003
4994
5004
4995
AnalysisResult analysisResult =
5005
4996
update (ImmutableList .of ("test/defs.bzl%a1" , "test/defs.bzl%a2" ), "//test:main" );
@@ -5078,7 +5069,6 @@ public void testTopLevelAspectOnAspect_differentAttrAspects() throws Exception {
5078
5069
"simple_rule(" ,
5079
5070
" name = 'extra_dep_target'," ,
5080
5071
")" );
5081
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5082
5072
5083
5073
AnalysisResult analysisResult =
5084
5074
update (ImmutableList .of ("test/defs.bzl%a2" , "test/defs.bzl%a1" ), "//test:main" );
@@ -5174,7 +5164,6 @@ public void testTopLevelAspectOnAspect_differentRequiredRuleProviders() throws E
5174
5164
"rule_with_prov_b(" ,
5175
5165
" name = 'target_with_prov_b'," ,
5176
5166
")" );
5177
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5178
5167
5179
5168
AnalysisResult analysisResult =
5180
5169
update (ImmutableList .of ("test/defs.bzl%a2" , "test/defs.bzl%a1" ), "//test:main" );
@@ -5267,7 +5256,6 @@ public void testTopLevelAspectOnAspect_providerRequiredByMultipleAspects() throw
5267
5256
"simple_rule(" ,
5268
5257
" name = 'dep_target'," ,
5269
5258
")" );
5270
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5271
5259
5272
5260
AnalysisResult analysisResult =
5273
5261
update (
@@ -5401,7 +5389,6 @@ public void testTopLevelAspectOnAspect_diamondCase() throws Exception {
5401
5389
"r0(" ,
5402
5390
" name = 't0'," ,
5403
5391
")" );
5404
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5405
5392
5406
5393
AnalysisResult analysisResult =
5407
5394
update (
@@ -5427,8 +5414,8 @@ public void testTopLevelAspectOnAspect_diamondCase() throws Exception {
5427
5414
/**
5428
5415
* --aspects = a1, a2, a1: aspect a1 requires a2p, a2 provides a2p.
5429
5416
*
5430
- * <p>top level aspects list is deduplicated by default and only the first occurrence of a1 will
5431
- * be there so a1 won't get the value of a2p.
5417
+ * <p>top level aspects list is deduplicated when --incompatible_top_level_aspects_dependency is
5418
+ * disabled and only the first occurrence of a1 will be there so a1 won't get the value of a2p.
5432
5419
*/
5433
5420
@ Test
5434
5421
public void testTopLevelAspectOnAspect_duplicateAspectsIgnored () throws Exception {
@@ -5481,6 +5468,7 @@ public void testTopLevelAspectOnAspect_duplicateAspectsIgnored() throws Exceptio
5481
5468
"simple_rule(" ,
5482
5469
" name = 'dep_target'," ,
5483
5470
")" );
5471
+ useConfiguration ("--noincompatible_top_level_aspects_dependency" );
5484
5472
5485
5473
AnalysisResult analysisResult =
5486
5474
update (
@@ -5551,7 +5539,6 @@ public void testTopLevelAspectOnAspect_duplicateAspectsNotAllowed() throws Excep
5551
5539
"simple_rule(" ,
5552
5540
" name = 'dep_target'," ,
5553
5541
")" );
5554
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5555
5542
reporter .removeHandler (failFastHandler );
5556
5543
5557
5544
// The call to `update` does not throw an exception when "--keep_going" is passed in the
@@ -5630,7 +5617,6 @@ public void testTopLevelAspectOnAspect_requiredAspectProviderOnlyAvailableOnDep(
5630
5617
"simple_rule(" ,
5631
5618
" name = 'dep_target'," ,
5632
5619
")" );
5633
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5634
5620
5635
5621
AnalysisResult analysisResult = update (ImmutableList .of ("test/defs.bzl%a1" ), "//test:main" );
5636
5622
@@ -5697,7 +5683,6 @@ public void testTopLevelAspectOnAspect_multipleTopLevelTargets() throws Exceptio
5697
5683
"simple_rule(" ,
5698
5684
" name = 't2'," ,
5699
5685
")" );
5700
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5701
5686
5702
5687
AnalysisResult analysisResult =
5703
5688
update (ImmutableList .of ("test/defs.bzl%a2" , "test/defs.bzl%a1" ), "//test:t2" , "//test:t1" );
@@ -5783,7 +5768,6 @@ public void testTopLevelAspectOnAspect_multipleRequiredProviders() throws Except
5783
5768
"simple_rule(" ,
5784
5769
" name = 'dep_target'," ,
5785
5770
")" );
5786
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5787
5771
5788
5772
AnalysisResult analysisResult =
5789
5773
update (
@@ -5879,7 +5863,6 @@ public void testTopLevelAspectOnAspect_multipleRequiredProviders2() throws Excep
5879
5863
"simple_rule(" ,
5880
5864
" name = 'dep_target'," ,
5881
5865
")" );
5882
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5883
5866
5884
5867
AnalysisResult analysisResult =
5885
5868
update (
@@ -5914,9 +5897,8 @@ public void testTopLevelAspectOnAspect_multipleRequiredProviders2() throws Excep
5914
5897
* aspects = a1, a2; aspect a1 provides a1p provider and aspect a2 requires a1p provider. These
5915
5898
* top-level aspects are applied on top-level target `main` whose rule also provides a1p.
5916
5899
*
5917
- * <p>If the incompatible_top_level_aspects_dependency flag is used to establish the dependency
5918
- * between a1 and a2, the build will fail since a2 will receive provider a1p twice (from a1
5919
- * applied on `main` and from `main` target itself)
5900
+ * <p>By default, the dependency between a1 and a2 will be established, the build will fail since
5901
+ * a2 will receive provider a1p twice (from a1 applied on `main` and from `main` target itself).
5920
5902
*/
5921
5903
@ Test
5922
5904
public void testTopLevelAspects_duplicateRuleProviderError () throws Exception {
@@ -5951,7 +5933,6 @@ public void testTopLevelAspects_duplicateRuleProviderError() throws Exception {
5951
5933
" implementation = _my_rule_impl," ,
5952
5934
")" );
5953
5935
scratch .file ("test/BUILD" , "load('//test:defs.bzl', 'my_rule')" , "my_rule(name = 'main')" );
5954
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
5955
5936
reporter .removeHandler (failFastHandler );
5956
5937
5957
5938
// The call to `update` does not throw an exception when "--keep_going" is passed in the
@@ -5972,7 +5953,7 @@ public void testTopLevelAspects_duplicateRuleProviderError() throws Exception {
5972
5953
* aspects = a1, a2; aspect a1 provides a1p provider and aspect a2 requires a1p provider. These
5973
5954
* top-level aspects are applied on top-level target `main` whose rule also provides a1p.
5974
5955
*
5975
- * <p>If the incompatible_top_level_aspects_dependency flag is not used , aspects a1 and a2 will
5956
+ * <p>If the incompatible_top_level_aspects_dependency flag is disabled , aspects a1 and a2 will
5976
5957
* run independently and the build will succeed. a2 will only see the value of a1p provided by
5977
5958
* my_rule.
5978
5959
*/
@@ -6009,6 +5990,7 @@ public void testTopLevelAspects_duplicateRuleProviderPassed() throws Exception {
6009
5990
" implementation = _my_rule_impl," ,
6010
5991
")" );
6011
5992
scratch .file ("test/BUILD" , "load('//test:defs.bzl', 'my_rule')" , "my_rule(name = 'main')" );
5993
+ useConfiguration ("--noincompatible_top_level_aspects_dependency" );
6012
5994
reporter .removeHandler (failFastHandler );
6013
5995
6014
5996
AnalysisResult analysisResult =
@@ -6026,7 +6008,6 @@ public void testTopLevelAspects_duplicateRuleProviderPassed() throws Exception {
6026
6008
6027
6009
@ Test
6028
6010
public void testTopLevelAspectRequiresAspect_stackOfRequiredAspects () throws Exception {
6029
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6030
6011
scratch .file (
6031
6012
"test/defs.bzl" ,
6032
6013
"def _impl(target, ctx):" ,
@@ -6048,7 +6029,6 @@ public void testTopLevelAspectRequiresAspect_stackOfRequiredAspects() throws Exc
6048
6029
6049
6030
@ Test
6050
6031
public void testTopLevelAspectRequiresAspect_aspectRequiredByMultipleAspects () throws Exception {
6051
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6052
6032
scratch .file (
6053
6033
"test/defs.bzl" ,
6054
6034
"def _impl(target, ctx):" ,
@@ -6072,7 +6052,6 @@ public void testTopLevelAspectRequiresAspect_aspectRequiredByMultipleAspects() t
6072
6052
6073
6053
@ Test
6074
6054
public void testTopLevelAspectRequiresAspect_aspectRequiredByMultipleAspects2 () throws Exception {
6075
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6076
6055
scratch .file (
6077
6056
"test/defs.bzl" ,
6078
6057
"def _impl(target, ctx):" ,
@@ -6096,7 +6075,6 @@ public void testTopLevelAspectRequiresAspect_aspectRequiredByMultipleAspects2()
6096
6075
6097
6076
@ Test
6098
6077
public void testTopLevelAspectRequiresAspect_requireExistingAspect_passed () throws Exception {
6099
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6100
6078
scratch .file (
6101
6079
"test/defs.bzl" ,
6102
6080
"def _impl(target, ctx):" ,
@@ -6118,7 +6096,6 @@ public void testTopLevelAspectRequiresAspect_requireExistingAspect_passed() thro
6118
6096
6119
6097
@ Test
6120
6098
public void testTopLevelAspectRequiresAspect_requireExistingAspect_failed () throws Exception {
6121
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6122
6099
scratch .file (
6123
6100
"test/defs.bzl" ,
6124
6101
"def _impl(target, ctx):" ,
@@ -6153,7 +6130,6 @@ public void testTopLevelAspectRequiresAspect_requireExistingAspect_failed() thro
6153
6130
public void testTopLevelAspectRequiresAspect_requiredNativeAspect_parametersNotAllowed ()
6154
6131
throws Exception {
6155
6132
exposeNativeAspectToStarlark ();
6156
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6157
6133
scratch .file (
6158
6134
"test/defs.bzl" ,
6159
6135
"def _impl(target, ctx):" ,
@@ -6181,7 +6157,6 @@ public void testTopLevelAspectRequiresAspect_requiredNativeAspect_parametersNotA
6181
6157
@ Test
6182
6158
public void testTopLevelAspectRequiresAspect_requiredStarlarkAspect_parametersNotAllowed ()
6183
6159
throws Exception {
6184
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6185
6160
reporter .removeHandler (failFastHandler );
6186
6161
scratch .file (
6187
6162
"test/defs.bzl" ,
@@ -6211,7 +6186,6 @@ public void testTopLevelAspectRequiresAspect_requiredStarlarkAspect_parametersNo
6211
6186
6212
6187
@ Test
6213
6188
public void testTopLevelAspectRequiresAspect_ruleAttributes () throws Exception {
6214
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6215
6189
scratch .file (
6216
6190
"test/defs.bzl" ,
6217
6191
"RequiredAspectProv = provider()" ,
@@ -6299,7 +6273,6 @@ public void testTopLevelAspectRequiresAspect_inheritPropagationAttributes() thro
6299
6273
// base_aspect propagates over base_dep attribute and requires first_required_aspect which
6300
6274
// propagates over first_dep attribute and requires second_required_aspect which propagates over
6301
6275
// second_dep attribute
6302
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6303
6276
scratch .file (
6304
6277
"test/defs.bzl" ,
6305
6278
"BaseAspectProv = provider()" ,
@@ -6403,7 +6376,6 @@ public void testTopLevelAspectRequiresAspect_inheritPropagationAttributes() thro
6403
6376
public void testTopLevelAspectRequiresAspect_inheritRequiredProviders () throws Exception {
6404
6377
// aspect_a requires provider Prov_A and requires aspect_b which requires
6405
6378
// provider Prov_B and requires aspect_c which requires provider Prov_C
6406
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6407
6379
scratch .file (
6408
6380
"test/defs.bzl" ,
6409
6381
"Prov_A = provider()" ,
@@ -6529,7 +6501,6 @@ public void testTopLevelAspectRequiresAspect_inheritRequiredProviders() throws E
6529
6501
6530
6502
@ Test
6531
6503
public void testTopLevelAspectRequiresAspect_inspectRequiredAspectActions () throws Exception {
6532
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6533
6504
scratch .file (
6534
6505
"test/defs.bzl" ,
6535
6506
"BaseAspectProvider = provider()" ,
@@ -6586,7 +6557,6 @@ public void testTopLevelAspectRequiresAspect_inspectRequiredAspectActions() thro
6586
6557
@ Test
6587
6558
public void testTopLevelAspectRequiresAspect_inspectRequiredAspectGeneratedFiles ()
6588
6559
throws Exception {
6589
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6590
6560
scratch .file (
6591
6561
"test/defs.bzl" ,
6592
6562
"BaseAspectProvider = provider()" ,
@@ -6637,7 +6607,6 @@ public void testTopLevelAspectRequiresAspect_inspectRequiredAspectGeneratedFiles
6637
6607
@ Test
6638
6608
public void testTopLevelAspectRequiresAspect_withRequiredAspectProvidersSatisfied ()
6639
6609
throws Exception {
6640
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6641
6610
scratch .file (
6642
6611
"test/defs.bzl" ,
6643
6612
"prov_a = provider()" ,
@@ -6728,7 +6697,6 @@ public void testTopLevelAspectRequiresAspect_withRequiredAspectProvidersSatisfie
6728
6697
@ Test
6729
6698
public void testTopLevelAspectRequiresAspect_withRequiredAspectProvidersNotFound ()
6730
6699
throws Exception {
6731
- useConfiguration ("--incompatible_top_level_aspects_dependency" );
6732
6700
scratch .file (
6733
6701
"test/defs.bzl" ,
6734
6702
"prov_a = provider()" ,
0 commit comments