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

Implement methods added in Dart 2.0 #418

Open
srawlins opened this issue Mar 2, 2018 · 9 comments
Open

Implement methods added in Dart 2.0 #418

srawlins opened this issue Mar 2, 2018 · 9 comments
Labels

Comments

@srawlins
Copy link
Contributor

srawlins commented Mar 2, 2018

I introduced a ton of Unimplemented stubs recently. Now that quiver has a minimum version constraint that guarantees that the new methods are available, we should implement them.

@cbracken
Copy link
Member

@srawlins I've x-ref'ed the fixes here. Is this now complete?

@srawlins
Copy link
Contributor Author

No sir! Still have 34 Unimplemented methods:

$ git grep Unimplemented | wc -l
34

@alanrussian
Copy link

It was very surprising to me to see an UnimplementedError when I performed a normal (Dart 2) map operation. Hope this can get fixed soon.

@srawlins
Copy link
Contributor Author

Sorry about that. This is sort of a "Contributions welcome" situation. Or maybe the Quiver owners want to own this.

@cbracken cbracken changed the title Implement Dart 2.0 collection methods Implement methods added in Dart 2.0 Nov 5, 2019
@cbracken
Copy link
Member

cbracken commented Nov 5, 2019

This is now down to 22 remaining.

Working on knocking off the rest. Contributions are of course most welcome :)

@cbracken
Copy link
Member

cbracken commented Nov 5, 2019

Remainder:

  • lib/src/collection/bimap.dart:107
  • lib/src/collection/delegates/iterable.dart:35
  • lib/src/collection/delegates/iterable.dart:126
  • lib/src/collection/delegates/list.dart:54
  • lib/src/collection/delegates/map.dart:43
  • lib/src/collection/delegates/map.dart:51
  • lib/src/collection/delegates/map.dart:66
  • lib/src/collection/delegates/map.dart:89
  • lib/src/collection/delegates/map.dart:103
  • lib/src/collection/delegates/map.dart:109
  • lib/src/collection/delegates/map.dart:115
  • lib/src/collection/delegates/queue.dart:46
  • lib/src/collection/delegates/set.dart:40
  • lib/src/collection/lru_map.dart:91
  • lib/src/collection/lru_map.dart:152
  • lib/src/collection/multimap.dart:334
  • lib/src/collection/multimap.dart:403
  • lib/src/collection/multimap.dart:577
  • lib/src/collection/multimap.dart:626
  • lib/src/collection/multimap.dart:821
  • lib/src/collection/treeset.dart:398
  • lib/testing/src/async/fake_async.dart:303

@cbracken cbracken self-assigned this Nov 5, 2019
@HerrNiklasRaab
Copy link

_FakeTimer.tick would be nice, becaus I am getting this, if I run outside runAsync:


══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following UnimplementedError was thrown running a test:
tick

When the exception was thrown, this was the stack:
#0      _FakeTimer.tick (package:quiver/testing/src/async/fake_async.dart:304:5)
#1      _LoadingTextWidgetState.initState.<anonymous closure>.<anonymous closure> (package:fazua_toolbox/widgets/loading_text_widget.dart:28:38)
#2      State.setState (package:flutter/src/widgets/framework.dart:1233:30)
#3      _LoadingTextWidgetState.initState.<anonymous closure> (package:fazua_toolbox/widgets/loading_text_widget.dart:28:7)
#14     AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:870:27)
#17     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:72:41)
#18     AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:866:27)
#19     WidgetTester.pumpAndSettle.<anonymous closure> (package:flutter_test/src/widget_tester.dart:542:23)
#22     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:72:41)
#23     WidgetTester.pumpAndSettle (package:flutter_test/src/widget_tester.dart:537:27)
#24     WidgetTesterExtension.pumpAndSettleLowTimeout (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/test_util.dart:206:18)
#25     WidgetTesterExtension.longPressVisible (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/test_util.dart:185:11)
<asynchronous suspension>
#26     WidgetTesterExtension.longPressText (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/test_util.dart:174:11)
#27     main.<anonymous closure> (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/bike_drawer_menu_test.dart:40:18)
<asynchronous suspension>
#28     main.<anonymous closure> (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/bike_drawer_menu_test.dart)
#29     testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:140:29)
<asynchronous suspension>
#30     testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart)
#31     TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:703:19)
<asynchronous suspension>
#34     TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:683:14)
#35     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1083:24)
#41     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:1080:15)
#42     testWidgets.<anonymous closure> (package:flutter_test/src/widget_tester.dart:133:24)
#43     Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:172:27)
<asynchronous suspension>
#44     Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart)
#45     Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:246:15)
#50     Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:243:5)
#51     Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:170:33)
#56     Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:169:13)
#57     Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:400:30)
(elided 45 frames from class _FakeAsync, class _RawReceivePortImpl, class _Timer, dart:async, dart:async-patch, and package:stack_trace)

