Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into corelib_2_2
Browse files Browse the repository at this point in the history
  • Loading branch information
leafpetersen committed Mar 2, 2018
2 parents 6bbc6ea + a5b1e66 commit 95f3667
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
language: dart
sudo: false

dart:
- dev
cache:
directories:
- $HOME/.pub-cache

dart_task:
- test: --platform vm
# No parallelism on Firefox (-j 1)
# Causes flakiness – need to investigate
- test: --platform firefox -j 1
- test: --platform dartium
install_dartium: true
- dartanalyzer
- dartfmt
matrix:
exclude:
- dart: 1.22.1
dart_task: dartfmt

# Only building master means that we don't run two builds for each pull request.
branches:
only: [master]

cache:
directories:
- $HOME/.pub-cache
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## 2.0.5

* Fix Dart 2.0 [runtime cast errors][sdk#27223] in `StreamQueue`.

[sdk#27223]: https://github.com/dart-lang/sdk/issues/27223

## 2.0.4

* Add support for Dart 2.0 library changes to Stream and StreamTransformer.
* Add support for Dart 2.0 library changes to `Stream` and `StreamTransformer`.
Changed classes that implement `StreamTransformer` to extend
`StreamTransformerBase`, and changed signatures of `firstWhere`, `lastWhere`,
and `singleWhere` on classes extending `Stream`. See
Expand All @@ -15,7 +21,7 @@

## 2.0.2

* Add support for Dart 2.0 library changes to class `Timer`.
* Add support for Dart 2.0 library changes to class `Timer`.

## 2.0.1

Expand All @@ -35,7 +41,7 @@
* Make `TypeSafeStream` extend `Stream` instead of implementing it. This ensures
that new methods on `Stream` are automatically picked up, they will go through
the `listen` method which type-checks every event.

## 1.13.2

* Fix a type-warning.
Expand Down
12 changes: 6 additions & 6 deletions lib/src/stream_queue.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ abstract class StreamQueue<T> {
var _eventsReceived = 0;

/// Queue of events not used by a request yet.
final QueueList<Result> _eventQueue = new QueueList();
final QueueList<Result<T>> _eventQueue = new QueueList();

/// Queue of pending requests.
///
Expand All @@ -124,7 +124,7 @@ abstract class StreamQueue<T> {
/// one events.
Future<bool> get hasNext {
if (!_isClosed) {
var hasNextRequest = new _HasNextRequest();
var hasNextRequest = new _HasNextRequest<T>();
_addRequest(hasNextRequest);
return hasNextRequest.future;
}
Expand Down Expand Up @@ -219,7 +219,7 @@ abstract class StreamQueue<T> {
Future<int> skip(int count) {
if (count < 0) throw new RangeError.range(count, 0, null, "count");
if (!_isClosed) {
var request = new _SkipRequest(count);
var request = new _SkipRequest<T>(count);
_addRequest(request);
return request.future;
}
Expand Down Expand Up @@ -389,7 +389,7 @@ abstract class StreamQueue<T> {
_isClosed = true;

if (!immediate) {
var request = new _CancelRequest(this);
var request = new _CancelRequest<T>(this);
_addRequest(request);
return request.future;
}
Expand Down Expand Up @@ -457,7 +457,7 @@ abstract class StreamQueue<T> {

/// Called when the event source adds a new data or error event.
/// Always calls [_updateRequests] after adding.
void _addResult(Result result) {
void _addResult(Result<T> result) {
_eventsReceived++;
_eventQueue.add(result);
_updateRequests();
Expand Down Expand Up @@ -485,7 +485,7 @@ abstract class StreamQueue<T> {
///
/// If the request queue is empty and the request can be completed
/// immediately, it skips the queue.
void _addRequest(_EventRequest request) {
void _addRequest(_EventRequest<T> request) {
if (_requestQueue.isEmpty) {
if (request.update(_eventQueue, _isDone)) return;
_ensureListening();
Expand Down
6 changes: 5 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: async
version: 2.0.4
version: 2.0.5
author: Dart Team <misc@dartlang.org>
description: Utility functions and classes related to the 'dart:async' library.
homepage: https://www.github.com/dart-lang/async
Expand All @@ -11,3 +11,7 @@ dev_dependencies:
fake_async: "^0.1.2"
stack_trace: "^1.0.0"
test: "^0.12.0"
# For building and testing with DDC
build_runner: ^0.7.11
build_web_compilers: ^0.3.1
build_test: ^0.10.1

0 comments on commit 95f3667

Please sign in to comment.