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

Unified Diff: pkg/analysis_server/lib/src/server/driver.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
Index: pkg/analysis_server/lib/src/server/driver.dart
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 6228efbd5cdc4e350e265b2c5cab8454c4f08db5..73867fe81d364a26cf9bec76315dc75da65191f0 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -399,12 +399,16 @@ class Driver implements ServerStarter {
// Use DirectoryBasedDartSdk.defaultSdkDirectory, which will make a guess.
defaultSdkDirectory = DirectoryBasedDartSdk.defaultSdkDirectory;
}
- SdkCreator defaultSdkCreator =
- () => new DirectoryBasedDartSdk(defaultSdkDirectory);
+ SdkCreator defaultSdkCreator = (AnalysisOptions options) {
+ DirectoryBasedDartSdk sdk =
+ new DirectoryBasedDartSdk(defaultSdkDirectory);
+ sdk.analysisOptions = options;
+ return sdk;
+ };
// TODO(brianwilkerson) It would be nice to avoid creating an SDK that
// cannot be re-used, but the SDK is needed to create a package map provider
// in the case where we need to run `pub` in order to get the package map.
- DirectoryBasedDartSdk defaultSdk = defaultSdkCreator();
+ DirectoryBasedDartSdk defaultSdk = defaultSdkCreator(null);
//
// Initialize the instrumentation service.
//
« no previous file with comments | « pkg/analysis_server/lib/src/operation/operation_analysis.dart ('k') | pkg/analysis_server/test/analysis_abstract.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698