Versioning is hard and unforgiving, and I'm not sure how to handle it

So for the first question: are you saying you'd like to be able to create development releases of the next version and have them up on crates.io in a way that indicates it's still a development release? Fortunately for you, section 9 of the semver spec allows it by using extra version info following a hyphen. As for:

From what I could tell, it seems like cargo treats "2.0.0-something" like "something" is just a string, which is not what I want.

if this is the case, it's a bug. Semver 2.0 sections 10 and 11 gives specific rules for determining the precedence of version numbers that have text following a hyphen. For example, 2.0.0-alpha1 has lower precedence than 2.0.0-alpha2 has lower precedence than 2.0.0 (when it is actually released). (Though I don't know the rules for, e.g., the following version numbers: [2.0-alpha1, 2.0-alpha2, 1.8, 1.0]. I believe it would go 2.0-alpha2 > 2.0-alpha1 > 1.8 > 1.0, but it's possible it's 1.8 > 1.0 > 2.0-alpha2 > 2.0alpha1. I think that needs some clarification from the spec author, since it would affect anyone using cargo with wildcard versions (foo-package-rust = "*").

As for the second: the whole idea behind semver is that the major number really is a counter, and doesn't necessarily denote major changes, just breaking ones. It's unfortunate given that I think users and library writers generally do want some sort of important-release indicator, but I guess the cons (or general vagueness) of another number (W in W.x.y.z) outweighed the pros.

/r/rust Thread