The test description was:
  removing bike from mybikes
════════════════════════════════════════════════════════════════════════════════════════════════════
ERROR: Test failed. See exception logs above.
The test description was: removing bike from mybikes

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following UnimplementedError was thrown running a test (but after the test had completed):
tick

When the exception was thrown, this was the stack:
#0      _FakeTimer.tick (package:quiver/testing/src/async/fake_async.dart:304:5)
#1      _LoadingTextWidgetState.initState.<anonymous closure>.<anonymous closure> (package:fazua_toolbox/widgets/loading_text_widget.dart:28:38)
#2      State.setState (package:flutter/src/widgets/framework.dart:1233:30)
#3      _LoadingTextWidgetState.initState.<anonymous closure> (package:fazua_toolbox/widgets/loading_text_widget.dart:28:7)
#14     AutomatedTestWidgetsFlutterBinding.pump.<anonymous closure> (package:flutter_test/src/binding.dart:870:27)
#17     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:72:41)
#18     AutomatedTestWidgetsFlutterBinding.pump (package:flutter_test/src/binding.dart:866:27)
#19     WidgetTester.pumpAndSettle.<anonymous closure> (package:flutter_test/src/widget_tester.dart:542:23)
#22     TestAsyncUtils.guard (package:flutter_test/src/test_async_utils.dart:72:41)
#23     WidgetTester.pumpAndSettle (package:flutter_test/src/widget_tester.dart:537:27)
#24     WidgetTesterExtension.pumpAndSettleLowTimeout (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/test_util.dart:206:18)
#25     WidgetTesterExtension.longPressVisible (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/test_util.dart:185:11)
<asynchronous suspension>
#26     WidgetTesterExtension.longPressText (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/test_util.dart:174:11)
#27     main.<anonymous closure> (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/bike_drawer_menu_test.dart:40:18)
<asynchronous suspension>
#28     main.<anonymous closure> (file:///Users/niklasraab/Github/fazua_toolbox/fazua_toolbox_app/test/widget_tests/bike_drawer_menu_test.dart)
#29     testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:140:29)
<asynchronous suspension>
#30     testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart)
#31     TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:703:19)
<asynchronous suspension>
#34     TestWidgetsFlutterBinding._runTest (package:flutter_test/src/binding.dart:683:14)
#35     AutomatedTestWidgetsFlutterBinding.runTest.<anonymous closure> (package:flutter_test/src/binding.dart:1083:24)
#41     AutomatedTestWidgetsFlutterBinding.runTest (package:flutter_test/src/binding.dart:1080:15)
#42     testWidgets.<anonymous closure> (package:flutter_test/src/widget_tester.dart:133:24)
#43     Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:172:27)
<asynchronous suspension>
#44     Declarer.test.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart)
#45     Invoker.waitForOutstandingCallbacks.<anonymous closure> (package:test_api/src/backend/invoker.dart:246:15)
#50     Invoker.waitForOutstandingCallbacks (package:test_api/src/backend/invoker.dart:243:5)
#51     Declarer.test.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/declarer.dart:170:33)
#56     Declarer.test.<anonymous closure> (package:test_api/src/backend/declarer.dart:169:13)
#57     Invoker._onRun.<anonymous closure>.<anonymous closure>.<anonymous closure>.<anonymous closure> (package:test_api/src/backend/invoker.dart:400:30)
(elided 45 frames from class _FakeAsync, class _RawReceivePortImpl, class _Timer, dart:async, dart:async-patch, and package:stack_trace)
════════════════════════════════════════════════════════════════════════════════════════════════════

@HerrNiklasRaab
Copy link

Any updates so far?

@cbracken
Copy link
Member

There have been a couple community contributions such as #597. I'm planning to book time this Friday for non-null-by-default migration. If there's any time remaining after that, I may take a look at chipping away at some of these.

Any particular methods other than the above-mentionned Timer.tick that are important to you? That would help with prioritisation.

Also always more than happy to review pull requests. See the Contributing file for details if that interests you.

@cbracken cbracken removed their assignment Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants