Closed aiuto closed 2 months ago
cc: @ murali42
cc: @gregestren
Er, didn't mean to remove other reviewers per se, just meant I'd like to ensure Sasha makes the decision here since this concerns bzl_library.
Looks reasonable to me.
@aiuto should we merge this?
I think we should merge it. I no longer have merge rights, so I didn't do it myself.
Wrap bzl_library in a macro so that we can force off some global attributes that are never appropriate for analysis of build rules.
The motivation is that when people use
package(default_compatible_with=X)
alongsidebzl_library
, they have accidentally marked their build rules as eligible to deliver to some target environment. This can cause...
scoped tests on cross platform projects to fail because the user defined rules are not the code we are shipping.An alternative idea was to use a rule initializer for this. That is the better solution, but it would require a newer version of Bazel, so I opted for the backwards compatible solution.