From 41ac83c3cd311e862d5a0b296ae861dbffff61e7 Mon Sep 17 00:00:00 2001 From: keertip Date: Tue, 2 Jan 2018 10:08:05 -0800 Subject: [PATCH 1/4] Update for Dart 2.0 changes to Timer --- pkgs/async/CHANGELOG.md | 4 ++++ pkgs/async/lib/src/restartable_timer.dart | 8 ++++++++ pkgs/async/pubspec.yaml | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/async/CHANGELOG.md b/pkgs/async/CHANGELOG.md index 82b7877d..da57bb6c 100644 --- a/pkgs/async/CHANGELOG.md +++ b/pkgs/async/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.2 + +* Add support for Dart 2.0 library changes to class `Timer`. + ## 2.0.1 * Fix a fuzzy arrow type warning. diff --git a/pkgs/async/lib/src/restartable_timer.dart b/pkgs/async/lib/src/restartable_timer.dart index eed51e6d..7b058212 100644 --- a/pkgs/async/lib/src/restartable_timer.dart +++ b/pkgs/async/lib/src/restartable_timer.dart @@ -43,4 +43,12 @@ class RestartableTimer implements Timer { void cancel() { _timer.cancel(); } + + @override + // TODO: Dart 2.0 requires this method to be implemented. + // See https://github.com/dart-lang/sdk/issues/31664 + // ignore: override_on_non_overriding_getter + int get tick { + throw new UnimplementedError("tick"); + } } diff --git a/pkgs/async/pubspec.yaml b/pkgs/async/pubspec.yaml index b5173cfe..0fe8bf2c 100644 --- a/pkgs/async/pubspec.yaml +++ b/pkgs/async/pubspec.yaml @@ -1,5 +1,5 @@ name: async -version: 2.0.1 +version: 2.0.2 author: Dart Team description: Utility functions and classes related to the 'dart:async' library. homepage: https://www.github.com/dart-lang/async From cda83cee91979ef83295f855add5203dbe85b6d4 Mon Sep 17 00:00:00 2001 From: keertip Date: Tue, 2 Jan 2018 10:31:56 -0800 Subject: [PATCH 2/4] Update travis to run only on dev, pub get fails on stable --- pkgs/async/.travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/async/.travis.yml b/pkgs/async/.travis.yml index 662d2feb..8d63d09f 100644 --- a/pkgs/async/.travis.yml +++ b/pkgs/async/.travis.yml @@ -2,9 +2,6 @@ language: dart sudo: false dart: - dev - - stable - - 1.23.0 - - 1.22.1 cache: directories: - $HOME/.pub-cache From 9d9c8b0ce2c94ed81c0ca6601bca5afbcfb71c97 Mon Sep 17 00:00:00 2001 From: keertip Date: Tue, 2 Jan 2018 12:15:48 -0800 Subject: [PATCH 3/4] Update SDK constraint --- pkgs/async/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/async/pubspec.yaml b/pkgs/async/pubspec.yaml index 0fe8bf2c..deaf2c3f 100644 --- a/pkgs/async/pubspec.yaml +++ b/pkgs/async/pubspec.yaml @@ -4,7 +4,7 @@ author: Dart Team description: Utility functions and classes related to the 'dart:async' library. homepage: https://www.github.com/dart-lang/async environment: - sdk: ">=1.22.0 <2.0.0" + sdk: ">=2.0.0-dev <2.0.0" dependencies: collection: "^1.5.0" dev_dependencies: From 3b55493ed53c862897d5116185398ae5ccf11ae2 Mon Sep 17 00:00:00 2001 From: keertip Date: Tue, 2 Jan 2018 12:52:37 -0800 Subject: [PATCH 4/4] Update SDK contraint lower bound to 2.0.0-dev.15.0 --- pkgs/async/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/async/pubspec.yaml b/pkgs/async/pubspec.yaml index deaf2c3f..bfc41718 100644 --- a/pkgs/async/pubspec.yaml +++ b/pkgs/async/pubspec.yaml @@ -4,7 +4,7 @@ author: Dart Team description: Utility functions and classes related to the 'dart:async' library. homepage: https://www.github.com/dart-lang/async environment: - sdk: ">=2.0.0-dev <2.0.0" + sdk: ">=2.0.0-dev.15.0 <2.0.0" dependencies: collection: "^1.5.0" dev_dependencies: