Hi Pants experts, we have bumped the Pants version...
# general
p
Hi Pants experts, we have bumped the Pants version to the latest 2.16. The problem after the upgrade is that it takes a long time to run command ".pants dependencies ::" as part of our CI step. The purpose of running this step is to ensure the repository dependency tree is valid. We would like to know if there is a lightweight alternative? We have already tried remote build cache and it doesn't help a lot. Thanks!
e
following!
b
Just for a bit more context: 1. what version were you on before? 2. does the slowdown happen locally, not just on CI? 3. I'm not 100% sure what sort of problems
pants dependencies ::
might identify. Do you have examples of a problem that caused you to start using it in CI?
f
Really interested in this too. I’m diving into performance issues around dependency calculation so please let us know your answers to these questions so we can try to help
f
1. I'm not 100% sure what sort of problems
pants dependencies ::
might identify. Do you have examples of a problem that caused you to start using it in CI?
FWIW building the dependency graph • would find any visibility violations in 2.16 (in 2.17 we'll be able to run the
lint
goal for this). • fail on any unowned imports (if the settings are set appropriately). and there may be a few more use cases, so running it may make total sense (unless the validation they perform may be performed without constructing the dependency graph)
👍 2
p
Hi @broad-processor-92400 here is my reply to your questions: 1. previously we use Pants 2.14 2. The slow down happens locally as well as on CI hosts. 3. We used to have commits that causes
./pants dependencies ::
to fail, so we added this check to the CI workflow.
f
this won't help you with the performance issues, but I am genuinely curious what kind of failures did the
dependencies
goal catch for you? I'd love to improve my CI workflow, too 🙂
p
Hi @fresh-cat-90827 - one of our developers added
./pants dependencies ::
to detect incorrect BUILD scripts. Just FYI - this issue can be caught by unit tests, so we have decided to remove
./pants dependencies ::
from the CI workflow.
f
If it’s about catching incorrect build scripts could
pants tailor --check ::
meet your needs?
f
Yes, and
pants update-build-files --check ::
would also check for any formatting / semantics update that's missing in your BUILD files (in addition to using unknown fields for targets, misspelling target names etc etc). Neither of the commands construct the dependency graph, so that should cover some of your needs.