mirror of https://github.com/astral-sh/uv
Add missing `Download` variants to diagnostics (#9101)
This commit is contained in:
parent
415e3dcd24
commit
17181d9e59
|
|
@ -79,6 +79,10 @@ impl OperationDiagnostic {
|
||||||
download_and_build(dist, Box::new(err));
|
download_and_build(dist, Box::new(err));
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
pip::operations::Error::Resolve(uv_resolver::ResolveError::Download(dist, err)) => {
|
||||||
|
download(dist, Box::new(err));
|
||||||
|
None
|
||||||
|
}
|
||||||
pip::operations::Error::Resolve(uv_resolver::ResolveError::Build(dist, err)) => {
|
pip::operations::Error::Resolve(uv_resolver::ResolveError::Build(dist, err)) => {
|
||||||
build(dist, Box::new(err));
|
build(dist, Box::new(err));
|
||||||
None
|
None
|
||||||
|
|
@ -90,11 +94,11 @@ impl OperationDiagnostic {
|
||||||
download_and_build(dist, Box::new(err));
|
download_and_build(dist, Box::new(err));
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
pip::operations::Error::Requirements(uv_requirements::Error::Build(dist, err)) => {
|
pip::operations::Error::Requirements(uv_requirements::Error::Download(dist, err)) => {
|
||||||
build(dist, Box::new(err));
|
download(dist, Box::new(err));
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
pip::operations::Error::Prepare(uv_installer::PrepareError::Build(dist, err)) => {
|
pip::operations::Error::Requirements(uv_requirements::Error::Build(dist, err)) => {
|
||||||
build(dist, Box::new(err));
|
build(dist, Box::new(err));
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
@ -109,6 +113,10 @@ impl OperationDiagnostic {
|
||||||
download(dist, Box::new(err));
|
download(dist, Box::new(err));
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
pip::operations::Error::Prepare(uv_installer::PrepareError::Build(dist, err)) => {
|
||||||
|
build(dist, Box::new(err));
|
||||||
|
None
|
||||||
|
}
|
||||||
pip::operations::Error::Requirements(err) => {
|
pip::operations::Error::Requirements(err) => {
|
||||||
if let Some(context) = self.context {
|
if let Some(context) = self.context {
|
||||||
let err = miette::Report::msg(format!("{err}"))
|
let err = miette::Report::msg(format!("{err}"))
|
||||||
|
|
|
||||||
|
|
@ -5911,12 +5911,12 @@ fn offline_direct_url() -> Result<()> {
|
||||||
.arg("requirements.in")
|
.arg("requirements.in")
|
||||||
.arg("--offline"), @r###"
|
.arg("--offline"), @r###"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 2
|
exit_code: 1
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
error: Failed to download `iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl`
|
× Failed to download `iniconfig @ https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl`
|
||||||
Caused by: Network connectivity is disabled, but the requested data wasn't found in the cache for: `https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl`
|
╰─▶ Network connectivity is disabled, but the requested data wasn't found in the cache for: `https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl`
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -9957,13 +9957,13 @@ fn not_found_direct_url() -> Result<()> {
|
||||||
uv_snapshot!(context.filters(), context.pip_compile()
|
uv_snapshot!(context.filters(), context.pip_compile()
|
||||||
.arg("requirements.in"), @r###"
|
.arg("requirements.in"), @r###"
|
||||||
success: false
|
success: false
|
||||||
exit_code: 2
|
exit_code: 1
|
||||||
----- stdout -----
|
----- stdout -----
|
||||||
|
|
||||||
----- stderr -----
|
----- stderr -----
|
||||||
error: Failed to download `iniconfig @ https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl`
|
× Failed to download `iniconfig @ https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl`
|
||||||
Caused by: Failed to fetch: `https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl`
|
├─▶ Failed to fetch: `https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl`
|
||||||
Caused by: HTTP status client error (404 Not Found) for url (https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl)
|
╰─▶ HTTP status client error (404 Not Found) for url (https://files.pythonhosted.org/packages/ef/a6/fake/iniconfig-2.0.0-py3-none-any.whl)
|
||||||
"###
|
"###
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue