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

Fix repoquery issues #2330

Merged
merged 8 commits into from
Mar 6, 2023
Merged

Fix repoquery issues #2330

merged 8 commits into from
Mar 6, 2023

Conversation

Hind-M
Copy link
Member

@Hind-M Hind-M commented Feb 28, 2023

Fix #2320 items

@Hind-M Hind-M self-assigned this Feb 28, 2023
Copy link
Member

@JohanMabille JohanMabille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the review, I was wondering: should we switch to use_local automatically when the channels are empty, and warn the users? This will simplify the logic (no need for an additional option in the command line for instance).

Or do we want to give the user the ability to use the local packags only even if a channel(s) is (are) provided?

micromamba/src/repoquery.cpp Outdated Show resolved Hide resolved
micromamba/src/repoquery.cpp Outdated Show resolved Hide resolved
micromamba/src/repoquery.cpp Outdated Show resolved Hide resolved
micromamba/src/repoquery.cpp Outdated Show resolved Hide resolved
@Hind-M
Copy link
Member Author

Hind-M commented Mar 3, 2023

After the review, I was wondering: should we switch to use_local automatically when the channels are empty, and warn the users? This will simplify the logic (no need for an additional option in the command line for instance).

Or do we want to give the user the ability to use the local packags only even if a channel(s) is (are) provided?

Hmm I think that there is a case where the channels can be configured using a rc file or other config sources, and the user may want to choose to use local repoquery for installed packages or remote (--channel option is not given by the user either way but in case of --use-local=0, the configured channels would be used).

@Hind-M Hind-M marked this pull request as ready for review March 3, 2023 09:34
@JohanMabille JohanMabille merged commit e549d07 into mamba-org:main Mar 6, 2023
@jaimergp
Copy link
Contributor

jaimergp commented Mar 6, 2023

The extra message is breaking the JSON output in my dev environment :(

{
    "query": {
        "query": "conda >23.1.0",
        "type": "search"
    },
    "result": {
        "msg": "No entries matching \"conda-forge::conda>23.1.0\" found",
        "pkgs": [],
        "status": "OK"
    }
}conda-forge::conda>23.1.0 may not be installed. Try specifying a channel with '-c,--channel' option

Parsing this blindly gives json.decoder.JSONDecodeError: Extra data: line 11 column 2 (char 223)

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

Successfully merging this pull request may close these issues.

[Micromamba] repoquery depends and repoquery whoneeds only work with installed packages
3 participants