Skip to content

Commit

Permalink
Remove editable: false support
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Aug 10, 2024
1 parent e097f94 commit 8817595
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 24 deletions.
3 changes: 1 addition & 2 deletions crates/uv-distribution/src/metadata/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ pub(crate) fn lower_requirement(
},
Source::Workspace {
workspace: is_workspace,
editable,
} => {
if !is_workspace {
return Err(LoweringError::WorkspaceFalse);
Expand Down Expand Up @@ -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 { .. } => {
Expand Down
7 changes: 1 addition & 6 deletions crates/uv-workspace/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()))
Expand Down
6 changes: 2 additions & 4 deletions crates/uv-workspace/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1555,8 +1555,7 @@ mod tests {
},
"sources": {
"bird-feeder": {
"workspace": true,
"editable": null
"workspace": true
}
},
"pyproject_toml": {
Expand All @@ -1569,8 +1568,7 @@ mod tests {
"uv": {
"sources": {
"bird-feeder": {
"workspace": true,
"editable": null
"workspace": true
}
},
"workspace": {
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/tests/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ fn add_workspace_editable() -> Result<()> {
]
[tool.uv.sources]
child2 = { workspace = true, editable = true }
child2 = { workspace = true }
"###
);
});
Expand Down
7 changes: 3 additions & 4 deletions docs/concepts/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]