Closed zmitchell closed 5 months ago
The problem is that you use completion files generated by an older version, at some point decided to break compatibility to make things easier. I'll look into how other apps are handling it I guess.
Would it be better if I replace the panic with a print to stderr + exit with error code 0? This way user will still get a notification about required changes on their side but it will look something like this instead
myapp --foo<TAB>
Unsupported output revision 4, you need to genenerate your shell completion files for the app
Current behavior looks like this:
% cargo-asm Unsupported output revision 17, you need to genenerate your shell completion files for the app ```
Do you still think silent failure is preferable?
I still think silent failure is preferable. Maybe emit a debug-level log message so that a developer can debug the situation. An end user that gets their system into a weird state such that autocomplete no longer works is more likely to be annoyed by seeing these messages rather than autocomplete mysteriously not working.
Okay. I'll make it a silent failure in the release mode and something with a message in dev mode.
Now it panics in dev mode but simply exits without producing anything in release mode.
I somehow got myself into a state where completions are panicking when I hit
TAB
:It's probably a bug on my end regarding how I got into this state, but in my opinion a silent failure is much better from a UX perspective than hitting
TAB
and seeing this.