Skip to content

Print a help when a package was not found #3026

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

Open
ruben-arts opened this issue Jan 29, 2025 · 0 comments · May be fixed by #3572
Open

Print a help when a package was not found #3026

ruben-arts opened this issue Jan 29, 2025 · 0 comments · May be fixed by #3572
Labels
cli Issue related to CLI good first issue Good for newcomers UX Related to the User Experience of pixi

Comments

@ruben-arts
Copy link
Contributor

Problem description

Issue

When running pixi global install bla or pixi add bla you'll get an error message that is not really helping the user going forward.

> pixi add bla
Error: 
  × failed to solve the conda requirements of 'default' 'win-64'
  ╰─▶ Cannot solve the request because of: No candidates were found for bla *.

Solution

What would be much better is to execute a search and print similar packages and add a help message with options to figure out what to do next.

For example:

> pixi add bla
 ×  No candidates were found for bla * for 'win-64'.

  Did you mean one of these?
    - blaz (1.2.3)
    - bla-tools (0.8.1)
    - bla-lib (2.1.0)

  Tip: Run `pixi search bla` to explore available packages.

We have a similarity implementation in our TomlError:

TomlError::TomlError(toml_span::Error { kind, .. }) => match kind {
which could be reused as the algoritm for this implementation.

@ruben-arts ruben-arts added good first issue Good for newcomers cli Issue related to CLI UX Related to the User Experience of pixi labels Jan 29, 2025
@baszalmstra baszalmstra added the pixi label Mar 27, 2025 — with Linear
@baszalmstra baszalmstra removed the pixi label Apr 1, 2025
@aryan0931 aryan0931 linked a pull request Apr 11, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issue related to CLI good first issue Good for newcomers UX Related to the User Experience of pixi
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants