flat-zoo-31952
12/05/2022, 2:50 PMexample/lib.py
I would expect files that import that like example/app.py
to be an affected transitive dependent, but it doesn't seem like this is the case. Is there a way to enable this behavior if it exists? Or does that imply scanning deps on two different versions of the worktree?--changed-dependees=transitive
?enough-analyst-54434
12/06/2022, 4:23 PMflat-zoo-31952
12/06/2022, 4:43 PMwt=$(mktemp -d)
git worktree add -f $wt $changed_since_ref > /dev/null
cd $wt
./pants dependees --transitive ${deleted_files[@]}
cd -
git worktree remove $wt > /dev/null
is the best i can come up with off the top of my headwitty-crayon-22786
12/06/2022, 5:41 PM--unowned-dependency-behavior=error
flat-zoo-31952
12/06/2022, 5:43 PMunmatched_build_file_globs = error
it might cover 99% but I can come up with an edge case: removing a conftest.py in a test folder that contains other sources that match the sources
globs in the python_test_utils
target (like blah_tests.pyi
or something custom). Because of the other sources, unmatched_build_file_globs
won't trigger, and because nothing explicitly imports conftest, unowned_dependency_behavior
won't catch that. Otherwise I think you're right that those two options do it. But this seems to be a consequence of the kinda magical behavior of conftests