mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-31 15:57:26 +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 {
|
||||
workspace: is_workspace,
|
||||
editable,
|
||||
} => {
|
||||
if !is_workspace {
|
||||
return Err(LoweringError::WorkspaceFalse);
|
||||
|
@ -238,7 +237,7 @@ pub(crate) fn lower_requirement(
|
|||
install_path: member.root().clone(),
|
||||
lock_path: relative_to_main_workspace,
|
||||
url,
|
||||
editable: editable.unwrap_or(true),
|
||||
editable: true,
|
||||
}
|
||||
}
|
||||
Source::CatchAll { .. } => {
|
||||
|
|
|
@ -224,8 +224,6 @@ pub enum Source {
|
|||
/// When set to `false`, the package will be fetched from the remote index, rather than
|
||||
/// included as a workspace package.
|
||||
workspace: bool,
|
||||
/// `true` by default.
|
||||
editable: Option<bool>,
|
||||
},
|
||||
/// A catch-all variant used to emit precise error messages when deserializing.
|
||||
CatchAll {
|
||||
|
@ -286,10 +284,7 @@ impl Source {
|
|||
if workspace {
|
||||
return match source {
|
||||
RequirementSource::Registry { .. } | RequirementSource::Directory { .. } => {
|
||||
Ok(Some(Source::Workspace {
|
||||
editable,
|
||||
workspace: true,
|
||||
}))
|
||||
Ok(Some(Source::Workspace { workspace: true }))
|
||||
}
|
||||
RequirementSource::Url { .. } => {
|
||||
Err(SourceError::WorkspacePackageUrl(name.to_string()))
|
||||
|
|
|
@ -1555,8 +1555,7 @@ mod tests {
|
|||
},
|
||||
"sources": {
|
||||
"bird-feeder": {
|
||||
"workspace": true,
|
||||
"editable": null
|
||||
"workspace": true
|
||||
}
|
||||
},
|
||||
"pyproject_toml": {
|
||||
|
@ -1569,8 +1568,7 @@ mod tests {
|
|||
"uv": {
|
||||
"sources": {
|
||||
"bird-feeder": {
|
||||
"workspace": true,
|
||||
"editable": null
|
||||
"workspace": true
|
||||
}
|
||||
},
|
||||
"workspace": {
|
||||
|
|
|
@ -1367,7 +1367,7 @@ fn add_workspace_editable() -> Result<()> {
|
|||
]
|
||||
|
||||
[tool.uv.sources]
|
||||
child2 = { workspace = true, editable = true }
|
||||
child2 = { workspace = true }
|
||||
"###
|
||||
);
|
||||
});
|
||||
|
|
|
@ -197,10 +197,9 @@ $ uv add ~/projects/bar/
|
|||
### Workspace member
|
||||
|
||||
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
|
||||
[editable](#editable-dependencies) by default; `editable = false` may be included to install them as
|
||||
regular dependencies. See the [workspace](./workspaces.md) documentation for more details on
|
||||
workspaces.
|
||||
workspace members must be explicitly stated. Workspace members are always
|
||||
[editable](#editable-dependencies) . See the [workspace](./workspaces.md) documentation for more
|
||||
details on workspaces.
|
||||
|
||||
```toml title="pyproject.toml"
|
||||
[project]
|
||||
|
|
7
uv.schema.json
generated
7
uv.schema.json
generated
|
@ -1210,13 +1210,6 @@
|
|||
"workspace"
|
||||
],
|
||||
"properties": {
|
||||
"editable": {
|
||||
"description": "`true` by default.",
|
||||
"type": [
|
||||
"boolean",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"workspace": {
|
||||
"description": "When set to `false`, the package will be fetched from the remote index, rather than included as a workspace package.",
|
||||
"type": "boolean"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue