mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-01 12:24:15 +00:00
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:
parent
b5ec859273
commit
abb6ac5127
13 changed files with 410 additions and 88 deletions
|
|
@ -166,7 +166,8 @@ impl<'a> From<&'a PathSourceDist> for PathSourceUrl<'a> {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct DirectorySourceUrl<'a> {
|
||||
pub url: &'a Url,
|
||||
pub path: Cow<'a, Path>,
|
||||
pub install_path: Cow<'a, Path>,
|
||||
pub lock_path: Cow<'a, Path>,
|
||||
pub editable: bool,
|
||||
}
|
||||
|
||||
|
|
@ -180,7 +181,8 @@ impl<'a> From<&'a DirectorySourceDist> for DirectorySourceUrl<'a> {
|
|||
fn from(dist: &'a DirectorySourceDist) -> Self {
|
||||
Self {
|
||||
url: &dist.url,
|
||||
path: Cow::Borrowed(&dist.install_path),
|
||||
install_path: Cow::Borrowed(&dist.install_path),
|
||||
lock_path: Cow::Borrowed(&dist.lock_path),
|
||||
editable: dist.editable,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue