Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2639743002: Report StateError if the DartSDK for an AnalysisDriver does not have summary. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index c24183c21bbc0b7fde562a6ace5d31a0e7997c5f..0d16a9221cc11a1210f6ff601aecc10090dfc68a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -78,7 +78,7 @@ class AnalysisDriver {
/**
* The name of the driver, e.g. the name of the folder.
*/
- String name;
+ final String name;
/**
* The scheduler that schedules analysis work in this, and possibly other
@@ -239,12 +239,19 @@ class AnalysisDriver {
this._resourceProvider,
this._byteStore,
this._contentOverlay,
+ this.name,
SourceFactory sourceFactory,
this._analysisOptions)
: _sourceFactory = sourceFactory.clone() {
_testView = new AnalysisDriverTestView(this);
_fillSalt();
_sdkBundle = sourceFactory.dartSdk.getLinkedBundle();
+ if (_sdkBundle == null) {
+ Type sdkType = sourceFactory.dartSdk.runtimeType;
+ String message = 'DartSdk ($sdkType) for $name does not have summary.';
+ AnalysisEngine.instance.logger.logError(message);
+ throw new StateError(message);
+ }
_fsState = new FileSystemState(
_logger,
_byteStore,
« no previous file with comments | « pkg/analysis_server/test/services/search/search_engine2_test.dart ('k') | pkg/analyzer/test/generated/resolver_test_case.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698