Repository navigation
Conversation
The functions are moved verbatim, only parse_uv_lock_json is made public.
The uv.lock parser now only translates the lock file into a list of lock_entry values and the format independent lock_requirements selects the distribution for each platform. This allows reusing the selection for other lock file formats, e.g. pylock.toml. There is no change in behaviour.
Do not infer a direct reference from an empty file name, a distribution URL without a file name would otherwise produce a 'foo @ ' requirement line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The uv.lock parsing mixes the uv specific parts (decoding the package
entries, the extras, the platform reachability walk) with the format
independent wheel selection and the construction of the requirement
structs. Supporting more lock file formats, e.g.
pylock.toml, or perpackage settings would mean duplicating or further entangling that code.
This moves the uv.lock parsing out of
parse_requirements.bzland splits it:lock_model.bzlhaslock_dist,lock_entryandlock_requirements.The latter selects the distribution for each target platform and returns
the same structs as before.
uv_lock.bzltranslates the uv.lock contents intolock_entryvalues,including the target platforms of each entry.
The first commit is a verbatim move; the behaviour does not change.
Stack (fork test PRs): on top of #4.