Improve error message when editable requirement doesn't exist (#1024)

Making these a lot clearer in the common case by reducing the depth of
the error.
This commit is contained in:
Charlie Marsh 2024-01-20 12:59:18 -05:00 committed by GitHub
parent 53b7e3cb4f
commit d9cc9dbf88
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 34 additions and 18 deletions

View file

@ -992,10 +992,10 @@ impl<'a, T: BuildContext> SourceDistCachedBuilder<'a, T> {
BuildKind::Editable,
)
.await
.map_err(|err| SourceDistError::Build(editable.to_string(), err))?
.map_err(|err| SourceDistError::BuildEditable(editable.to_string(), err))?
.wheel(editable_wheel_dir)
.await
.map_err(|err| SourceDistError::Build(editable.to_string(), err))?;
.map_err(|err| SourceDistError::BuildEditable(editable.to_string(), err))?;
let filename = WheelFilename::from_str(&disk_filename)?;
// We finally have the name of the package and can construct the dist
let dist = Dist::Source(SourceDist::Path(PathSourceDist {