-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
This simple project with 2 dart files causes Analysis Server exception. Reproduced with latest at this moment SDKs 1.17.1 and 1.18-dev.2.0:
foo.dart
(notice space after bar.dart):
import 'bar.dart ';
bar.dart
: empty file in the same folder.
Dart analysis server, SDK version 1.17.1, server version 1.15.0, error: Task failed: ResolveDirectiveElementsTask for source C:\dart_projects\failure\foo.dart
Mismatch in DirectiveResolver while resolving C:\dart_projects\failure\foo.dart
Could not find any import element for 'C:\dart_projects\failure\bar.dart '
Path to root: ImportDirectiveImpl, CompilationUnitImpl
#0 SimpleAstVisitor&ExistingElementResolver._mismatch (package:analyzer/src/generated/resolver.dart:3457)
#1 DirectiveResolver._findImport (package:analyzer/src/generated/resolver.dart:2936)
#2 DirectiveResolver.visitImportDirective (package:analyzer/src/generated/resolver.dart:2850)
#3 ImportDirectiveImpl.accept (package:analyzer/src/dart/ast/ast.dart:5836)
#4 DirectiveResolver.visitCompilationUnit (package:analyzer/src/generated/resolver.dart:2825)
#5 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2433)
#6 ResolveDirectiveElementsTask.internalPerform (package:analyzer/src/task/dart.dart:4615)
#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:1176)
#12 _PerformanceTagImpl.makeCurrentWhile (package:analyzer/src/generated/utilities_general.dart:212)
#13 AnalysisContextImpl.performAnalysisTask (package:analyzer/src/context/context.dart:1174)
#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)
Metadata
Metadata
Assignees
Labels
P1A high priority bug; for example, a single project is unusable or has many test failuresA high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)