Support workspace to workspace path dependencies (#4833)

Add support for path dependencies from a package in one workspace to a
package in another workspace, which it self has workspace dependencies.

Say we have a main workspace with packages `a` and `b`, and a second
workspace with `c` and `d`. We have `a -> b`, `b -> c`, `c -> d`. This
would previously lead to a mangled path for `d`, which is now fixed.

Like distribution paths, we split workspace paths into an absolute
install path and a relative (or absolute, if the user provided an
absolute path) lock path.

Part of https://github.com/astral-sh/uv/issues/3943
This commit is contained in:
konsti 2024-07-16 22:38:46 +02:00 committed by GitHub
parent b5ec859273
commit abb6ac5127
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 410 additions and 88 deletions

View file

@ -172,7 +172,8 @@ impl<'a, Context: BuildContext> SourceTreeResolver<'a, Context> {
};
let source = SourceUrl::Directory(DirectorySourceUrl {
url: &url,
path: Cow::Borrowed(source_tree),
install_path: Cow::Borrowed(source_tree),
lock_path: Cow::Borrowed(source_tree),
editable: false,
});