Skip to content
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

Documentation genrule example - maybe avoid $(location ..) or $(locations ..) #15078

Open
drewranck opened this issue Mar 18, 2022 · 0 comments
Labels
help wanted Someone outside the Bazel team could own this P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Rules-Server Issues for serverside rules included with Bazel type: documentation (cleanup)

Comments

@drewranck
Copy link

Description of the problem / feature request:

https://docs.bazel.build/versions/main/be/general.html#genrule_examples

Elsewhere I've seen that we're not supposed to be using $(location) calls and should instead be using $(rootpath ..) or $(execpath ..)

#2475 (comment)

I just spent hours debugging why a genrule of mine didn't work, when it wasn't exactly clear from the example that

  1. We shouldn't be using $(location ..)
  2. That $(location ..) can return different things in Skylark depending on srcs vs other generated outs.

Maybe this is clear for people who've been in Bazel for years and are aware of the changes to all make-style vars.

@sgowroji sgowroji added type: documentation (cleanup) untriaged team-Documentation Documentation improvements that cannot be directly linked to other team labels labels Mar 19, 2022
@sgowroji sgowroji added the team-Rules-Server Issues for serverside rules included with Bazel label Nov 22, 2022
@keertk keertk added P3 We're not considering working on this, but happy to review a PR. (No assignee) help wanted Someone outside the Bazel team could own this and removed untriaged labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Someone outside the Bazel team could own this P3 We're not considering working on this, but happy to review a PR. (No assignee) team-Documentation Documentation improvements that cannot be directly linked to other team labels team-Rules-Server Issues for serverside rules included with Bazel type: documentation (cleanup)
Projects
None yet
Development

No branches or pull requests

4 participants