Skip to content

Commit

Permalink
fix: match all conditions in config_setting (#1306)
Browse files Browse the repository at this point in the history
* fix: match all conditions in config_setting

According to the documentation above the config_setting rule,
it should match all conditions in values.

Bazel works the same way:
https://docs.bazel.build/versions/master/configurable-attributes.html

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>

* Regenerate rules

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
  • Loading branch information
sagikazarmark authored Oct 19, 2020
1 parent afcfd42 commit 5739244
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rules/config_rules.build_defs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def config_setting(name:str, values:dict, visibility:list=None):
For example: {'cpu': 'amd64'} is successful if the CPU architecture is amd64.
visibility (list): Visibility of the rule.
"""
on = any([_config_on(k, v) for k, v in sorted(values.items())])
on = all([_config_on(k, v) for k, v in sorted(values.items())])
return build_rule(
name = name,
outs = [name],
Expand Down
Loading

0 comments on commit 5739244

Please sign in to comment.