OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library driver; | 5 library driver; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:math'; | 9 import 'dart:math'; |
10 | 10 |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 InstrumentationService service = | 441 InstrumentationService service = |
442 new InstrumentationService(instrumentationServer); | 442 new InstrumentationService(instrumentationServer); |
443 service.logVersion(_readUuid(service), results[CLIENT_ID], | 443 service.logVersion(_readUuid(service), results[CLIENT_ID], |
444 results[CLIENT_VERSION], AnalysisServer.VERSION, defaultSdk.sdkVersion); | 444 results[CLIENT_VERSION], AnalysisServer.VERSION, defaultSdk.sdkVersion); |
445 AnalysisEngine.instance.instrumentationService = service; | 445 AnalysisEngine.instance.instrumentationService = service; |
446 // | 446 // |
447 // Create the sockets and start listening for requests. | 447 // Create the sockets and start listening for requests. |
448 // | 448 // |
449 socketServer = new SocketServer( | 449 socketServer = new SocketServer( |
450 analysisServerOptions, | 450 analysisServerOptions, |
451 defaultSdkCreator, | 451 new DartSdkManager(defaultSdkDirectory.getAbsolutePath(), useSummaries, |
| 452 defaultSdkCreator), |
452 defaultSdk, | 453 defaultSdk, |
453 service, | 454 service, |
454 serverPlugin, | 455 serverPlugin, |
455 fileResolverProvider, | 456 fileResolverProvider, |
456 packageResolverProvider, | 457 packageResolverProvider, |
457 useSingleContextManager); | 458 useSingleContextManager); |
458 httpServer = new HttpAnalysisServer(socketServer); | 459 httpServer = new HttpAnalysisServer(socketServer); |
459 stdioServer = new StdioAnalysisServer(socketServer); | 460 stdioServer = new StdioAnalysisServer(socketServer); |
460 socketServer.userDefinedPlugins = _userDefinedPlugins; | 461 socketServer.userDefinedPlugins = _userDefinedPlugins; |
461 | 462 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
623 */ | 624 */ |
624 static void _rollLogFiles(String path, int numOld) { | 625 static void _rollLogFiles(String path, int numOld) { |
625 for (int i = numOld - 1; i >= 0; i--) { | 626 for (int i = numOld - 1; i >= 0; i--) { |
626 try { | 627 try { |
627 String oldPath = i == 0 ? path : '$path.$i'; | 628 String oldPath = i == 0 ? path : '$path.$i'; |
628 new File(oldPath).renameSync('$path.${i+1}'); | 629 new File(oldPath).renameSync('$path.${i+1}'); |
629 } catch (e) {} | 630 } catch (e) {} |
630 } | 631 } |
631 } | 632 } |
632 } | 633 } |
OLD | NEW |