Replies: 5 comments 10 replies
-
Hi @enadeau! I have tried out uv workspaces and found that even if they share the same lock-file, the built artifacts are separate things. When building an app, that has the workspace dependencies to other parts, they will be represented as third-party deps when building wheels. I might have done things wrong, though. My impression is that workspaces has a similar developer experience as Polylith, with the editable dependencies. I thought that I had solved most of the quirks with missing dependencies, but I probably have missed out on something. Yes, please share some more info about this so I can investigate! 🙏 The correctness of the |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick response I've put a small example repo. It contains a single base that uses fastapi and pydantic-settings. The corresponding project list fastapi as a dependencies but not pydantic-settings however poly check is not complaining. I've also setup a specific branch with a lock file for the project but the poly check command is still not complaining Let me know if I can provide any help |
Beta Was this translation helpful? Give feedback.
-
There's a new version out (CLI v1.18.0, and Poetry plugin 1.30.0) 😄 It will use strict mode when the third-party dependencies are found in a lock file. |
Beta Was this translation helpful? Give feedback.
-
Nice and thanks for quick response! I've updated the cli version on my example, and it now finds the missing dependency on the no-workspace branch. For the main branch, there's a bit of a twist. When using workspaces, uv uses a single lock file for all the projects. So the lock file for the api project is located at the root of the repo. This unique lock file ensures the same version of all dependencies are used across all projects. You can actually get the locked dependencies for the api project when you run
Supporting this would be a nice featured to add to polylith. I'd be happy to help with that but would appreciate some pointer on where to get started 😃 |
Beta Was this translation helpful? Give feedback.
-
Thank you guys. I was looking precisely for that today. I just have to update poly-cli |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm new to the polylith but I'm looking at using it in conjunction with uv to retructure a project. I'd like to use uv workspaces. The key benefit of it being to have a single shared lock file for all the projects. It ensures that that all the projects are running with the exact same version of the dependencies as development environment.
This seems to be a solution to #180
Is that a patterns that work well with polylith? This is not the way the polylith uv example does not use this feature and example with poetry seems to also use a different lockfile for each project.
I've at least been experimenting with it and seen the
poly check
missing some dependencies and not behaving as I'd expect it. Maybe this is related to having a unique lock file.I'd be happy to provide and example or more detail if you think this is something worth exploring
Beta Was this translation helpful? Give feedback.
All reactions