Skip to content

Commit 4cae26c

Browse files
rickeylevBlaze Rules Copybara
authored andcommitted
docs: mention that Label() should be used for config_setting labels
This is to help users understand why they might get hard to understand errors when they pass labels in, and how they can fix it. PiperOrigin-RevId: 528836275
1 parent 92e5641 commit 4cae26c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/analysis_test.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,10 @@ def analysis_test(
165165
config_settings: A dictionary of configuration settings to change for the target under
166166
test and its dependencies. This may be used to essentially change 'build flags' for
167167
the target under test, and may thus be utilized to test multiple targets with different
168-
flags in a single build
168+
flags in a single build. NOTE: When values that are labels (e.g. for the
169+
--platforms flag), it's suggested to always explicitly call `Label()`
170+
on the value before passing it in. This ensures the label is resolved
171+
in your repository's context, not rule_testing's.
169172
extra_target_under_test_aspects: An optional list of aspects to apply to the target_under_test
170173
in addition to those set up by default for the test harness itself.
171174
collect_actions_recursively: If true, runs testing_aspect over all attributes, otherwise

0 commit comments

Comments
 (0)