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

replace pep508_rs modern version specifiers #466

Closed
baszalmstra opened this issue Nov 16, 2023 · 2 comments
Closed

replace pep508_rs modern version specifiers #466

baszalmstra opened this issue Nov 16, 2023 · 2 comments
Assignees
Labels
✨ enhancement Feature request

Comments

@baszalmstra
Copy link
Contributor

The support for "modern" package specifiers in pep508_rs is very underdeveloped. We want to replace that with a custom implementation. For now, we can forgo URL dependencies since those are not supported by pixi. I would like to see an implementation where if a string is specified it must be a version specifier and not a full requirement. If you want to add more complex behavior to your dependency you should create a toml table.

E.g:

foo = "1.2.3"
foo = { version = "1.2.3", extras=["all"] }
foo = "*"

Poetry also supports additional operators that we could translate like ^ and ~, lets not do that for now. We can add that later.

Also, errors must be contextual:

foo = { version="3.2.1", extras=["b$r"] }

should result in an error message saying that "b$r" is not a valid extra name. Currently, we produce these types of errors:

data did not match any variant of untagged enum RequirementModern
@ruben-arts
Copy link
Contributor

Is there a specific Pep that includes what you want to have as a version type or what is it precisely combining?

@baszalmstra
Copy link
Contributor Author

Fixed by #471 and #479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ enhancement Feature request
Projects
None yet
Development

No branches or pull requests

2 participants