-
Notifications
You must be signed in to change notification settings - Fork 10
Package migration to null safety. #23
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
base: master
Are you sure you want to change the base?
Conversation
Hi Bruno! That's an excellent contribution! I will check everything until Wednesday. Thanks! |
Please review my PR. |
Hi @brunoalfred! Sorry for the delay. I will review your PR until tomorrow. I saw some errors in the master code with the CI and I'm checking a way to fix them. Did you run the 00:02 +0 -13: loading test/aggregation_test.dart [E]
Failed to load "test/aggregation_test.dart":
lib/src/ast.dart:28:26: Error: The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'List<dynamic>'.
- 'Map' is from 'dart:core'.
- 'List' is from 'dart:core'.
invocationParams.add(options);
^
lib/src/net.dart:24:15: Error: The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'int'.
- 'Map' is from 'dart:core'.
res.add(optargs);
^
I'm fixing the CI to test there and avoid some problems related to my machine. |
|
||
serialize() { | ||
List res = [_type.value]; | ||
var res = [_type.value]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we would need something like var res = <dynamic>[_type.value];
(as mentioned in https://dart.dev/guides/language/type-system) to not throw an error in the tests like the one below:
lib/src/net.dart:24:15: Error: The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'int'.
- 'Map' is from 'dart:core'.
res.add(optargs);
^
} | ||
List invocationParams = [argsList]; | ||
if (options.isNotEmpty) { | ||
var invocationParams = [argsList]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we would need something like var invocationParams = <dynamic>[argsList];
(as mentioned in https://dart.dev/guides/language/type-system) to not throw an error in the tests like the one below:
lib/src/ast.dart:28:26: Error: The argument type 'Map<dynamic, dynamic>' can't be assigned to the parameter type 'List<dynamic>'.
- 'Map' is from 'dart:core'.
- 'List' is from 'dart:core'.
invocationParams.add(options);
^
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @brunoalfred! I added comments for two needed changes in the code (ast.dart
and net.dat
). We will also need some refactor in the code of the tests to solve the problems with the access of the late variables. Currently we are getting the following error:
dart:_internal-patch/internal_patch.dart 216:5 LateError._throwLocalNotInitialized
test/aggregation_test.dart 17:9 main.<fn>
===== asynchronous gap ===========================
dart:async/zone.dart _CustomZone.bindUnaryCallbackGuarded.<fn>
Another error that I saw in two tests (connection_test.dart
and parallel_execution_test.dart
) is the following one:
type 'Future<dynamic>' is not a subtype of type 'FutureOr<Map<dynamic, dynamic>>' in type cast
test/connection_test.dart 55:34 main.<fn>
===== asynchronous gap ===========================
package:test_api/src/backend/declarer.dart 199:9 Declarer.test.<fn>.<fn>
===== asynchronous gap ===========================
package:test_api/src/backend/declarer.dart 197:7 Declarer.test.<fn>
===== asynchronous gap ===========================
package:test_api/src/backend/invoker.dart 257:7 Invoker._waitForOutstandingCallbacks.<fn>
These two errors happen after we fix the points that I commented in ast.dart
and net.dart
.
No description provided.