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

Side by Side Diff: pkg/analyzer_cli/lib/src/analyzer_impl.dart

Issue 1962403002: Fix CLI SDK option config timing (#26129). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer_cli.src.analyzer_impl; 5 library analyzer_cli.src.analyzer_impl;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
11 import 'package:analyzer/source/error_processor.dart'; 11 import 'package:analyzer/source/error_processor.dart';
12 import 'package:analyzer/src/generated/engine.dart'; 12 import 'package:analyzer/src/generated/engine.dart';
13 import 'package:analyzer/src/generated/error.dart'; 13 import 'package:analyzer/src/generated/error.dart';
14 import 'package:analyzer/src/generated/java_engine.dart'; 14 import 'package:analyzer/src/generated/java_engine.dart';
15 import 'package:analyzer/src/generated/java_io.dart'; 15 import 'package:analyzer/src/generated/java_io.dart';
16 import 'package:analyzer/src/generated/sdk_io.dart';
17 import 'package:analyzer/src/generated/source.dart'; 16 import 'package:analyzer/src/generated/source.dart';
18 import 'package:analyzer/src/generated/source_io.dart'; 17 import 'package:analyzer/src/generated/source_io.dart';
19 import 'package:analyzer/src/generated/utilities_general.dart'; 18 import 'package:analyzer/src/generated/utilities_general.dart';
20 import 'package:analyzer_cli/src/driver.dart'; 19 import 'package:analyzer_cli/src/driver.dart';
21 import 'package:analyzer_cli/src/error_formatter.dart'; 20 import 'package:analyzer_cli/src/error_formatter.dart';
22 import 'package:analyzer_cli/src/options.dart'; 21 import 'package:analyzer_cli/src/options.dart';
23 import 'package:path/path.dart' as pathos; 22 import 'package:path/path.dart' as pathos;
24 23
25 /// The maximum number of sources for which AST structures should be kept in the cache. 24 /// The maximum number of sources for which AST structures should be kept in the cache.
26 const int _maxCacheSize = 512; 25 const int _maxCacheSize = 512;
27 26
28 DirectoryBasedDartSdk sdk;
29
30 int currentTimeMillis() => new DateTime.now().millisecondsSinceEpoch; 27 int currentTimeMillis() => new DateTime.now().millisecondsSinceEpoch;
31 28
32 /// Analyzes single library [File]. 29 /// Analyzes single library [File].
33 class AnalyzerImpl { 30 class AnalyzerImpl {
34 static final PerformanceTag _prepareErrorsTag = 31 static final PerformanceTag _prepareErrorsTag =
35 new PerformanceTag("AnalyzerImpl.prepareErrors"); 32 new PerformanceTag("AnalyzerImpl.prepareErrors");
36 static final PerformanceTag _resolveLibraryTag = 33 static final PerformanceTag _resolveLibraryTag =
37 new PerformanceTag("AnalyzerImpl._resolveLibrary"); 34 new PerformanceTag("AnalyzerImpl._resolveLibrary");
38 35
39 final CommandLineOptions options; 36 final CommandLineOptions options;
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 359 }
363 360
364 @override 361 @override
365 void logInformation(String message, [CaughtException exception]) { 362 void logInformation(String message, [CaughtException exception]) {
366 outSink.writeln(message); 363 outSink.writeln(message);
367 if (exception != null) { 364 if (exception != null) {
368 outSink.writeln(exception); 365 outSink.writeln(exception);
369 } 366 }
370 } 367 }
371 } 368 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer_cli/lib/src/driver.dart » ('j') | pkg/analyzer_cli/lib/src/driver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698