Allow using requires_none and requires_not_none at the same time#647
Conversation
5b81c97 to
23d63c8
Compare
|
I don't think I understand why these combinations were forbidden in the first place, or why we only want to allow specific ones now. |
|
maybe @armandomontanez remembers, i just assume we were being conservative and hadn't tested the full combos |
|
The original reason these were restricted to one per rule was to eliminate confusion around logical behavior of specifying multiple (e.g. OR vs AND). I'm sympathetic to the desire to reduce complexity of some rules by compacting these, but I'd rather that be done as a clearer proposal for how we can prioritize communication of expected behavior to users of the API. The specific request is:
|
23d63c8 to
86ac297
Compare
|
I updated the logic to make sure you don't pass the same var to both, I didn't check what the toolchain logic verifies but i think we'll have a nicer error either way. I think |
This combination can be useful during migrations from old bazel features to new ones. You add your args as requiring the new feature to be not none, and the old feature to be none.
86ac297 to
6d583b1
Compare
This combination can be useful during migrations from old bazel build variables
to new ones. You add your args as requiring the new feature to be not
none, and the old feature to be none.