Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UX: eagerly validate the layer dependency declarations #101

Open
ncoghlan opened this issue Dec 18, 2024 · 0 comments
Open

UX: eagerly validate the layer dependency declarations #101

ncoghlan opened this issue Dec 18, 2024 · 0 comments
Labels
Category: Enhancement New feature or request good first issue Good for newcomers

Comments

@ncoghlan
Copy link
Collaborator

venvstacks doesn't currently validate that the dependency declarations in each layer are well-formed.

This means that when they're wrong, the user only gets notified via a potentially cryptic locking failure message from uv, rather than being told exactly which dependency declaration is incorrect.

It shouldn't be difficult to use packaging to do a validation pass over the dependency declarations when building the in-memory tree of layer specifications: https://packaging.pypa.io/en/stable/requirements.html

(Since we'll be parsing the input strings anyway, we could even switch to storing the requirements as packaging.requirement.Requirement instances rather than storing them as plain strings, which would serve to normalize the way they're written out to disk before invoking the locking command. The locking command output is already normalized by the locking tool)

@ncoghlan ncoghlan added Category: Enhancement New feature or request good first issue Good for newcomers labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant