You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about developing in a python monorepo. I know we can use resolve and lockfile to generate the exported virtual env for any dependencies you like. But I want to streamline it for each package in a monorepo. What I want to achieve is that I can switch to any package's dedicated virtual env (meaning no other dependencies from other packages) in the monorepo. The problem for resolve is that if you make packge1's dependency to use resolve="package1", then for package2 which depends on package1, you should also make resolve="package1" in order to include all the dependencies for its virtual env. But this means the package1's virtual env will also include package2's dependencies which is not what we want.
So one way to make a fully isolated virtual env is that assuming we have a lib1, and package1, package2 which both depends on lib1, then we should do following:
for lib1's dependencies, we make resolve=parametrize("lib1", "package1", "package2")
for package1, we make it resolve="package1",
for package2 we make it resolve="package2".
So in this case, we can export these three virtual envs for these three packages. But the thing is that we the monorepo has lots packages who depend on each other, this method becomes unscalable. If a lib is needed by N packages, then it needs resolve=parametrize("lib1", "package1", "package2", ... , "packageN").
I am think is it possible to reuse resolve, for example:
for lib1, we make resolve="lib1"
for package1, we make it resolve="package1", resolve_reuse=["lib1", ...],
for package2 we make it resolve="package2", resolve_reuse=["lib1", ...].
Do we have something similar like this or there is some other way to do it? pls advise. thank you!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi community,
I have a question about developing in a python monorepo. I know we can use
resolveandlockfileto generate the exported virtual env for any dependencies you like. But I want to streamline it for each package in a monorepo. What I want to achieve is that I can switch to any package's dedicated virtual env (meaning no other dependencies from other packages) in the monorepo. The problem forresolveis that if you make packge1's dependency to useresolve="package1", then for package2 which depends on package1, you should also makeresolve="package1"in order to include all the dependencies for its virtual env. But this means the package1's virtual env will also include package2's dependencies which is not what we want.So one way to make a fully isolated virtual env is that assuming we have a lib1, and package1, package2 which both depends on lib1, then we should do following:
resolve=parametrize("lib1", "package1", "package2")resolve="package1",resolve="package2".So in this case, we can export these three virtual envs for these three packages. But the thing is that we the monorepo has lots packages who depend on each other, this method becomes unscalable. If a lib is needed by N packages, then it needs
resolve=parametrize("lib1", "package1", "package2", ... , "packageN").I am think is it possible to reuse
resolve, for example:resolve="lib1"resolve="package1", resolve_reuse=["lib1", ...],resolve="package2", resolve_reuse=["lib1", ...].Do we have something similar like this or there is some other way to do it? pls advise. thank you!
Beta Was this translation helpful? Give feedback.
All reactions