Hi. We have a large python-django monorepo. Bazel...
# general
p
Hi. We have a large python-django monorepo. Bazel and Pants are being considered now. I would love to understand why pants is better suited for python when compared with Bazel. I have seen people saying this (example) but want to articulate this better internally. Thanks
f
My 2¢: Pants is much simpler. I think for v2 these folks have put in a lot of work to make digraph-based build tools much more accessible for a general audience, where before they have been mostly used in large organizations that routinely invest lots of resources in tools for developers. I've been able to set up a functioning pants setup in essentially my spare time that's intended to be shared by 30-40 developers. My attempts to do this with Bazel and Buck never even got off the ground, as I stumbled on initial build issues and voluminous documentation.
To bring this down to earth: Pants is easy enough to use that I'd consider pants as a build tool for a "regular" python repo that contained a single artifact. I'd never consider Buck or Bazel for something like that.
c
Just converted a largish python/django monorepo with about 10 devs to pants 2.x and we are very happy. We looked at Buck/Bazel briefly and they just seemed overly complicated. If we could have a dedicated engineer or team on build tools that might have made us consider them more carefully.
h
Hey Senthil, welcome! Thanks Gordon and Josh for weighing in! Indeed, a major objective for us is to empower orgs to have an excellent build experience regardless of their size, and without needing to have a dedicated team of build engineers. A key differentiator is dependency inference, which is intended to greatly cut down on boilerplate: https://blog.pantsbuild.org/dependency-inference/ Pants is still not as simple as we'd like and there are also some performance optimizations we're targeting, but we've made a lot of progress with the 2.0 release. See https://groups.google.com/g/pants-devel/c/F8Saug3BrFw/m/ZtWDP4YmDwAJ for our recently released public roadmap A downside is Pants v2 currently only supporting Python (and Bash). But there are plans to add more languages and we're also eager to support folks in the community who want to jumpstart this
h
I would also add that we are working on adding Django-specific features. For example, making dependency inference understand implicit Django dependencies that aren't reflected by import statements (e.g., that an app depends on its migrations, and that a
settings.py
depends on the modules it lists as strings in its INSTALLED_APPS). So Pants will become increasingly Django-aware.
1
To @gorgeous-eve-12553's point - we use Django internally, so we're invested in it...
1