chshersh / tool-sync

🧰 Download pre-built binaries of all your favourite tools with a single command
https://crates.io/crates/tool-sync
Mozilla Public License 2.0
72 stars 17 forks source link

Improve error messages when the tag is not found #69

Open chshersh opened 2 years ago

chshersh commented 2 years ago

The error message could be improved into saying something like:

There's no tag 'latest'

or even with the suggestion when possible in some cases:

There's no tag 'v13.0.0'. Perhaps you meant '13.0.0'?

See the following issue for more context:

crudiedo commented 2 years ago

I'd like to implement that if nobody's currently working on it.

One thing that would be good to discuss is the maximum \ threshold Levenshtein distance value to drop all the "possible" tags above that (and then get the most similar one) - I'm thinking about 3 or 4, but I would love to hear your thoughts!

MitchellBerend commented 2 years ago

I'm not working on it.

I'm thinking about 3 or 4, but I would love to hear your thoughts!

It's probably a good idea to make this number a constant so its easily tunable at some later point.