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

Reduce verbosity of "simple" error messages #2422

Closed
halostatue opened this issue Aug 2, 2024 · 0 comments · Fixed by #2431
Closed

Reduce verbosity of "simple" error messages #2422

halostatue opened this issue Aug 2, 2024 · 0 comments · Fixed by #2431
Labels
enhancement New feature or request

Comments

@halostatue
Copy link

Mise error messages are verbose because of the facility used to print them:

$ mise self-update
Error:
   0: mise is installed via a package manager, cannot update

Location:
   src/cli/self_update.rs:39

Version:
   2024.8.4 macos-arm64 (2024-08-02)

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

I understand that it's nice to use the same output facility for all error messages, but in case of "simple" messages like this, I would expect to see something more like:

$ mise self-update
mise is installed via a package manager, cannot update

This is especially noisy because it happens on command-line rendering if there is an untrusted .mise.toml file:

Error:
   0: Config file is not trusted.
      Trust it with `mise trust`.

Location:
   src/config/config_file/mod.rs:214

Version:
   2024.8.4 macos-arm64 (2024-08-02)

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
$ |

Here, this message is both too verbose (I don't need location or version or the backtrace message) and insufficiently verbose (which config file is untrusted?; it could be ~/.config/mise/config.toml if I edited it recently). I would expect to see, instead:

Error: Config file `path/to/file/.mise.toml` is not trusted.
Trust it with `mise trust`.
$ |

I think there are errors that could happen where the location and version might be useful — but for the most part, I don't think that information is helpful to the casual user of mise.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant