mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
![]() In the case of a direct URL sdist, it includes a hash, and this hash is not (and probably should not) be part of the `source`. The URL is part of the source because it permits uniquely identifying this particular package as distinct from any other package with the same name. But, we should still include the hash. So in this commit, we rejigger what we did previously to make it so the `SourceDist` value isn't even constructed at all when it isn't needed. This also in turn lets us make the hash field required (which we will do in a subsequent commit). This does mean the URL is stored twice for direct URL dependencies in the lock file. This seems non-ideal. We could make the URL for the sdist optional, but this seems like a bridge too far? Another choice is to add a new key to `distribution` that is just `direct-url-hash`, but that also seems mucky. Maybe the duplication here is okay given the relative rarity of direct URL dependencies. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |