profile
viewpoint

Ask questionsShow different status indicator for semver-compatible updates

First let me say that I just recently discovered your extension on Twitter and I love it. That said, I think it could be better still, so here's one little suggestion.

Is your feature request related to a problem? Please describe. When reviewing dependency versions I'm usually hunting for semver-incompatible updates, since I use cargo update to bump all the semver-compatible ones. I noticed that your extension already shows 👍 for versions that are set to "1" for example, but actually it could/should also do this for crates that are set to "1.0.1" for example, since these are semver-compatible cargo will pull in the updates automatically. Setting it to 1.0.1 might be common if you've never tested your crate with 1.0.0 for example, or if you know you need a bugfix from 1.0.1. (Just in case you're not aware, in Cargo.toml "1.0.0" is equivalent to "^1.0.0" rather than "=1.0.0" -- you probably always want to be show semver-compatible updates in the latter case.)

Describe the solution you'd like Right now your extension either shows 👍 or "Latest: 1.2.3" by default. However, it seems to show "Latest: 1.2.3" even if I have say "1.1.2" configured. It would be nice if it could distinguish between semver-incompatible updates (as in, "2.0") and semver-compatible updates ("1.2.3"). The simplest way to do this could be to show 👍 for semver-compatible updates. A slightly more advanced way could be to distinguish between the case of semver-compatible and the case of semver-incompatible updates (for example, 👍 1.2.3 for semver-compatible and "Latest: 1.2.3" for -incompatible).

serayuzgur/crates

Answer questions serayuzgur

As I understand MAJOR ,MINOR and PATCH needs to be handled differently and users need to identify them with a single look of an eye. Since not every one uses cargo update and extension can not parse the lock file right now we can't really have "truth" about what version the project uses. I assume this extension should always show the information about the real situation and showing a lucky guess will might be missleading.

Here is my idea (waiting for your feedback);

The best I can do right now seems to be showing 3 separate decorators instead of one Latest XXinformation. Let's say current version is = 0.7.4

And the decorator could be like for ex. Major:1.0.115 Minor:0.9.15 Patch:0.7.15 template will be editable as the current settings and users will be free to set whatever he/she wants.
For ex.

  • Maj: ${major} Min: ${min} P:${patch}
  • Min: ${min} P:${patch}
  • P:${patch}
  • Maj: ${major}
serde = "0.7.4"  (Major:.1.0.115   Minor:0.9.15   Patch:0.7.15)

or

serde = "0.7.15"  (Major:.1.0.115   Minor:0.9.15   Patch:👍)

What do you think?

useful!

Related questions

No questions were found.
source:https://uonfu.com/
Github User Rank List