mirror of
https://github.com/astral-sh/uv.git
synced 2025-09-01 08:17:24 +00:00
Remove editable: false
support (#5987)
## Summary This doesn't actually work yet. We'll re-add it in the future. Closes #5958.
This commit is contained in:
parent
8eada4077a
commit
cd0171a2ed
6 changed files with 8 additions and 24 deletions
|
@ -198,7 +198,6 @@ pub(crate) fn lower_requirement(
|
||||||
},
|
},
|
||||||
Source::Workspace {
|
Source::Workspace {
|
||||||
workspace: is_workspace,
|
workspace: is_workspace,
|
||||||
editable,
|
|
||||||
} => {
|
} => {
|
||||||
if !is_workspace {
|
if !is_workspace {
|
||||||
return Err(LoweringError::WorkspaceFalse);
|
return Err(LoweringError::WorkspaceFalse);
|
||||||
|
@ -238,7 +237,7 @@ pub(crate) fn lower_requirement(
|
||||||
install_path: member.root().clone(),
|
install_path: member.root().clone(),
|
||||||
lock_path: relative_to_main_workspace,
|
lock_path: relative_to_main_workspace,
|
||||||
url,
|
url,
|
||||||
editable: editable.unwrap_or(true),
|
editable: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Source::CatchAll { .. } => {
|
Source::CatchAll { .. } => {
|
||||||
|
|
|
@ -224,8 +224,6 @@ pub enum Source {
|
||||||
/// When set to `false`, the package will be fetched from the remote index, rather than
|
/// When set to `false`, the package will be fetched from the remote index, rather than
|
||||||
/// included as a workspace package.
|
/// included as a workspace package.
|
||||||
workspace: bool,
|
workspace: bool,
|
||||||
/// `true` by default.
|
|
||||||
editable: Option<bool>,
|
|
||||||
},
|
},
|
||||||
/// A catch-all variant used to emit precise error messages when deserializing.
|
/// A catch-all variant used to emit precise error messages when deserializing.
|
||||||
CatchAll {
|
CatchAll {
|
||||||
|
@ -286,10 +284,7 @@ impl Source {
|
||||||
if workspace {
|
if workspace {
|
||||||
return match source {
|
return match source {
|
||||||
RequirementSource::Registry { .. } | RequirementSource::Directory { .. } => {
|
RequirementSource::Registry { .. } | RequirementSource::Directory { .. } => {
|
||||||
Ok(Some(Source::Workspace {
|
Ok(Some(Source::Workspace { workspace: true }))
|
||||||
editable,
|
|
||||||
workspace: true,
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
RequirementSource::Url { .. } => {
|
RequirementSource::Url { .. } => {
|
||||||
Err(SourceError::WorkspacePackageUrl(name.to_string()))
|
Err(SourceError::WorkspacePackageUrl(name.to_string()))
|
||||||
|
|
|
@ -1555,8 +1555,7 @@ mod tests {
|
||||||
},
|
},
|
||||||
"sources": {
|
"sources": {
|
||||||
"bird-feeder": {
|
"bird-feeder": {
|
||||||
"workspace": true,
|
"workspace": true
|
||||||
"editable": null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"pyproject_toml": {
|
"pyproject_toml": {
|
||||||
|
@ -1569,8 +1568,7 @@ mod tests {
|
||||||
"uv": {
|
"uv": {
|
||||||
"sources": {
|
"sources": {
|
||||||
"bird-feeder": {
|
"bird-feeder": {
|
||||||
"workspace": true,
|
"workspace": true
|
||||||
"editable": null
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"workspace": {
|
"workspace": {
|
||||||
|
|
|
@ -1367,7 +1367,7 @@ fn add_workspace_editable() -> Result<()> {
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.uv.sources]
|
[tool.uv.sources]
|
||||||
child2 = { workspace = true, editable = true }
|
child2 = { workspace = true }
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
|
@ -197,10 +197,9 @@ $ uv add ~/projects/bar/
|
||||||
### Workspace member
|
### Workspace member
|
||||||
|
|
||||||
To declare a dependency on a workspace member, add the member name with `{ workspace = true }`. All
|
To declare a dependency on a workspace member, add the member name with `{ workspace = true }`. All
|
||||||
workspace members must be explicitly stated. Workspace members are
|
workspace members must be explicitly stated. Workspace members are always
|
||||||
[editable](#editable-dependencies) by default; `editable = false` may be included to install them as
|
[editable](#editable-dependencies) . See the [workspace](./workspaces.md) documentation for more
|
||||||
regular dependencies. See the [workspace](./workspaces.md) documentation for more details on
|
details on workspaces.
|
||||||
workspaces.
|
|
||||||
|
|
||||||
```toml title="pyproject.toml"
|
```toml title="pyproject.toml"
|
||||||
[project]
|
[project]
|
||||||
|
|
7
uv.schema.json
generated
7
uv.schema.json
generated
|
@ -1210,13 +1210,6 @@
|
||||||
"workspace"
|
"workspace"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"editable": {
|
|
||||||
"description": "`true` by default.",
|
|
||||||
"type": [
|
|
||||||
"boolean",
|
|
||||||
"null"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"workspace": {
|
"workspace": {
|
||||||
"description": "When set to `false`, the package will be fetched from the remote index, rather than included as a workspace package.",
|
"description": "When set to `false`, the package will be fetched from the remote index, rather than included as a workspace package.",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue