Closed lasseschmitt closed 6 years ago
Thanks for the report! I'll get Dart 2 support going for Redux then address this as a next step.
Hrm, this one is also super weird :( I've got a test that matches exactly what you've got and it's passing :( :( :(
WHY DART 2!!?!
Could you please try running the tests from this lib on your machine with the Dart that ships with flutter?
Mmm I noticed I didn't turn on --preview-dart-2
but the dart2 features like AwesomeClass()
instead of new AwesomeClass()
where available anyway. Do you think that could be somehow related?
Hrm, sounds like something funny is going on for sure. Also, I'd recommend using new
and const
until this issue is fully resolved: https://github.com/dart-lang/sdk/issues/32553
I've run into some weird issues with optional new / const myself ;(
Ok Im not sure whats happing now..
/Users/eikebartels/Applications/flutter/bin/flutter --no-color test --machine test/redux_thunk_test.dart
Testing started at 19:28 ...
compiler message: file:///Users/eikebartels/.pub-cache/hosted/pub.dartlang.org/async-1.13.3/lib/src/typed/stream.dart:56:10: Error: The return type of the method 'TypeSafeStream::firstWhere' is dart.async::Future<dynamic>, which does not match the return type of the overridden method (dart.async::Future<#lib1::TypeSafeStream::T>).
compiler message: Change to a subtype of dart.async::Future<#lib1::TypeSafeStream::T>.
compiler message: Future firstWhere(bool test(T element), {Object defaultValue()}) =>
compiler message: ^
compiler message: file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/async/stream.dart: Context: This is the overriden method ('firstWhere').
compiler message: file:///Users/eikebartels/.pub-cache/hosted/pub.dartlang.org/async-1.13.3/lib/src/typed/stream.dart:56:10: Error: The method 'TypeSafeStream::firstWhere' has fewer named arguments than those of overridden method 'Stream::firstWhere'.
compiler message: Future firstWhere(bool test(T element), {Object defaultValue()}) =>
compiler message: ^
compiler message: file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/async/stream.dart: Context: This is the overriden method ('firstWhere').
compiler message: file:///Users/eikebartels/.pub-cache/hosted/pub.dartlang.org/async-1.13.3/lib/src/typed/stream.dart:59:10: Error: The return type of the method 'TypeSafeStream::lastWhere' is dart.async::Future<dynamic>, which does not match the return type of the overridden method (dart.async::Future<#lib1::TypeSafeStream::T>).
compiler message: Change to a subtype of dart.async::Future<#lib1::TypeSafeStream::T>.
compiler message: Future lastWhere(bool test(T element), {Object defaultValue()}) =>
compiler message: ^
compiler message: file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/async/stream.dart: Context: This is the overriden method ('lastWhere').
compiler message: file:///Users/eikebartels/.pub-cache/hosted/pub.dartlang.org/async-1.13.3/lib/src/typed/stream.dart:59:10: Error: The method 'TypeSafeStream::lastWhere' has fewer named arguments than those of overridden method 'Stream::lastWhere'.
compiler message: Future lastWhere(bool test(T element), {Object defaultValue()}) =>
compiler message: ^
compiler message: file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/async/stream.dart: Context: This is the overriden method ('lastWhere').
compiler message: file:///Users/eikebartels/.pub-cache/hosted/pub.dartlang.org/async-1.13.3/lib/src/typed/stream.dart:62:13: Error: The method 'TypeSafeStream::singleWhere' has fewer named arguments than those of overridden method 'Stream::singleWhere'.
compiler message: Future<T> singleWhere(bool test(T element)) async =>
compiler message: ^
compiler message: file:///b/build/slave/Linux_Engine/build/src/third_party/dart/sdk/lib/async/stream.dart: Context: This is the overriden method ('singleWhere').
package:test serializeSuite
/var/folders/r6/wfjk122d2hv88767fbydx92h0000gn/T/dart_test_listenerVy37xc/listener.dart 18:27 main
Failed to load "/Users/eikebartels/Documents/driveddy/external/redux_thunk/test/redux_thunk_test.dart":
type 'List' is not a subtype of type 'List<String>' where
List is from dart:core
List is from dart:core
String is from dart:core
side note. I also run the tests from flutter_redux
to check if any tests are running and yea they running trough with 100% success
Looking at that stack trace, it seems something (probably the test package) is relying on an old Version of the async
package (1.13.3) which doesn't support Dart 2 :(
All right, figured out that, despite using the --preview-dart-2
flag with the Dart 2 SDK, it wasn't quite enabling all of the same features that Flutter was, haha. Figured out the problem, new version has been deployed: 0.2.0
Hey @brianegan ,
if I follow your instruction
First thing I noticed. Intellij give me the following warning:
Second the the action did not get called. So I had a look whats actually happens.
The result of the logs are:
Im on the latest flutter master channel.
Any idea?