async icon indicating copy to clipboard operation
async copied to clipboard

Include package:stream_transformers into package:async

Open lrhn opened this issue 5 years ago • 3 comments

The package stream_transformers was created as an experiment. The API has now matured and stabilized, and it might make sense to include it in package:async, rather than having two different packages.

It could be exported as a separate top-level library, to avoid the extension methods crowding the classes for users of the rest of package:async.

@natebosch

lrhn avatar Jun 09 '20 19:06 lrhn

A strong argument in favor of making it a separate top level import is that it will be non-breaking that way. If we were to suddenly introduce these extensions from package:async/async.dart then it would introduce errors for everyone who today imports both.

There are no types introduced (publicly) by that package, so copy/paste is a valid migration path.

natebosch avatar Jun 09 '20 19:06 natebosch

We would, at the same time, change package:stream_transform to export the extensions from package:async and therefore depend on a version of package:async great enough to have those.

It's still possible to get an older version of package:stream_transform and a new version of package:async, but it is possible to avoid it.

That said, I have no problem with a top-level library.

lrhn avatar Jun 09 '20 21:06 lrhn

Has this idea been abandoned? I just found a useful helper in package:stream_transform by accident, I was not aware this package even exists. Yet what it does seems to align greatly with the purpose of package:async.

shilangyu avatar Mar 04 '24 14:03 shilangyu