Skip to content

completion_metrics tool, with --overlay remove-token, throws InconsistentAnalysisException for flutter/gallery #48789

Closed
@srawlins

Description

@srawlins

Cloning flutter/gallery, and then running flutter pub get, and then running the completion_metrics tool, throws an error:

$ $HOME/code/flutter/bin/dart pkg/analysis_server/tool/code_completion/completion_metrics.dart /Users/srawlins/code/flutter-gallery --overlay remove-token
Analyzing root: "/Users/srawlins/code/flutter-gallery"
Unhandled exception:
InconsistentAnalysisException: Requested result might be inconsistent with previously returned results

#0      AnalysisSessionImpl._checkConsistency (package:analyzer/src/dart/analysis/session.dart:133:7)
#1      AnalysisSessionImpl.getResolvedUnit (package:analyzer/src/dart/analysis/session.dart:119:5)
#2      CompletionMetricsComputer._computeInContext (file:///Users/srawlins/code/dart-sdk/sdk/pkg/analysis_server/tool/code_completion/completion_metrics.dart:1409:16)
<asynchronous suspension>
#3      CompletionMetricsComputer.computeMetrics (file:///Users/srawlins/code/dart-sdk/sdk/pkg/analysis_server/tool/code_completion/completion_metrics.dart:737:7)
<asynchronous suspension>
#4      main (file:///Users/srawlins/code/dart-sdk/sdk/pkg/analysis_server/tool/code_completion/completion_metrics.dart:129:3)
<asynchronous suspension>

It seems to be doing better if I do not pass --overlay remove-token.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestdevexp-completionIssues with the analysis server's code completion featurelegacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions