Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upcoming breaking change: HttpRequest and HttpClientResponse -> Stream<Uint8List> #383

Closed
tvolkert opened this issue Jun 11, 2019 · 0 comments

Comments

@tvolkert
Copy link
Contributor

Per dart-lang/sdk#36900, HttpRequest and HttpClientResponse are being updated to implement Stream<Uint8List> rather than Stream<List<int>>.

This change breaks co19 with errors like the following:

stderr:
ERROR|STATIC_WARNING|ARGUMENT_TYPE_NOT_ASSIGNABLE|/b/s/w/ir/cache/builder/sdk/tests/co19_2/src/LibTest/io/HttpClient/addCredentials_A01_t01.dart|46|26|12|The argument type 'Utf8Decoder' can't be assigned to the parameter type 'StreamTransformer<Uint8List, dynamic>'.

The solution is to cast the streams to Stream<List<int>> before running them through transformations.

tvolkert added a commit to tvolkert/co19 that referenced this issue Jun 11, 2019
In preparation for a change to HttpRequest and HttpClientResponse
whereby they'll implement `Stream<Uint8List>` rather than
`Stream<List<int>>`, this change casts those streams to
`Stream<List<int>>` before any calls to `transform()` those
streams.

This is a forwards-compatible change that should be a no-op for
existing usages.

dart-lang/sdk#36900
dart-lang#383
athomas pushed a commit that referenced this issue Jun 11, 2019
In preparation for a change to HttpRequest and HttpClientResponse
whereby they'll implement `Stream<Uint8List>` rather than
`Stream<List<int>>`, this change casts those streams to
`Stream<List<int>>` before any calls to `transform()` those
streams.

This is a forwards-compatible change that should be a no-op for
existing usages.

dart-lang/sdk#36900
#383
tvolkert added a commit to tvolkert/co19 that referenced this issue Jun 12, 2019
There were a few places where `.cast<List<int>>()` calls were
missed in dart-lang#384 and dart-lang#385, and likewise for `Datagram.data` in dart-lang#382.

Note that I had to change one of the tests of `Datagram.data`, since
the existing test was setting invalid values as the data (signed
integers or integers that didn't fit in 8-bytes).

dart-lang/sdk#36900
dart-lang#381
dart-lang#383
athomas pushed a commit that referenced this issue Jun 12, 2019
There were a few places where `.cast<List<int>>()` calls were
missed in #384 and #385, and likewise for `Datagram.data` in #382.

Note that I had to change one of the tests of `Datagram.data`, since
the existing test was setting invalid values as the data (signed
integers or integers that didn't fit in 8-bytes).

dart-lang/sdk#36900
#381
#383
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Jul 9, 2019
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Jul 9, 2019
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Jul 9, 2019
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Jul 12, 2019
- [TASK] Add paging to flutter_random_images project (#1)
- [FEATURE] Splash (#2)
- [FEATURE] Detail page (#3)
- [TASK] Open photo on web, download photo, sharing, about popup etc (#5)
- [TASK] Add app-version on about popup (#6)
- [OPTIMIZE] Add blur, grayscale, grayscale and blur (#7)
- [OPTIMIZE] Start add effects in detail (#11)
- [RELEASE] Release v0.0.1+1 (#24)
- [OPTIMIZE] FAB relocated and back, forward title removed (#41)
- [RELEASE] Release v0.0.2+2 (#42)
- [FEATURE] Add detail effect popup(#45)
- [RELEASE] 0.0.3+3 (#47)
- Fix due to break change of http-client response library: dart-lang/co19#383 (#54)
- Share url with effect (#55)
- App share (#56)
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Jul 20, 2019
- [TASK] Add paging to flutter_random_images project (#1)
- [FEATURE] Splash (#2)
- [FEATURE] Detail page (#3)
- [TASK] Open photo on web, download photo, sharing, about popup etc (#5)
- [TASK] Add app-version on about popup (#6)
- [OPTIMIZE] Add blur, grayscale, grayscale and blur (#7)
- [OPTIMIZE] Start add effects in detail (#11)
- [RELEASE] Release v0.0.1+1 (#24)
- [OPTIMIZE] FAB relocated and back, forward title removed (#41)
- [RELEASE] Release v0.0.2+2 (#42)
- [FEATURE] Add detail effect popup(#45)
- [RELEASE] 0.0.3+3 (#47)
- Fix due to break change of http-client response library: dart-lang/co19#383 (#54)
- Share url with effect (#55)
- App share (#56)
- [RELEASE] 0.0.4+4 (#58)
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Aug 19, 2019
- [TASK] Add paging to flutter_random_images project (#1)
- [FEATURE] Splash (#2)
- [FEATURE] Detail page (#3)
- [TASK] Open photo on web, download photo, sharing, about popup etc (#5)
- [TASK] Add app-version on about popup (#6)
- [OPTIMIZE] Add blur, grayscale, grayscale and blur (#7)
- [OPTIMIZE] Start add effects in detail (#11)
- [RELEASE] Release v0.0.1+1 (#24)
- [OPTIMIZE] FAB relocated and back, forward title removed (#41)
- [RELEASE] Release v0.0.2+2 (#42)
- [FEATURE] Add detail effect popup(#45)
- [RELEASE] 0.0.3+3 (#47)
- Fix due to break change of http-client response library: dart-lang/co19#383 (#54)
- Share url with effect (#55)
- App share (#56)
- [RELEASE] 0.0.4+4 (#58)
- Update build.gradle plugin, compileSdkVersion -> 29, minSdkVersion -> 19, targetSdkVersion -> 29 (#71)
XinyueZ added a commit to XinyueZ/flutter-lambda that referenced this issue Aug 20, 2019
- [TASK] Add paging to flutter_random_images project (#1)
- [FEATURE] Splash (#2)
- [FEATURE] Detail page (#3)
- [TASK] Open photo on web, download photo, sharing, about popup etc (#5)
- [TASK] Add app-version on about popup (#6)
- [OPTIMIZE] Add blur, grayscale, grayscale and blur (#7)
- [OPTIMIZE] Start add effects in detail (#11)
- [RELEASE] Release v0.0.1+1 (#24)
- [OPTIMIZE] FAB relocated and back, forward title removed (#41)
- [RELEASE] Release v0.0.2+2 (#42)
- [FEATURE] Add detail effect popup(#45)
- [RELEASE] 0.0.3+3 (#47)
- Fix due to break change of http-client response library: dart-lang/co19#383 (#54)
- Share url with effect (#55)
- App share (#56)
- [RELEASE] 0.0.4+4 (#58)
- Update build.gradle plugin,compileSdkVersion -> 29,minSdkVersion -> 19,targetSdkVersion -> 29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant