seed icon indicating copy to clipboard operation
seed copied to clipboard

Add a migration guide

Open bheisler opened this issue 5 years ago • 2 comments

I've just updated my app from Seed 0.4.1 to 0.5.1, and it could have gone more smoothly. When I do breaking change releases of Criterion.rs I try to write a migration guide listing the breaking changes and what users will need to do to update their code for each change - I think it would be helpful if Seed did the same.

In particular, the problems I ran into:

  • Moving from futures 0.1 to std:future required a bunch of changes to the types returned by functions that make requests. Eventually I realized that it was actually simple to fix - I just needed to replace Future<Item = (.*), Error = (.*)> with Future<Output = Result<$1, $2>>.
  • Removed the init function in exchange for this before_mount/after_mount thing that I still don't really understand? There also doesn't seem to be any documentation about that.
  • Renamed map_message to map_msg. It took me a while to even realize that it had simply been renamed rather than removed entirely.

bheisler avatar Feb 01 '20 15:02 bheisler

Good point - we'll add this to the readme before publishing 0.6.0

David-OConnor avatar Feb 01 '20 15:02 David-OConnor

Moving from futures 0.1 to std:future required a bunch of changes to the types returned by functions that make requests.

  • Yeah, it's the example use-case for migration guide.

Removed the init function in exchange for this before_mount/after_mount

  • See https://github.com/seed-rs/seed/issues/250#issuecomment-544297545 and other comments.
  • Open https://seed-rs.org and search form after_mount for more info.

Renamed map_message to map_msg. It took me a while to even realize that it had simply been renamed rather than removed entirely.

  • I see it in the 0.5.1 changelog, so it shouldn't be a problem, but I agree that it should be also in suggested migration guide.

MartinKavik avatar Feb 01 '20 17:02 MartinKavik