ancient-lawyer-12557
11/18/2023, 6:09 PMbroad-processor-92400
11/18/2023, 7:38 PMpants peek ::
, to find python_requirement
targets that aren’t depended upon.
NB however that https://github.com/pantsbuild/pants/issues/12733 will affect this: processing only that will only identify which of those targets aren’t used directly, they still might be used by another package… but, unless the requirements are being used to constrain versions, this is fine; the transitive deps will still be pulled in appropriately.
If it matters, I’m sure we could brainstorm ideas to improve behaviour.curved-television-6568
11/18/2023, 10:08 PMpants dependents 3rdparty/requirements#dist-name
broad-processor-92400
11/19/2023, 2:17 AMpants list --filter-target-type=python_requirement ::
+ that dependents
call. https://www.pantsbuild.org/docs/reference-filter#target_typeancient-lawyer-12557
11/19/2023, 10:04 AMlittle-pilot-11155
11/20/2023, 4:54 PMpants list --filter-target-type=python_requirement :: | xargs -I {} bash -c "pants -lerror dependees {} | wc -l | grep -q '1' || echo '==> Kill {}'"