Why are the version numbers on crates.io so low?

Just don't use a version number higher than 18446744073709551615.0.0, as that will make Cargo's version parser panic :wink:

(This discovery thwarted my plan to use decimalized Git commit hashes as version numbers. Instead I went with the more modest 0.1.1474613452…)

4 Likes

Definitely don't look at the version numbers for my sassers crate :slight_smile: I also think you'd appreciate Sentimantal Versioning :wink:

3 Likes

I got complaints about boolinator not being 1.0.

boolinator.

Y'all brought this on yourselves... :stuck_out_tongue:

For the first, I feel like this would be more useful as a subtle way to rickroll your users. That, or hide subliminal messages. For the second, that's one of the worst-looking websites I've ever seen. A script font and light grey-on-white text; yeesh. Also, as much as I love TeX's versions, I was thinking more along the lines of {srand(secret_major_number);dict[rand()%dict.len()]}. :stuck_out_tongue:

4 Likes

This isn't a problem unique to the rust community. Even in a large, modern Python codebase using libraries that are 5+ years old, you will still find many packages that haven't reached 1.0. It's just something you have to deal with (though it is a little more work to deal with in a type checked language than in a language like Python).

Really though, you probably shouldn't be trusting the community's packages to follow any particular versioning scheme anyway. :stuck_out_tongue: If you work for a company and aren't using your own internal mirror of a package repository, possibly with your own internal forks of important dependencies, then (despite the awesome guarantees provided by crates.io about never deleting a package) you're being at least a little irresponsible.

1 Like

Defaults matter. npm has changed the default to 1.0.0, and the people followed it.

I slightly prefer 1.0+ packages, as it makes it easier to reason about semver.

It'd be nice if Cargo changed its default too.

1 Like