You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[error("Package is not included as workspace package in `tool.uv.workspace`")]
490
-
UndeclaredWorkspacePackage,
532
+
#[error("`{0}` is included as a workspace member, but is missing an entry in `tool.uv.sources` (e.g., `{0} = {{ workspace = true }}`)")]
533
+
MissingWorkspaceSource(PackageName),
534
+
#[error("`{0}` is included as a workspace member, but references a {1} in `tool.uv.sources`. Workspace members must be declared as workspace sources (e.g., `{0} = {{ workspace = true }}`).")]
535
+
NonWorkspaceSource(PackageName,SourceKind),
536
+
#[error("`{0}` references a workspace in `tool.uv.sources` (e.g., `{0} = {{ workspace = true }}`), but is not a workspace member")]
537
+
UndeclaredWorkspacePackage(PackageName),
491
538
#[error("Can only specify one of: `rev`, `tag`, or `branch`")]
492
539
MoreThanOneGitRef,
493
540
#[error("Package `{0}` references an undeclared index: `{1}`")]
╰─▶ `child` is included as a workspace member, but references a path in `tool.uv.sources`. Workspace members must be declared as workspace sources (e.g., `child = { workspace = true }`).
6295
+
"###);
6296
+
6297
+
Ok(())
6298
+
}
6299
+
6300
+
/// Lock a workspace member with a non-workspace source.
6301
+
#[test]
6302
+
fn lock_no_workspace_source() -> Result<()> {
6303
+
let context = TestContext::new("3.12");
6304
+
6305
+
let pyproject_toml = context.temp_dir.child("pyproject.toml");
6306
+
pyproject_toml.write_str(
6307
+
r#"
6308
+
[project]
6309
+
name = "project"
6310
+
version = "0.1.0"
6311
+
requires-python = ">=3.12"
6312
+
dependencies = ["child"]
6313
+
6314
+
[tool.uv.workspace]
6315
+
members = ["child"]
6316
+
"#,
6317
+
)?;
6318
+
6319
+
let child = context.temp_dir.child("child");
6320
+
fs_err::create_dir_all(&child)?;
6321
+
6322
+
let pyproject_toml = child.child("pyproject.toml");
0 commit comments