winit icon indicating copy to clipboard operation
winit copied to clipboard

Write migrations for each release

Open kchibisov opened this issue 2 years ago • 8 comments

We should write migrations between releases showing who to port certain code and probably linking to discussions why certain change were made in the first.

Then e.g. rustdoc/CHANGELOG could link to relevant entries for migrations.

An example for such migration is like that:

https://github.com/rust-windowing/winit/pull/3447#discussion_r1484396211

The migrations should probably in migrations directory with format migration_release.md(only for major releases with breaking changes).

kchibisov avatar Feb 09 '24 16:02 kchibisov

I think the changelog is the place to put migrations, as they're only really relevant for that particular release, and only relevant when you're upgrading.

madsmtm avatar Feb 09 '24 16:02 madsmtm

Maybe we should just make CHANGELOG per release? Like my main issue is that I don't really want a giant file with all of that, since it'll only grow over time.

kchibisov avatar Feb 09 '24 16:02 kchibisov

I think it's fine that it grows, that's how changelogs are, and it is kinda convenient to be able to go back in history in it. It's like a poor mans git blame.

madsmtm avatar Feb 09 '24 17:02 madsmtm

The issue starts when you include code snippets there. oneliners are fine, so that's why I'd rather maintain separate entries for migrations itself.

kchibisov avatar Feb 09 '24 18:02 kchibisov

I would also prefer one big file.

daxpedda avatar Feb 10 '24 07:02 daxpedda

Seconding @madsmtm and @daxpedda. This seems like the point of the CHANGELOG. If we format it better it should be useful for this purpose.

notgull avatar Feb 10 '24 16:02 notgull

I don't see why putting separate changelog for each release won't work as in the current CHANGELOG.md represents the next release, the rest is just stashed inside the changelogs, so we have something that can be nicely rendered on docs.rs without bringing the entire winit lore.

Like I don't want to maintain 10K lines of markdown.

kchibisov avatar Feb 10 '24 16:02 kchibisov

We discussed this in today's meeting, the conclusion was to split changelog per major version into files and include migrations into each file. Docs.rs integration would also work well with this.

I've assigned myself on the issue, as I'll attempt to put up a PR for this.

Unresolved is whether or not to backport this to v0.29, I guess it depends on whatever @kchibisov thinks is easiest.

madsmtm avatar Feb 16 '24 15:02 madsmtm

Will close this once we have written the migrations for 0.30

madsmtm avatar Mar 15 '24 13:03 madsmtm

https://github.com/rust-windowing/winit/pull/3612 or https://github.com/rust-windowing/winit/pull/3614 will resolve this, we'll need to do some work to merge these two PRs though.

madsmtm avatar Mar 29 '24 15:03 madsmtm