seed
seed copied to clipboard
Add a migration guide
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 = (.*)>withFuture<Output = Result<$1, $2>>. - Removed the
initfunction in exchange for thisbefore_mount/after_mountthing that I still don't really understand? There also doesn't seem to be any documentation about that. - Renamed
map_messagetomap_msg. It took me a while to even realize that it had simply been renamed rather than removed entirely.
Good point - we'll add this to the readme before publishing 0.6.0
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_mountfor 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.