Previously, if failing when trying to load from a dill it would say
something like
Warning: Tried to initialize from a previous compilation
(build/app.dill), but couldn't. Error message was
'NoSuchMethodError: The method 'getReference' was called on null.
Receiver: null
Tried calling: getReference()'. This might be a bug.
The Dart team would greatly appreciate if you would take a moment to
report this problem at http://dartbug.com/new.
Which really doesn't give us a lot to go on.
This CL changes that to also give us a little go to on, and report
something like
Warning: Tried to initialize from a previous compilation
(org-dartlang-test:///initializeFrom.dill), but couldn't.
Error message was 'NoSuchMethodError: The method 'getReference' was
called on null.
Receiver: null
Tried calling: getReference()'. Stacktrace included '#0 Object.noSuchMethod (dart:core/runtime/libobject_patch.dart:50:5)
#1 BinaryBuilder.readLibraryReference (package:kernel/binary/ast_from_binary.dart:692:9)
#2 BinaryBuilder.readLibraryDependency (package:kernel/binary/ast_from_binary.dart:837:25)
#3 BinaryBuilder._readLibraryDependencies (package:kernel/binary/ast_from_binary.dart:829:33)
#4 BinaryBuilder.readLibrary (package:kernel/binary/ast_from_binary.dart:803:5)
#5 BinaryBuilder._readOneComponent (package:kernel/binary/ast_from_binary.dart:634:7)
#6 BinaryBuilder.readComponent (package:kernel/binary/ast_from_binary.dart:441:7)
#7 IncrementalCompiler.initializeFromDill (package:front_end/src/fasta/incremental_compiler.dart:395:14)
<asynchronous suspension>
#8 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:126:23)
<asynchronous suspension>
#9 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:120:46)
#10 new Future.sync (dart:async/future.dart:224:31)
#11 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:120:19)
#12 _rootRun (dart:async/zone.dart:1124:13)
#13 _CustomZone.run (dart:async/zone.dart:1021:19)
#14 _runZoned (dart:async/zone.dart:1516:10)
#15 runZoned (dart:async/zone.dart:1463:12)
#16 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:119:12)
#17 IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:108:20)
<asynchronous suspension>
#18 initializedCompile (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/incremental_load_from_dill_test.dart:397:51)
<asynchronous suspension>
#19 basicTest (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/incremental_load_from_dill_test.dart:167:34)
<asynchronous suspension>
#20 RunCompilations.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/incremental_load_from_dill_test.dart:101:15)
<asynchronous suspension>
#21 ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:180:33)
<asynchronous suspension>
#22 new Future.<anonymous closure> (dart:async/future.dart:176:37)
#23 _rootRun (dart:async/zone.dart:1120:38)
#24 _CustomZone.run (dart:async/zone.dart:1021:19)
#25 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
#26 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
#27 _rootRun (dart:async/zone.dart:1124:13)
#28 _CustomZone.run (dart:async/zone.dart:1021:19)
#29 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#30 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#31 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#32 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#33 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)
'. This might be a bug. The Dart team would greatly appreciate if you would take a moment to report this problem at http://dartbug.com/new.
which will hopefully allow us to actually debug any such reports.
Change-Id: I13bdd4f96c1e4bb2dcce91e533442b48c87c9e0c
Reviewed-on: https://dart-review.googlesource.com/c/85348
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to this change, old problems (warnings, errors, etc) would not be
re-issued for files not actually recompiled when recompiling.
As an example, not making any change and recompiling it would seem like
everything was good.
With this change, all problems should be issued again.
Change-Id: Ia410edba27438d8a2f1842d9f4d81d0592571101
Reviewed-on: https://dart-review.googlesource.com/c/91747
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This is needed to serialize and deserialize problems to dill and
re-issuing problems as needed.
Change-Id: Id22d1c86f43b1b08c5e5a4d133869075e9b0c100
Reviewed-on: https://dart-review.googlesource.com/c/91743
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Fasta can generate synthetic libraries.
Previously we didn't include them when serializing, but that leaves
references in the binary to libraries that doesn't exist which isn't
ideal.
This change includes them, and adds a flag to kernel Libraries such that
we know they are synthetic.
Change-Id: Ied25a21cd1f384d318347021bc7ec18dae3a4e05
Reviewed-on: https://dart-review.googlesource.com/c/91722
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Prior to this change, problems issued in hierarchy.mixinInferrer could
be swallowed up because it was reported through a wrong loader that
had already issued the error.
Change-Id: Iecbc180ca8a0bfaa73db202e4cba9755812d1e3b
Reviewed-on: https://dart-review.googlesource.com/c/91746
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
If - for instance - a file (say 'main.dart') tries to include a part
(say 'lib.dart') that is not part of that file (i.e. doesn't state
something like 'part of "main.dart"'), and the file ('lib.dart') is not
otherwise used, before this change, the library ('lib.dart') would be
included in the first comile, but on subsequent re-compiles wouldn't
include it because it's not referenced, nor ever cleaned up
(and would thus be re-compiled.)
This change garbage-collects the library as it's not referenced.
Change-Id: I8fa90b3ae6fc3d99af9fec780abe62855e653ddb
Reviewed-on: https://dart-review.googlesource.com/c/90385
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
The classes Future and Stream are exported by dart:core.
By attempting to look up FutureOr in dart:core before dart:async,
we support simple a simple test scenario where there's only one
platform library.
Change-Id: I76627f89957b91fbdb52a7772c177a769c37cecb
Reviewed-on: https://dart-review.googlesource.com/c/90381
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>