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

Raise Errors on parseable but nonsensical MatchSpecs #13

Open
remkade opened this issue Nov 1, 2022 · 1 comment
Open

Raise Errors on parseable but nonsensical MatchSpecs #13

remkade opened this issue Nov 1, 2022 · 1 comment
Labels
question Further information is requested

Comments

@remkade
Copy link
Owner

remkade commented Nov 1, 2022

Its possible to create a MatchSpec that is valid but nonsensical. Lets error out and give a helpful message in those cases.

Examples

Here's a few examples that would be parseable, but don't really make any sense.

# Package name matches everything:
*

# Channel shouldn't be globbable, its dangerous. Might be useful on searching though?
conda-*/python

# Certain keys don't make sense to allow partial globs
[sha256="abcd*" md5="abc*"]

# Questionable, maybe encourage people to omit key/values that already default to matching everything?
[license="*"]
@remkade remkade added the question Further information is requested label Nov 2, 2022
@remkade
Copy link
Owner Author

remkade commented Nov 2, 2022

I think this is really up for debate. Certain things could be useful in searches, like really open ended globs. And in other cases would be dangerous (conda install * for example).

I could see conda search *[license="GPL*"] being a helpful query for some cases. And if we have a UI (like Anaconda Server maybe?) that likes to list packages always based on a search, defaulting to * would actually be a good thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Todo
Development

No branches or pull requests

1 participant