Replies: 2 comments 5 replies
-
Thanks for the suggestion, I think it makes much sense. Currently, we have a community-contributed plugin Mina that can divide the project into different builds but it doesn't handle dependency resolution yet. Maybe we can make improvements based on the project, the docs need to be improved as well. |
Beta Was this translation helpful? Give feedback.
4 replies
-
uh...i maybe think of these commands, if all set, mina will support more pdm native commands' additional args. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello @frostming & all,
is there any way, how I can achieve the mono-repo strategy with pdm? That is, how can I have two independent (even mutually exclusive) sets of dependencies within one project?
In the world of
requirements.txt
that would mean to have two different reqs files -requirements-alfa.txt
andrequirements-beta.txt
and {resolve dependency graph & compile lock file} for each req independently.The backstory for this is: with our team, we currently develop a new interface for our service. We decided to have just one repository for the easy of development workflow. In the meantime, we build two independent services - first with the old interface, second with the new interface. These two interfaces have significantly different dependencies. That is why we would like to be able to resolve dep-graph and compile lock file for each.
I know about optional deps
[project.optional-dependencies.<name>]
and about dev deps[tool.pdm.dev-dependencies]
. But neither fulfil our needs, because the dependency graph is resolved across all these groups. E.g. the following hack attempt fails:It is possible to compile into different lock files with the new
--lockfile
flag. But the input file (pyproject.toml
) can still be just one (PEP defined, yes). So is there any other way how to achieve this?Possible solution/implementation would be to allow to explicitly set the resolving for just some groups, e.g.:
pdm lock --lockfile "alfa.lock" --group alfa --isolated-resolving
This would be similar to
environment
(s) in hatch,or (hopefully soon to be implemented)
subproject
(s) in poetryThanks for any suggestions :)
Beta Was this translation helpful? Give feedback.
All reactions