mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
allow version to handle full virtual pyprojects
This commit is contained in:
parent
2788535d6e
commit
82aab8e265
2 changed files with 7 additions and 8 deletions
|
@ -231,7 +231,7 @@ async fn find_target(project_dir: &Path, package: Option<&PackageName>) -> Resul
|
|||
.with_context(|| format!("Package `{package}` not found in workspace"))?,
|
||||
)
|
||||
} else {
|
||||
VirtualProject::discover(
|
||||
VirtualProject::discover_defaulted(
|
||||
project_dir,
|
||||
&DiscoveryOptions::default(),
|
||||
&WorkspaceCache::default(),
|
||||
|
|
|
@ -1972,7 +1972,7 @@ fn virtual_empty() -> Result<()> {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: No `project` table found in: `[TEMP_DIR]/pyproject.toml`
|
||||
error: Missing `project.name` field in: pyproject.toml
|
||||
");
|
||||
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
@ -1996,7 +1996,7 @@ fn virtual_empty() -> Result<()> {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: No `project` table found in: `[TEMP_DIR]/pyproject.toml`
|
||||
error: Missing `project.name` field in: pyproject.toml
|
||||
");
|
||||
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
@ -2032,13 +2032,12 @@ fn add_virtual_dependency_group() -> Result<()> {
|
|||
|
||||
// Get the version (doesn't make sense)
|
||||
uv_snapshot!(context.filters(), context.version(), @r"
|
||||
success: true
|
||||
exit_code: 0
|
||||
success: false
|
||||
exit_code: 2
|
||||
----- stdout -----
|
||||
uv [VERSION] ([COMMIT] DATE)
|
||||
|
||||
----- stderr -----
|
||||
warning: Failed to read project metadata (No `project` table found in: `[TEMP_DIR]/pyproject.toml`). Running `uv self version` for compatibility. This fallback will be removed in the future; pass `--preview` to force an error.
|
||||
error: Missing `project.name` field in: pyproject.toml
|
||||
");
|
||||
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
@ -2064,7 +2063,7 @@ fn add_virtual_dependency_group() -> Result<()> {
|
|||
----- stdout -----
|
||||
|
||||
----- stderr -----
|
||||
error: No `project` table found in: `[TEMP_DIR]/pyproject.toml`
|
||||
error: Missing `project.name` field in: pyproject.toml
|
||||
");
|
||||
|
||||
let pyproject_toml = context.read("pyproject.toml");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue