-
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
Genrule recommends using $(location) but it's described as legacy reference to either $(execpath) or $(rootpath) #25204
Comments
That warning might be outdated after 57b3a15, which added @hvadehra what do you think? |
The API is private though, only former native rulesets can use it. |
Good call. So |
Looking at bazel/src/main/java/com/google/devtools/build/lib/analysis/LocationExpander.java Lines 377 to 424 in 43aa96b
execpath(s) and rootpath(s) are exactly equivalent to the conditional behavior of location(s) , so we just need to update the docs/examples to stop referring to location
|
Page link:
https://bazel.build/reference/be/general#genrule_args
Problem description (include actual vs expected text, if applicable):
From https://bazel.build/reference/be/make-variables#predefined_label_variables:
But https://bazel.build/reference/be/general#genrule suggests using $ (location) as well as presents various examples with using it instead of using $(execpath). Multiple examples within bazel codebase also use $ (location). The genrule description links to the make-variables page that contains recommendation not to use $ (location).
Where do you see this issue? (include link to specific section of the page, if applicable)
No response
Any other information you'd like to share?
It would be nice to clarify whether genrule actually should stick to use $ (location) or whether examples and documentation should use $ (execpath) instead.
The text was updated successfully, but these errors were encountered: