hundreds-father-404
07/21/2020, 10:00 PM:utils
. strutil.py
depends on dirutil.py
. No dep inference. Then, ./pants dependencies strutil.py
will not end up including dirutil.py
or :utils
, and we won’t include dirutil.py
anywhere in the chrootresources
. When you use a file arg on a resources
target, what should dependencies
show?
--
Possibly, the unification of file args and generated subtargets was a bad idea?
--
Possibly, we should only use generated subtargets for file args if --dependency-inference
is enabled? But, that doesn’t solve the first question in this message about target types without inference.witty-crayon-22786
07/21/2020, 10:15 PMhundreds-father-404
07/21/2020, 10:15 PM!
validation.
This thread is entirely about false negatives, that we are going to leave off dependencies on files within the original owning target that really do exist.witty-crayon-22786
07/21/2020, 10:21 PMPossibly, we should only use generated subtargets for file args ifor perhaps the inverse? a file Address is always subject to inference? it doesn’t resolve the resources issue… but could perhaps address that by never generating subtargets in that case.is enabled? But, that doesn’t solve the first question in this message about target types without inference.--dependency-inference
hundreds-father-404
07/21/2020, 10:32 PMdependencies
, but also some addresses; and those files aren’t truly files.witty-crayon-22786
07/21/2020, 10:40 PMhundreds-father-404
07/21/2020, 10:59 PMwitty-crayon-22786
07/21/2020, 11:22 PMhundreds-father-404
07/23/2020, 5:09 PMwitty-crayon-22786
07/23/2020, 5:10 PMI’m not sure how to resolve this. Possibly, when using a generated subtarget, we should no matter what create a dependency on every other file in the target?this is what i was thinking, yea.
hundreds-father-404
07/23/2020, 5:11 PMfiles
targets, so the best that we can do is assume it depends on every other file in the original base target.witty-crayon-22786
07/23/2020, 5:11 PMhundreds-father-404
07/23/2020, 5:12 PMwitty-crayon-22786
07/23/2020, 5:12 PMOtherwise, yeah, I don’t see any other solution. We will never have inference on things likeso, actually: i responded to this on your other issue: i don’t think that this is the case. we will probably never infer a dep into a files targettargets, so the best that we can do is assume it depends on every other file in the original base target.files
hundreds-father-404
07/23/2020, 5:13 PM./pants dependencies f1.json
show? I argue f2.json
witty-crayon-22786
07/23/2020, 5:14 PMWhat do you mean?@hundreds-father-404: just agreeing with the issue in this thread. if i run
./pants test $file
, it’s dependencies need to be present, even without inferencedependencies f1.json
: i think that i disagree, but not strongly… ie, i think that it would be fine either wayhundreds-father-404
07/23/2020, 5:20 PMbut an an Address gets you exactly one TargetI would love to keep this a thing. It makes it much easier to reason through how Pants internals work.
witty-crayon-22786
07/23/2020, 5:26 PM./pants list $file
. yes, that’s how you “find the owning target” today, but arguably, that is a misfeature.$file
as the output address../pants list $file
giving you the owning target as potentially problematic on the thread where we introduced it… i don’t think that it was the wrong decision, because holy mackerel has it been useful)hundreds-father-404
07/23/2020, 5:29 PM./pants list --owner
or ./pants list --original
maybewitty-crayon-22786
07/23/2020, 5:29 PM./pants dependees
would do it.hundreds-father-404
07/23/2020, 5:33 PM(assuming that base targets depend on file/sub targets)I remain skeptical to this model change. https://pantsbuild.slack.com/archives/C0D7TNJHL/p1595523264215100?thread_ts=1595463762.203000&cid=C0D7TNJHL It’s already confusing enough for rule authors to have “original targets” vs. “generated subtargets”. Adding “generated base target” to the mix makes my head spin hehe
./pants list --original
is reasonable, right? Outside of maybe a bad name?witty-crayon-22786
07/23/2020, 5:36 PMIt’s already confusing enough for rule authors to have “original targets” vs. “generated subtargets”. Adding “generated base target” to the mix makes my head spin hehethis is 100% internal though… see the other thread, but afaict the only way it impacts @rule authors is that they might need to decide to “group” targets when invoking. for end users, i think that our goal is “file deps”, and making that externally consistent
hundreds-father-404
07/23/2020, 5:38 PMit depends on subtargets, each of which own oneIt depends on subtargets in addition to any other dependencies it has. We lose any distinction between “my own files” vs. “my direct dependencies”
witty-crayon-22786
07/23/2020, 5:39 PM--original
as more like --and-direct-dependees
?We lose any distinction between “my own files” vs. “my direct dependencies”yes, that is true. it would be a bit like both the sources and the dependencies were actually dependencies, but with a different way of declaring them.
hundreds-father-404
07/23/2020, 5:40 PM./pants list f.txt
will give back f.txt
, which is generated from :example
. I want an option to be able to instead have ./pants list f.txt
output :example
.witty-crayon-22786
07/23/2020, 5:41 PMlist --original
question)