Skip to content

Training run of 'pub' in the SDK build fails #40486

@a-siva

Description

@a-siva

The training run on 'pub' in the SDK build fails with the following error :

Closure: ([Object]) => void? from [email protected]_complete
'dart:async/future_impl.dart': Failed type check: line 117 pos 21: type '([Object]) => void?' is not a subtype of type '(dynamic?) => FutureOr<void?>' in type cast

To reproduce:

Patch in the CL https://dart-review.googlesource.com/c/sdk/+/134112 and build a full SDK using tools/build.py --nnbd create_sdk

Run "pub help <command>" for more information about a command.
See https://dart.dev/tools/pub/cmd for detailed documentation.
null
Closure: ([Object]) => void? from [email protected]_complete
'dart:async/future_impl.dart': Failed type check: line 117 pos 21: type '([Object]) => void?' is not a subtype of type '(dynamic?) => FutureOr<void?>' in type cast
Exception 'Instance of '_CastError'' thrown:
#0      _FutureListener._onValue (dart:async/future_impl.dart:117:21)
#1      _FutureListener.handleValue (dart:async/future_impl.dart:141:43)
#2      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:690:45)
#3      Future._propagateToListeners (dart:async/future_impl.dart:719:32)
#4      Future._completeWithValue (dart:async/future_impl.dart:529:5)
#5      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:561:7)
#6      _rootRun (dart:async/zone.dart:1134:13)
#7      _CustomZone.run (dart:async/zone.dart:1038:19)
#8      _CustomZone.runGuarded (dart:async/zone.dart:942:7)
#9      _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:982:23)
#10     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#11     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#12     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:117:13)
#13     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:5)

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD Releasearea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions