-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
existing_rule and rule.outputs use different Starlark representations for attributes #2883
Comments
closing in favor of #2884 |
There are two separate problems here: this one is a problem with the design; the other one (#2884) is a problem with the documentation. Please re-open this issue. |
Thanks for paying attention, re-opened. |
Ideally existing_rule's attr types should be closely aligned with what you actually pass when instantiating a target. But to avoid ambiguity with respect to labels, we might have to use the If implicit outputs were to be redesigned, I'd want them to agree with existing_rules and the rest of the loading phase on the representation of attributes. But since we want to ditch implicit outputs, I'm less worried about that case. Regardless, the current design of implicit outputs doesn't inform what we should do for existing_rules very much. |
Hi there! We're doing a clean up of old issues and will be closing this one. Please reopen (or ping me to reopen) if you’d like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
(this issue originally reported by @alandonovan)
Observe the output of the program below:
The existing_rule function converts a rule's attribute dictionary back into Skylark form. Similarly, the rule.outputs function converts some rule attributes into Skylark form. However, they use different conversion logic. For example, existing_rule converts labels to strings whereas rule.outputs preserves labels as labels.
This is confusing to users, since it requires twice as much documentation to specify (or would do, if either conversion were actually documented), and confusing to implementors, since it requires twice as much logic to implement.
They should use the same logic.
The text was updated successfully, but these errors were encountered: