{"action":"opened","issue":{"url":"https://api.github.com/repos/google/quiver-dart/issues/308","repository_url":"https://api.github.com/repos/google/quiver-dart","labels_url":"https://api.github.com/repos/google/quiver-dart/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/google/quiver-dart/issues/308/comments","events_url":"https://api.github.com/repos/google/quiver-dart/issues/308/events","html_url":"https://github.com/google/quiver-dart/issues/308","id":181555058,"number":308,"title":"StreamBuffer refactor...","user":{"login":"jtmcdole","id":1924313,"avatar_url":"https://avatars.githubusercontent.com/u/1924313?v=3","gravatar_id":"","url":"https://api.github.com/users/jtmcdole","html_url":"https://github.com/jtmcdole","followers_url":"https://api.github.com/users/jtmcdole/followers","following_url":"https://api.github.com/users/jtmcdole/following{/other_user}","gists_url":"https://api.github.com/users/jtmcdole/gists{/gist_id}","starred_url":"https://api.github.com/users/jtmcdole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtmcdole/subscriptions","organizations_url":"https://api.github.com/users/jtmcdole/orgs","repos_url":"https://api.github.com/users/jtmcdole/repos","events_url":"https://api.github.com/users/jtmcdole/events{/privacy}","received_events_url":"https://api.github.com/users/jtmcdole/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-07T00:08:33Z","updated_at":"2016-10-07T00:08:33Z","closed_at":null,"body":"I'm not to happy with StreamBuffer at the moment. I thought it would be nice to have it handle both the cases of Stream<List<T>> and Stream<T> - Sockets give you the List<int> and other processes could generate a monotonic stream of events... all of which stream buffer neatly handled in read().\r\n\r\n#296 Changed it to StreamConsumer<dynamic> to remove a cast, however that makes other projects I work on have analyzer errors when trying to pipe a socket to the buffer.\r\n\r\nWhat is the best way to make everyone happy?\r\n\r\n```dart\r\nStreamBuffer<T> implements StreamConsumer<List<T>>\r\nor\r\nStreamBuffer<T> implements StreamConsumer<T>\r\n```\r\n\r\n`StreamConsumer<List<T>>` requires any monotonic controller to add a list of one element to the stream.\r\n`StreamConsumer<T>` requires anyone using this as `StreamBuffer<int>` to update to `StreamBuffer<List<int>>`."}}
{"actor":{"display_login":"jtmcdole"}}