Heads up: shelf 0.7.0 is coming

109 views
Skip to first unread message

Natalie Weizenbaum

unread,
Jan 28, 2016, 5:42:00 PM1/28/16
to Dart Server-side and Cloud Development
Hey folks,

If you don't use shelf at all, you can stop reading now.

I've recently released the stream_channel package and I'm in the process of adding support for it to a bunch of packages. For the most part, this can be done without breaking API changes, but shelf is an exception. There's not a lot of breakage, so for the most part you should be able to just update your pubspecs and move on with your lives. But if you use something that's changing, you'll need to change some code as well.

If your code doesn't include the word "hijack", just expand your constraint to allow shelf 0.7.0. The only changes that will arrive in 0.7.0 are hijack-related. You should update your constraint as soon as possible so that once 0.7.0 arrives your code will already be marked as compatible.

If your code calls Request.hijack(), make the callback take a single StreamChannel argument. This is supported as of shelf 0.6.5 and will continue to work in shelf 0.7.0, so you should make your shelf constraint ">=0.6.5 <0.8.0". The old callback that takes two arguments will be removed in 0.7.0.

If your code passes onHijack to new Request(), your life will be a little more difficult. There's no way to make this API compatible with both the pre- and post-0.7.0 world, so you'll only be able to update it once 0.7.0 is actually released. If you'd like, let me know and I'll send you an email once it releases so you can update your code.

Thanks for bearing with this! Breaking changes are never fun, but the new StreamChannel-based world will be pretty sweet.
- Natalie
Reply all
Reply to author
Forward
0 new messages