Skip to content

universal-lock: deal with hashes (or lack there of) for some types of distributions #3357

@BurntSushi

Description

@BurntSushi

Currently, a ResolvedDist does not always have a hash. This is a problem for the lock file where we'd ideally want hashes for at least direct URL dependencies. We currently also don't have hashes for Git or Path dependencies, but I think we probably don't want those. (Cargo doesn't use hashes for that case either.)

So I think we need to fix this:

fn from_direct_dist(direct_dist: &DirectUrlBuiltDist) -> Wheel {
Wheel {
url: direct_dist.url.to_url(),
// TODO: We want a hash for the artifact at the URL.
hash: todo!(),
filename: direct_dist.filename.clone(),
}
}

And this:

fn from_direct_dist(direct_dist: &DirectUrlSourceDist) -> SourceDist {
SourceDist {
url: direct_dist.url.to_url(),
// TODO: We want a hash for the artifact at the URL.
hash: todo!(),
}
}

And then probably update the data structures so that hash isn't required for the git and path sources.

Metadata

Metadata

Assignees

Labels

previewExperimental behavior

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions