Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove editable: false support #5987

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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<()> {