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

Unified Diff: pkg/analysis_server/lib/src/socket_server.dart

Issue 1686613002: Use different SDKs based on option settings (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/socket_server.dart
diff --git a/pkg/analysis_server/lib/src/socket_server.dart b/pkg/analysis_server/lib/src/socket_server.dart
index 9fd17ca69c508eacbfd73bb7df8d9c1387fda36e..ad1baaa9b972e90ab4e847c066fac533453c4d49 100644
--- a/pkg/analysis_server/lib/src/socket_server.dart
+++ b/pkg/analysis_server/lib/src/socket_server.dart
@@ -15,6 +15,7 @@ import 'package:analyzer/instrumentation/instrumentation.dart';
import 'package:analyzer/plugin/embedded_resolver_provider.dart';
import 'package:analyzer/plugin/resolver_provider.dart';
import 'package:analyzer/source/pub_package_map_provider.dart';
+import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/sdk_io.dart';
import 'package:plugin/plugin.dart';
@@ -26,6 +27,12 @@ import 'package:plugin/plugin.dart';
*/
class SocketServer {
final AnalysisServerOptions analysisServerOptions;
+
+ /**
+ * The function used to create a new SDK using the default SDK.
+ */
+ final SdkCreator defaultSdkCreator;
+
final DirectoryBasedDartSdk defaultSdk;
final InstrumentationService instrumentationService;
final ServerPlugin serverPlugin;
@@ -45,6 +52,7 @@ class SocketServer {
SocketServer(
this.analysisServerOptions,
+ this.defaultSdkCreator,
this.defaultSdk,
this.instrumentationService,
this.serverPlugin,
@@ -91,7 +99,7 @@ class SocketServer {
index,
serverPlugin,
analysisServerOptions,
- defaultSdk,
+ defaultSdkCreator,
instrumentationService,
packageResolverProvider: packageResolverProvider,
embeddedResolverProvider: embeddedResolverProvider,

Powered by Google App Engine
This is Rietveld 408576698