-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[dev_compiler] Web: Unsupported operation: Undetermined nullability #52726
Comments
Thanks for filing! Can you share with us a minimal repro of this issue? cc @nshahan |
Here's a reproducer. this is Flutter app. |
is there anything I could change in Typings to fix this @srujzs ? |
There's likely some type here that the CFE is unable to determine the nullability of correctly, which throws in DDC, so yes, but I still need to figure out what the offending code is here. I'm trying to run typings but keep coming across issues when trying to do with log
Any idea where I'm going wrong in trying to use the package? |
I use inline classes in ts2dart I guess it changed to extension types or something like that. |
Hmm I don't think the migration to extension types is the issue, we haven't removed support for the inline class syntax yet either. Trying it with SDK 3.0.7 still produces the same error for me. Are you running this with something besides build_runner? I'm avoiding using Flutter to do this as it adds some extra step to use a custom Dart SDK and debug. |
You need to clean things up when changing the SDK, please try
|
Couldn't get that to work but ended up debugging using a local Flutter engine. The failure is at: https://github.com/jodinathan/typings/blob/e8e231c7905af52bc24538fe4ea17486e81cbc4d/typings/lib/src/d/core/lib.es2015.collection.d.dart#L265 A simple repro for the undetermined nullability error: class WeakMap<K extends Object, V> {
WeakMap(List<(K, V)> entries) {
entries.map((i) => [i.$1, i.$2]);
}
}
void main() {} The fix seems to be just add an explicit |
@srujzs You are a hero for finding the offending line of code! Thank you! It looks like the issue arrises from combining values with the types You can trigger the same issue with an even smaller repro: fn<T extends Object, S>(T t, S s) => [t, s];
void main() {} |
will this be fixed in 3.2? |
@chloestefantsova Are there still plans to resolve this in the CFE? |
@nshahan Sorry for the very late reply. Yes, I'm working on a fix at https://dart-review.googlesource.com/c/sdk/+/334441. |
can this please be fixed in 3.2, there are many, many complaints that they can't use Typings because of this bug |
I filed an issue to speed up the inclusion of the fix. However, I can't provide any estimates for when it actually will be included. |
Closes #52726 Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/334441 Cherry-pick-request: #53999 Fixes: #53999 Change-Id: I365c548c3a3a203797cbd73ec7798ff29dfd3f98 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/333825 Commit-Queue: Chloe Stefantsova <cstefantsova@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Context: Flutter web plugin implementation interoperating with JS.
This exception is only thrown in debug mode, release mode is OK.
Package issue reference
Here's the stack trace
The text was updated successfully, but these errors were encountered: