Skip to content
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

Mismatch in Directive Resolver #26629

Closed
lukechurch opened this issue Jun 7, 2016 · 5 comments
Closed

Mismatch in Directive Resolver #26629

lukechurch opened this issue Jun 7, 2016 · 5 comments
Assignees
Labels
analyzer-stability area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@lukechurch
Copy link
Contributor

This issue is occurring very frequently.

1.17.0-dev.2.0
Session: 1464526396652.8389

Caused by Mismatch in DirectiveResolver while resolving /____________.dart
Could not find any import element for '____________.dart'
Path to root:: ImportDirectiveImpl, CompilationUnitImpl
#0      SimpleAstVisitor&ExistingElementResolver._mismatch (package::analyzer/src/generated/resolver.dart::3433)
#1      DirectiveResolver._findImport (package::analyzer/src/generated/resolver.dart::2916)
#2      DirectiveResolver.visitImportDirective (package::analyzer/src/generated/resolver.dart::2834)
#3      ImportDirectiveImpl.accept (package::analyzer/src/dart/ast/ast.dart::5819)
#4      DirectiveResolver.visitCompilationUnit (package::analyzer/src/generated/resolver.dart::2809)
#5      CompilationUnitImpl.accept (package::analyzer/src/dart/ast/ast.dart::2420)
#6      ResolveDirectiveElementsTask.internalPerform (package::analyzer/src/task/dart.dart::4487)
#7      AnalysisTask._safelyPerform (package::analyzer/task/model.dart::329)
#8      AnalysisTask.perform (package::analyzer/task/model.dart::229)
#9      AnalysisDriver.performWorkItem (package::analyzer/src/task/driver.dart::276)
#10     AnalysisDriver.performAnalysisTask (package::analyzer/src/task/driver.dart::251)
#11     AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package::analyzer/src/context/context.dart::1161)
#12     _PerformanceTagImpl.makeCurrentWhile (package::analyzer/src/generated/utilities_general.dart::212)
#13     AnalysisContextImpl.performAnalysisTask (package::analyzer/src/context/context.dart::1159)
#14     PerformAnalysisOperation.perform (package::analysis_server/src/operation/operation_analysis.dart::371)
#15     AnalysisServer.performOperation (package::analysis_server/src/analysis_server.dart::876)
#16     Future.Future.<anonymous closure> (dart::async/future.dart::118)
#17     _rootRun (dart::async/zone.dart::946)
#18     _CustomZone.run (dart::async/zone.dart::826)
#19     _CustomZone.runGuarded (dart::async/zone.dart::724)
#20     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#21     _rootRun (dart::async/zone.dart::950)
#22     _CustomZone.run (dart::async/zone.dart::826)
#23     _CustomZone.runGuarded (dart::async/zone.dart::724)
#24     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#25     Timer._createTimer.<anonymous closure> (dart::async-patch/timer_patch.dart::16)
#26     _Timer._runTimers (dart::isolate-patch/timer_impl.dart::385)
#27     _Timer._handleMessage (dart::isolate-patch/timer_impl.dart::414)
#28     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::148)


#0      AnalysisFutureHelper.computeAsync.<anonymous closure> (package::analyzer/src/context/context.dart::2020)
#1      PendingFuture.evaluate (package::analyzer/src/context/context.dart::2125)
#2      AnalysisFutureHelper.computeAsync (package::analyzer/src/context/context.dart::2026)
#3      DartCompletionRequestImpl._computeAsync.<_computeAsync_async_body> (package::analysis_server/src/services/completion/dart/completion_manager.dart::437)
#4      Future.Future.microtask.<anonymous closure> (dart::async/future.dart::144)
#5      _rootRun (dart::async/zone.dart::946)
#6      _CustomZone.run (dart::async/zone.dart::826)
#7      _CustomZone.runGuarded (dart::async/zone.dart::724)
#8      _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#9      _rootRun (dart::async/zone.dart::950)
#10     _CustomZone.run (dart::async/zone.dart::826)
#11     _CustomZone.runGuarded (dart::async/zone.dart::724)
#12     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#13     _microtaskLoop (dart::async/schedule_microtask.dart::41)
#14     _startMicrotaskLoop (dart::async/schedule_microtask.dart::50)
#15     _runPendingImmediateCallback (dart::isolate-patch/isolate_patch.dart::96)
#16     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::149)


