https://pantsbuild.org/ logo
#development
Title
# development
w

witty-crayon-22786

07/06/2020, 10:16 PM
@hundreds-father-404, @happy-kitchen-89482: re: file-level deps
@happy-kitchen-89482: when you and i talked on Wednesday we discussed ignoring the problem of roots for now, and only focusing on inner nodes… did you end up having that conversation with @hundreds-father-404 as well?
h

happy-kitchen-89482

07/06/2020, 10:18 PM
Yes, Eric and I discussed what the easiest path to getting something working would be here, including that.
h

hundreds-father-404

07/06/2020, 10:18 PM
On thursday, we discussed that the spiritual equivalent of what we want is that you have an explicit target for every single BUILD file. This feature is that you can get that via Pants inferring the target, rather than having to do it explicitly The end effect is the same: one target per one file
Again, as we were DMing, this is not “file level deps”. This is “implicit targets that happen to have file-level precision”
w

witty-crayon-22786

07/06/2020, 10:19 PM
the difference between the two of those though, is that one theoretically needs to support “roots” of the graph, while the other doesn’t
only doing “inner nodes” means you don’t need to figure out the types of inner nodes… if i depend on you, you’re a library.
whereas if i run
./pants test ::
, “which things are tests?” is a harder question that can be deferred.
hence the focus on file-level deps, to support inner nodes.
(with the caveat that there was one open question after Benjy and my conversation though, which was
lint
needing “roots” as well, and needing type information.)
h

happy-kitchen-89482

07/06/2020, 10:22 PM
@hundreds-father-404 I think we discussed this, re at least at first requiring, say, binary/test targets to be explicit (we can then easily get rid of that requirement for test targets, at least, since we detect those by name).
h

hundreds-father-404

07/06/2020, 10:22 PM
What’s the point of that? The purpose of this project is to faciliate onboarding a new project. If you still need all your roots to be explicitly declared, I’m missing the benefit NB that
./pants fmt ::
would not work like Benjy wants because it never uses Dependencies. It purely considers the roots
I think we discussed this, re at least at first requiring, say, binary/test targets to be explicit
Stu is talking about something else, I think. Where do we do this inference? Only within
resolve_dependencies
rule (the inner nodes), or before Pants runs on anything when we calculate the universe of targets? You and I discussed on Thursday the latter
w

witty-crayon-22786

07/06/2020, 10:24 PM
@hundreds-father-404: same thing
test/binary here are roots
1
but yea, lint and fmt are still a problem as you and i mentioned.
h

hundreds-father-404

07/06/2020, 10:25 PM
they’re roots for the goals
run
,
binary
, and
test
, but not for
repl
,
fmt
,
lint
,
setup-py
,
filedeps
,
list
, etc
w

witty-crayon-22786

07/06/2020, 10:26 PM
@hundreds-father-404: i’m just saying that benjy and i are talking about the same thing re: https://pantsbuild.slack.com/archives/C0D7TNJHL/p1594074154476000?thread_ts=1594073804.474100&cid=C0D7TNJHL
h

hundreds-father-404

07/06/2020, 10:26 PM
not only does
./pants lint ::
need to work in a repo with zero BUILD files, but so does
./pants repl ::
and
./pants dependencies helloworld/app.py
h

happy-kitchen-89482

07/06/2020, 10:26 PM
I think @hundreds-father-404 is pointing out that the term "roots" is misleading in this discussion, since library targets can be roots in some cases
👍 1
h

hundreds-father-404

07/06/2020, 10:27 PM
it’s not adequate to special case
fmt
and
lint
afaict
h

happy-kitchen-89482

07/06/2020, 10:27 PM
In many cases in fact
h

hundreds-father-404

07/06/2020, 10:27 PM
would it be more effective to VC?
h

happy-kitchen-89482

07/06/2020, 10:27 PM
So I think this boils down to - "all inferred targets are library targets" for now
w

witty-crayon-22786

07/06/2020, 10:27 PM
right, which is important.
@hundreds-father-404: that or create a design doc, yea.
h

happy-kitchen-89482

07/06/2020, 10:28 PM
Can hop on a quick call
👍 1