was this a deliberate choice to mark a target gene...
# development
f
was this a deliberate choice to mark a target generator as changed when any of the files it owns is deleted?
Copy code
$ rm cheeseshop/repository/package.py
$ git add cheeseshop/ 
$ git commit -m "delete file"
[main b7f25cd] delete file
 1 file changed, 395 deletions(-)
 delete mode 100644 cheeseshop/repository/package.py

$ git log --diff-filter=D --summary | grep delete     
    delete file
 delete mode 100644 cheeseshop/repository/package.py

$ pants --changed-since=origin/main list         
cheeseshop/repository:repository
🧵
✅ 1
If so and this is how we want thing to be, perhaps I shall extend the docs at least, because this may result in a surprise when piping the output further:
Copy code
$ pants --changed-since=origin/main list | xargs pants filedeps                                                                                   
BUILD
cheeseshop/repository/BUILD
cheeseshop/repository/__init__.py
cheeseshop/repository/properties.py
cheeseshop/repository/query.py
cheeseshop/repository/repository.py
cheeseshop/repository/types.py
It may be unfair to consider all of these files to be changed just because they were in the same directory / owned by the same target generator. One could filter the target generators out with
pants --changed-since=origin/main list | xargs pants --filter-target-type="-python_sources" filedeps
, but this is not obvious, I think.
c
I think so yes, consider there may be lingering dependencies to the removed file, but if we rely solely on testing based on changes that would go through undetected.
h
Yeah, very deliberate. Andreas is correct
f
I see. Thanks!
b
There was another recent discussion along these lines that might have some more tidbits of interest: https://pantsbuild.slack.com/archives/C046T6T9U/p1701140687240669