-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Mistaken nullability warning when compiling executable #48090
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
Comments
Maybe this helps: my tests for another project started failing just recently because of this.. the test monitors https://github.com/renatoathaydes/dartle/runs/4731870282?check_suite_focus=true
So, this is looking like a regression in Dart 2.15. |
This is caused by a discrepancy between the declaration of I'll update the patch implementation to match the declaration. |
Thanks @johnniwinther . This is breaking my build, so can you tell me when/which is the next release that will include this coming up? |
It might take while before it is available in stable release. Until then you can use one of these work-arounds: Indirection through local with type String _generateName() {
final dynamic isolateNameWorkaround = Isolate.current.debugName;
final String isolateName = isolateNameWorkaround ?? ''; Access through a helper: String? get _isolateNameWorkaround => Isolate.current.debugName;
String _generateName() {
final isolateName = _isolateNameWorkaround ?? ''; |
May be related to #46264
I have a package,
actors
, which is now emitting this warning when a binary depending on it is compiled:This is very weird because I am using Dart 2.15.1 and the
actors
package uses the environment configsdk: '>=2.15.0 <3.0.0'
(same as the package I am currently compiling), which I updated to try to get rid of this warning (I thought the nullability of this property might have changed between Dart 2.14 and 2.15 - but that's not the case).Isolate.current.debugName
is certainly nullable, and it appears to have been nullable at least since Dart2.9.0
: https://api.dart.dev/stable/2.9.0/dart-isolate/Isolate/debugName.html (it wasn't nullable up until 2.8.0).What could be the issue?
The text was updated successfully, but these errors were encountered: