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

Unified Diff: pkg/analyzer/lib/src/generated/sdk.dart

Issue 1830703002: Pass AnalysisOptions into SdkCreator, disable changing afterwards. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/sdk.dart
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index 0670b7c0895a5da0c969414274cea676a0bcde62..27577b84d465807ade8d6b10b753e37083b91a6c 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -14,9 +14,10 @@ import 'package:analyzer/src/generated/source.dart'
show ContentCache, Source, UriKind;
/**
- * A function used to create a new DartSdk
+ * A function used to create a new DartSdk with the given [options]. If the
+ * passed [options] are `null`, then default options are used.
*/
-typedef DartSdk SdkCreator();
+typedef DartSdk SdkCreator(AnalysisOptions options);
/**
* A Dart SDK installed in a specified location.
@@ -126,9 +127,8 @@ class DartSdkManager {
int encoding = options.encodeCrossContextOptions();
DartSdk sdk = sdkMap[encoding];
if (sdk == null) {
- sdk = sdkCreator();
+ sdk = sdkCreator(options);
sdkMap[encoding] = sdk;
- sdk.context.analysisOptions.setCrossContextOptionsFrom(options);
}
return sdk;
}
« no previous file with comments | « pkg/analyzer/lib/src/context/context.dart ('k') | pkg/analyzer/lib/src/generated/sdk_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698