You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying foo_library targets using bazel query, the targets will show up as type _fake_rule_name because that was their first name.
This is counter-intuitive, and it often becomes problematic in cases when users would like to override this behavior.
One concrete example where an override makes sense: #7977 (comment)
One should be allowed to specify the canonical rule name of a rule definition, overriding the behavior that this must be the first exported name.
Proposal:
Add a string parameter to the rule() function, exported_name. When specified, the rule will have this canonical name. When unspecified, the rule will take on the name of the first exported name (previous behavior). This change will not require an incompatible change flag.
The text was updated successfully, but these errors were encountered:
When a rule is defined, the first name of that rule gets special treatment as the forever-name of the rule (for example, under
bazel query
)For example:
When querying
foo_library
targets usingbazel query
, the targets will show up as type_fake_rule_name
because that was their first name.This is counter-intuitive, and it often becomes problematic in cases when users would like to override this behavior.
One concrete example where an override makes sense: #7977 (comment)
One should be allowed to specify the canonical rule name of a rule definition, overriding the behavior that this must be the first exported name.
Proposal:
Add a string parameter to the
rule()
function,exported_name
. When specified, the rule will have this canonical name. When unspecified, the rule will take on the name of the first exported name (previous behavior). This change will not require an incompatible change flag.The text was updated successfully, but these errors were encountered: