{"action":"closed","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/32449","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/32449/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/32449/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/32449/events","html_url":"https://github.com/dart-lang/sdk/issues/32449","id":303037672,"node_id":"MDU6SXNzdWUzMDMwMzc2NzI=","number":32449,"title":"Handle missing references better","user":{"login":"peter-ahe-google","id":5689005,"node_id":"MDQ6VXNlcjU2ODkwMDU=","avatar_url":"https://avatars1.githubusercontent.com/u/5689005?v=4","gravatar_id":"","url":"https://api.github.com/users/peter-ahe-google","html_url":"https://github.com/peter-ahe-google","followers_url":"https://api.github.com/users/peter-ahe-google/followers","following_url":"https://api.github.com/users/peter-ahe-google/following{/other_user}","gists_url":"https://api.github.com/users/peter-ahe-google/gists{/gist_id}","starred_url":"https://api.github.com/users/peter-ahe-google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peter-ahe-google/subscriptions","organizations_url":"https://api.github.com/users/peter-ahe-google/orgs","repos_url":"https://api.github.com/users/peter-ahe-google/repos","events_url":"https://api.github.com/users/peter-ahe-google/events{/privacy}","received_events_url":"https://api.github.com/users/peter-ahe-google/received_events","type":"User","site_admin":false},"labels":[{"id":524536392,"node_id":"MDU6TGFiZWw1MjQ1MzYzOTI=","url":"https://api.github.com/repos/dart-lang/sdk/labels/area-front-end","name":"area-front-end","color":"c5def5","default":false},{"id":520924985,"node_id":"MDU6TGFiZWw1MjA5MjQ5ODU=","url":"https://api.github.com/repos/dart-lang/sdk/labels/front-end-fasta","name":"front-end-fasta","color":"d4c5f9","default":false},{"id":525029599,"node_id":"MDU6TGFiZWw1MjUwMjk1OTk=","url":"https://api.github.com/repos/dart-lang/sdk/labels/front-end-fasta-recovery","name":"front-end-fasta-recovery","color":"FF1493","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-07T10:11:38Z","updated_at":"2018-06-15T06:49:01Z","closed_at":"2018-06-15T06:49:01Z","author_association":"CONTRIBUTOR","body":"We've seen this stack trace reported in flutter/flutter#15206:\r\n\r\n```\r\ncompiler message: Unhandled exception:\r\nCrash when compiling file:///Users/tlarsen/Documents/Projects/checklist/lib/main.dart,\r\nat character offset null:\r\nReference to root::package:checklist/src/note.dart is not bound to an AST node. A library was expected\r\n#0      Reference.asLibrary (package:kernel/ast.dart:217)\r\n#1      LibraryDependency.targetLibrary (package:kernel/ast.dart:495)\r\n#2      SourceLoader.computeFullProgram (package:front_end/src/fasta/source/source_loader.dart:570)\r\n#3      SourceLoader.computeHierarchy (package:front_end/src/fasta/source/source_loader.dart:580)\r\n#4      KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:252)\r\n<asynchronous suspension>\r\n#5      IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:166)\r\n<asynchronous suspension>\r\n#6      CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:103)\r\n#7      _rootRun (dart:async/zone.dart:1126)\r\n#8      _CustomZone.run (dart:async/zone.dart:1023)\r\n#9      runZoned (dart:async/zone.dart:1501)\r\n#10     CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:103)\r\n#11     IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:58)\r\n<asynchronous suspension>\r\n#12     IncrementalCompiler.compile (package:vm/incremental_compiler.dart:33)\r\n<asynchronous suspension>\r\n#13     FrontendCompiler.compile.<anonymous closure> (package:vm/frontend_server.dart:207)\r\n#14     new Future.<anonymous closure> (dart:async/future.dart:174)\r\n#15     _rootRun (dart:async/zone.dart:1122)\r\n#16     _CustomZone.run (dart:async/zone.dart:1023)\r\n#17     _CustomZone.runGuarded (dart:async/zone.dart:925)\r\n#18     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965)\r\n#19     _rootRun (dart:async/zone.dart:1126)\r\n#20     _CustomZone.run (dart:async/zone.dart:1023)\r\n#21     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949)\r\n#22     Timer._createTimer.<anonymous closure> (dart:async-patch/dart:async/timer_patch.dart:21)\r\n#23     _Timer._runTimers (dart:isolate-patch/dart:isolate/timer_impl.dart:382)\r\n#24     _Timer._handleMessage (dart:isolate-patch/dart:isolate/timer_impl.dart:416)\r\n#25     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)\r\n```\r\n\r\nI think we could improve the user experience if we detect this situation and convert it to a deprected_InputError.\r\n\r\nWe can directly detect this particular situation, but I practice it would be impossible finding all possible null references. So it might make sense to throw a named exception when this situation occurs in kernel."}}
{"actor":{"display_login":"dart-bot"}}