#0      DartCompletionRequestImpl._computeAsync.<_computeAsync_async_body> (package::analysis_server/src/services/completion/dart/completion_manager.dart::442)
#1      _asyncErrorWrapperHelper.<anonymous closure> (dart::async-patch/async_patch.dart::34)
#2      _rootRunBinary (dart::async/zone.dart::970)
#3      _CustomZone.runBinary (dart::async/zone.dart::849)
#4      _FutureListener.handleError (dart::async/future_impl.dart::146)
#5      _Future._propagateToListeners.handleError (dart::async/future_impl.dart::640)
#6      _Future._propagateToListeners (dart::async/future_impl.dart::662)
#7      _Future._completeError (dart::async/future_impl.dart::476)
#8      _Future._asyncCompleteError.<anonymous closure> (dart::async/future_impl.dart::528)
#9      _rootRun (dart::async/zone.dart::950)
#10     _CustomZone.run (dart::async/zone.dart::826)
#11     _CustomZone.runGuarded (dart::async/zone.dart::724)
#12     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#13     _microtaskLoop (dart::async/schedule_microtask.dart::41)
#14     _startMicrotaskLoop (dart::async/schedule_microtask.dart::50)
#15     _runPendingImmediateCallback (dart::isolate-patch/isolate_patch.dart::96)
#16     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart
Original message:
{"event"::"server.error","params"::{"isFatal"::false,"message"::"Failed to handle completion domain request:: {clientRequestTime:: 1464529888124, params:: {file:: ____________.dart, offset:: 6233}, method:: completion.getSuggestions, id:: 2872}","stackTrace"::"AnalysisException:: failed to resolve declarations
Caused by Mismatch in DirectiveResolver while resolving ____________.dart
Could not find any import element for '____________.dart'
Path to root:: ImportDirectiveImpl, CompilationUnitImpl
#0      SimpleAstVisitor&ExistingElementResolver._mismatch (package::analyzer/src/generated/resolver.dart::3433)
#1      DirectiveResolver._findImport (package::analyzer/src/generated/resolver.dart::2916)
#2      DirectiveResolver.visitImportDirective (package::analyzer/src/generated/resolver.dart::2834)
#3      ImportDirectiveImpl.accept (package::analyzer/src/dart/ast/ast.dart::5819)
#4      DirectiveResolver.visitCompilationUnit (package::analyzer/src/generated/resolver.dart::2809)
#5      CompilationUnitImpl.accept (package::analyzer/src/dart/ast/ast.dart::2420)
#6      ResolveDirectiveElementsTask.internalPerform (package::analyzer/src/task/dart.dart::4487)
#7      AnalysisTask._safelyPerform (package::analyzer/task/model.dart::329)
#8      AnalysisTask.perform (package::analyzer/task/model.dart::229)
#9      AnalysisDriver.performWorkItem (package::analyzer/src/task/driver.dart::276)
#10     AnalysisDriver.performAnalysisTask (package::analyzer/src/task/driver.dart::251)
#11     AnalysisContextImpl.performAnalysisTask.<anonymous closure> (package::analyzer/src/context/context.dart::1161)
#12     _PerformanceTagImpl.makeCurrentWhile (package::analyzer/src/generated/utilities_general.dart::212)
#13     AnalysisContextImpl.performAnalysisTask (package::analyzer/src/context/context.dart::1159)
#14     PerformAnalysisOperation.perform (package::analysis_server/src/operation/operation_analysis.dart::371)
#15     AnalysisServer.performOperation (package::analysis_server/src/analysis_server.dart::876)
#16     Future.Future.<anonymous closure> (dart::async/future.dart::118)
#17     _rootRun (dart::async/zone.dart::946)
#18     _CustomZone.run (dart::async/zone.dart::826)
#19     _CustomZone.runGuarded (dart::async/zone.dart::724)
#20     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#21     _rootRun (dart::async/zone.dart::950)
#22     _CustomZone.run (dart::async/zone.dart::826)
#23     _CustomZone.runGuarded (dart::async/zone.dart::724)
#24     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#25     Timer._createTimer.<anonymous closure> (dart::async-patch/timer_patch.dart::16)
#26     _Timer._runTimers (dart::isolate-patch/timer_impl.dart::385)
#27     _Timer._handleMessage (dart::isolate-patch/timer_impl.dart::414)
#28     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::148)


#0      AnalysisFutureHelper.computeAsync.<anonymous closure> (package::analyzer/src/context/context.dart::2020)
#1      PendingFuture.evaluate (package::analyzer/src/context/context.dart::2125)
#2      AnalysisFutureHelper.computeAsync (package::analyzer/src/context/context.dart::2026)
#3      DartCompletionRequestImpl._computeAsync.<_computeAsync_async_body> (package::analysis_server/src/services/completion/dart/completion_manager.dart::437)
#4      Future.Future.microtask.<anonymous closure> (dart::async/future.dart::144)
#5      _rootRun (dart::async/zone.dart::946)
#6      _CustomZone.run (dart::async/zone.dart::826)
#7      _CustomZone.runGuarded (dart::async/zone.dart::724)
#8      _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#9      _rootRun (dart::async/zone.dart::950)
#10     _CustomZone.run (dart::async/zone.dart::826)
#11     _CustomZone.runGuarded (dart::async/zone.dart::724)
#12     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#13     _microtaskLoop (dart::async/schedule_microtask.dart::41)
#14     _startMicrotaskLoop (dart::async/schedule_microtask.dart::50)
#15     _runPendingImmediateCallback (dart::isolate-patch/isolate_patch.dart::96)
#16     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::149)


#0      DartCompletionRequestImpl._computeAsync.<_computeAsync_async_body> (package::analysis_server/src/services/completion/dart/completion_manager.dart::442)
#1      _asyncErrorWrapperHelper.<anonymous closure> (dart::async-patch/async_patch.dart::34)
#2      _rootRunBinary (dart::async/zone.dart::970)
#3      _CustomZone.runBinary (dart::async/zone.dart::849)
#4      _FutureListener.handleError (dart::async/future_impl.dart::146)
#5      _Future._propagateToListeners.handleError (dart::async/future_impl.dart::640)
#6      _Future._propagateToListeners (dart::async/future_impl.dart::662)
#7      _Future._completeError (dart::async/future_impl.dart::476)
#8      _Future._asyncCompleteError.<anonymous closure> (dart::async/future_impl.dart::528)
#9      _rootRun (dart::async/zone.dart::950)
#10     _CustomZone.run (dart::async/zone.dart::826)
#11     _CustomZone.runGuarded (dart::async/zone.dart::724)
#12     _CustomZone.bindCallback.<anonymous closure> (dart::async/zone.dart::751)
#13     _microtaskLoop (dart::async/schedule_microtask.dart::41)
#14     _startMicrotaskLoop (dart::async/schedule_microtask.dart::50)
#15     _runPendingImmediateCallback (dart::isolate-patch/isolate_patch.dart::96)
#16     _RawReceivePortImpl._handleMessage (dart::isolate-patch/isolate_patch.dart::149)
"}}
@lukechurch lukechurch added P1 A high priority bug; for example, a single project is unusable or has many test failures area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. analyzer-stability type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Jun 7, 2016
@bwilkerson bwilkerson removed their assignment Jun 7, 2016
@bwilkerson
Copy link
Member

@scheglov I have also noticed this happening a lot lately. Any idea what might have changed to make this more common?

@scheglov
Copy link
Contributor

scheglov commented Jun 7, 2016

This code path was changed in d1104de. So, it is possible that now because we apply library elements to AST more often, we see the underlaying problem more often.

@scheglov scheglov self-assigned this Jun 8, 2016
@scheglov
Copy link
Contributor

scheglov commented Jun 8, 2016

I can reproduce this now.

@scheglov
Copy link
Contributor

scheglov commented Jun 8, 2016

scheglov added a commit that referenced this issue Jun 9, 2016
When it is detected, invalidate the outputs and throw an exception to
let Driver know that it should to recover.

R=brianwilkerson@google.com, paulberry@google.com
BUG= #26629

Review URL: https://codereview.chromium.org/2050573003 .
@scheglov
Copy link
Contributor

scheglov commented Jun 9, 2016

979543e

@scheglov scheglov closed this as completed Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-stability area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants