rust-windowing / winit

Window handling library in pure Rust
https://docs.rs/winit/
Apache License 2.0
4.86k stars 909 forks source link

Document how betas should be done #3050

Open kchibisov opened 1 year ago

kchibisov commented 1 year ago

Right now betas have are ahead of the actual release that will be due to a fact that cargo can't handle pre-releases well and assumes that each pre release is compatible with each other, the ways to overcome this is to use the =version in the Cargo.toml or do semver bumps along the releases.

Some discussion with @daxpedda on irc

 daxpedda  kchibisov why did you use v0.29.1-beta here:
           https://github.com/rust-windowing/winit/pull/3032 ?
 daxpedda  So right now we have v0.29.0-beta.0 -> v0.29.0-beta.1 (yanked) -> v0.29.1-beta.
 daxpedda  Shouldn't the next version have been v0.29.0-beta.2?
kchibisov  daxpedda: I think I've described why.
kchibisov  because cargo is broken.
kchibisov  Just don't think about it, we never do beta for patch releases and you can't
           pull beta until you use beta.
 daxpedda  Where did you describe it? Would like to know whats going on here.
kchibisov  cargo thinks that all betas are compatbile.
kchibisov  so it auto updates .0 to .1.
 daxpedda  Right, true enough.
kchibisov  However, if you increment original version it won't do so.
kchibisov  I think when I've merged the beta it was mentioned, or I've said it here.
kchibisov  I don't remember.
 daxpedda  It's just weird because v0.29.1-beta > v0.29.0
 daxpedda  So that's pretty weird as well.
kchibisov  yes, but you can't pull it.
 daxpedda  Not automatically you mean.
kchibisov  Like there's no way you can pull the version.
 daxpedda  I understand.
kchibisov  You must explicitly say that I want to use this version.
kchibisov  I'll document this, but I don't have time right now.
kchibisov  it's like, betas are only for breaking releases.
kchibisov  And we never do them for patch.
 daxpedda  I understand.
 daxpedda  I would have just advocated to not care about this. This is a Cargo problem
           people have to figure out when they opt into betas.
 daxpedda  When I opt into betas I always use `=` to make sure it doesn't automatically
           update to the next one, which is breaking most of the time.
 daxpedda  Just would have preferred to follow Semver instead of this.
 daxpedda  w/e,  what's done is done
kchibisov  daxpedda: the issue is that cargo thinks that all pre-releases are compatible.
kchibisov  daxpedda: you can't.
kchibisov  there's no semver for preleases.
kchibisov  cargo pre-release suffix is a string which is compared lexicographically.
kchibisov  it has no meanning.
kchibisov  You can do x.y.z-beta x.y.z-gamma.
kchibisov  all semver fine.
 daxpedda  I know all that.
kchibisov  yeah.
 daxpedda  I was saying that v0.29.1-beta > v0.29.0. Which I didn't make up, that's Semver.
kchibisov  yeah, that's true.
kchibisov  But I'll document that.
kchibisov  it's just we have no better option for now.
 daxpedda  w/e, we can re-open that discussion next time
 daxpedda  we do, what I described above, instead of documenting this, we should document
           that for betas ppl should use `=`
kchibisov  yeah, but it's hard to rely on that.

Thinking about it now, what we can do here, is to release for example 0.29.Y straight away, where Y is a patch of the latest beta version, that way it'll be semver correct and make sense.

daxpedda commented 1 year ago

I agree we should probably not release v0.29.0 but do v0.29.1 straight away. If we can agree that we want users to use =, which I'm strongly in favor off, I would propose that we start adding that to the README now instead of waiting until the next time we need it.

madsmtm commented 1 year ago

Are there people relying on the beta releases? If not, then I'd say it doesn't really matter, that's why it's a beta release.

But yeah, people should definitely use = for betas.

kchibisov commented 1 year ago

ppl certainly use them, that's the thing, and it's better to use them than master directly. But I don't think that it'll be that often, it's just when release is big you need RCs or betas, but given that winit is a library it's better with betas.