-
Notifications
You must be signed in to change notification settings - Fork 785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the pip-compile-multi
use case?
#5487
Comments
We support those kinds of |
Yes that's exactly it. |
Hey, so say in the simple/common case where I want to manage a prod and dev setup (as documented here https://docs.astral.sh/uv/pip/compile/#locking-requirements): So presumably I would do both
That's all dandy, but now how do i guarantee that dev stays aligned with prod for the dependencies that they have in common? Presumably if i run both at the same time, with a little bit of luck they should stay aligned, though that's unless there's a conflict between the two. Say dev may have a sub-dependency that forces an older version of a shared/common dependency. It's not a simple problem to solve, but it's a common/important use case. Any way to provide these guarantees using uv currently? Any hope that'd get on the roadmap? Also what would be the best solution? |
@mistercrunch -- I think the common solution here would be to do something like this:
So, you use the output of the first command as a constraint for the second command. Then the versions will be kept in sync. |
Oh, smart! I should have thought of that. Is it guaranteed to produce matching version for all common libs and fail if somehow it can't find a match? I guess if it's not 100% guaranteed I could write a simple script to assert that common libs match as part of our CI. |
I'm going through some effort myself trying to adopt |
One thing on my side is ensuring my future Clearly there's more traction with Ideally the dependency management system would have semantics/conventions about supporting different setups (while keeping common libs on the same version). Ideally Stepping back, it seems like this should be a very common need and arguably should be in-scope for |
Taking a deeper look into the PR adding uv support to dependabot (open Pr as of the time of this comment), it looks like it's set up to have dependabot run a simple |
For Apache Superset, we have fairly complex dependency management and have to use pip-compile-multi as a result.
pip-compile-multi
is pretty much simply pip-compile with support for.in
files to reference other.in
files, making it such that you can create say abase.in
file and build say aci.in
file ordev.in
file that references that base file, allowing use to do a bit of composition with dependencies and keeping things DRY.The main issue with pip-compile-multi are that 1. it's slow, 2. it's not compatible with
dependabot
and 3. I don't think it's actively maintainedI'm curious whether
uv
has support for this use case and/or whether it may be on the roadmap.The text was updated successfully, but these errors were encountered: