Hey all! I'm an engineer at <Cavnue>. We have a po...
# welcome
r
Hey all! I'm an engineer at Cavnue. We have a polyglot repository and recently integrated Pants to help our workflows. One question that came up as we started to utilize Pants was how to handle dev vs prod dependencies? Right now we utilize a similar approach to the Pantsbuild repo in that we have a single third party dependency list for our Python projects. However, we are quickly seeing some dependency conflicts due to third party packages that we use for dev that have other package versions pinned (that conflict with our prod reqs). Is there a best practice on how to handle this?
👋 3
c
that sounds like one of the main motivations for using multiple resolves/lockfiles. https://www.pantsbuild.org/2.18/docs/python/overview/lockfiles#multiple-lockfiles
r
That's what I figured but wanted to see whether there was a separate way to do this via python_requirements target
h
Ideally you'd find a single resolve that works for dev and prod, if you can... That will save you a fair amount of pain.
What is a specific example of such a conflict? How were you working with each set of deps in the pre-Pants setup?
r
This was something we just ran into. But the reason it came up was from
apache-beam
and
dill
. Beam locks dill on
dill<0.3.2 and >=0.3.1.1
but we needed a version higher than that
Our solution was to have separate resolves since a majority of the conflicts come during dev vs. prod
Prior to pants, we were packaging more traditionally via pyproject.toml at each source root. So we were able to utilize different versions for different third party packages
h
What I don't understand is the distinction between dev and prod. Bean and Dill are both prod runtime deps no?
When I think of "dev dependencies" I think of things like dev-time tools (pytest, mypy, etc)
r
This is more in relation to production vs. internal. In this sense, production relates more to what we deploy vs dev/internal to some additional tools we use internally that do not make it out to production, but cause some dependency conflicts
h
I see, so that does sound like a multiple resolves kind of situation