<@U04S45AHA> On <https://github.com/pantsbuild/pan...
# development
a
@enough-analyst-54434 On https://github.com/pantsbuild/pants/pull/6405 - I quite like that in the bazel model every file is implicitly also a target - not suggesting any changes, just food for thought 🙂
e
That change does add an implicit target for the requirements.txt file (
Files(..., sources=['requirements.txt'])
). Do you mean food for thought that we should add that bazel idea to our core graph/fs traversal bits?
a
I mean that in bazel, you wouldn’t need the
files
target, because every
file
is already automatically a target; you could just depend on
:requirements.txt
Not saying it’s a thing we should add, but an interesting contrast 🙂
e
Gotcha. Not so interesting in a macro since it's a one time effort, but very interesting when hammering on BUILDs as a user!
a
Indeed :) also means that file dependencies are tracked in the graph the same as target dependencies, which I guess is becoming more true in v2, but has interesting effects for graph API goals
Output files are also implicitly targets, so: java_library(source = "Foo.java") Works equivalently whether Foo.java happens to be checked in, or generated by some other target, which I really like :)