flat-zoo-31952
03/12/2022, 9:48 PMpython_?
target and make generators for that. And then you'd need to be able to have some sensible way of writing addresses for those targets. š¤happy-kitchen-89482
03/12/2022, 10:14 PMbitter-ability-32190
03/12/2022, 10:52 PMbitter-ability-32190
03/12/2022, 10:53 PMflat-zoo-31952
03/12/2022, 11:04 PMflat-zoo-31952
03/12/2022, 11:05 PMbitter-ability-32190
03/12/2022, 11:27 PMhundreds-father-404
03/12/2022, 11:49 PMpython_source
⢠a dir: go_package
⢠no sources: pex_binary
Pants's Python backend is heavily centered on the idea of the "atom" targets being based on exactly one file. So you'd need to roughly recreate the Python backend to instead be <insert the atom>-based
It is theoretically possible to do this all. And you indeed could use target generators to spit out those "atom" targets for you. I think the biggest challenge is figuring out what that atom looks like, and how you apply it to things like Black, MyPy, and Pytest, which tend to be file-basedhundreds-father-404
03/12/2022, 11:50 PMPants's generic dependency code doesn't really care about sources
--changed-since
does though - that cannot get more atomic than a file. And I'm not sure how it could, given that we use git diff
which gives a list of file namesbitter-ability-32190
03/13/2022, 12:06 AMchanged
was pluggable, you can then generate an ast diff from the git diff of those fileshundreds-father-404
03/13/2022, 12:41 AM--changed-since
rule could be changed to support it - the Rust engine is agnostic to how we implement this all, and the Target API should be flexible enough to handle this.
Should we change it? Unclear / prob no. But could we? I thinkhappy-kitchen-89482
03/13/2022, 1:02 AMI've always thought comments or whitespace or formatting shouldn't invalidate the cacheThat is nuanced, because it would depend on what you're trying to do. For example, it absolutely should invalidate the cache if you're running a linter... But, for example, if you make whitespace changes to a .java file and it compiles to an identical .class file, then everything downstream from that will still be resolved from cache
happy-kitchen-89482
03/13/2022, 1:02 AMbitter-ability-32190
03/13/2022, 1:11 AMbitter-ability-32190
03/13/2022, 1:16 AMhappy-kitchen-89482
03/13/2022, 2:26 AMhappy-kitchen-89482
03/13/2022, 2:26 AMhundreds-father-404
03/13/2022, 2:28 AMI mean you could of course change the cache key behavior based on some criteria.including continuing work, like bug fixes + more complex code slowing down everything else v1 had plugin authors manually reasoning about caching, and it was tough to get right! "There are only two hard things in Computer Science: cache invalidation and naming things."
happy-kitchen-89482
03/13/2022, 7:11 AMcurved-television-6568
03/13/2022, 7:58 AMflat-zoo-31952
03/13/2022, 12:56 PMflat-zoo-31952
03/13/2022, 12:57 PMflat-zoo-31952
03/13/2022, 1:12 PM