Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit a8fbbba

Browse files
author
John Messerly
committed
a few cleanups to get IDE message clean
R=priscillalee@google.com Review URL: https://codereview.chromium.org/2221253003 .
1 parent 15f19aa commit a8fbbba

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

tool/analyze.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ function fail {
1515
# TODO(jmesserly): ideally we could do test/all_tests.dart, but
1616
# dart_runtime_test.dart creates invalid generic type instantiation AA.
1717
echo "Running dartanalyzer to check for errors/warnings/hints..."
18-
dartanalyzer --strong --fatal-warnings --package-warnings bin/dartdevc.dart \
18+
dartanalyzer --strong --fatal-warnings --package-warnings \
19+
bin/dartdevc.dart web/main.dart \
1920
| grep -v "\[info\] TODO" | (! grep $PWD) || fail

web/web_command.dart

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,19 @@ import 'dart:html' show HttpRequest;
99
import 'dart:convert' show BASE64;
1010

1111
import 'package:analyzer/file_system/file_system.dart'
12-
show ResourceProvider, ResourceUriResolver;
12+
show ResourceUriResolver;
1313
import 'package:analyzer/file_system/memory_file_system.dart'
1414
show MemoryResourceProvider;
15-
import 'package:analyzer/src/context/cache.dart'
16-
show AnalysisCache, CachePartition;
1715
import 'package:analyzer/src/context/context.dart' show AnalysisContextImpl;
18-
import 'package:analyzer/src/generated/engine.dart'
19-
show AnalysisContext, AnalysisEngine, TimestampedData;
20-
import 'package:analyzer/src/generated/sdk.dart'
21-
show DartSdk, SdkLibrary, SdkLibraryImpl;
2216
import 'package:analyzer/src/generated/source.dart'
23-
show DartUriResolver, Source, SourceFactory, UriKind;
17+
show DartUriResolver;
2418
import 'package:analyzer/src/summary/idl.dart' show PackageBundle;
2519
import 'package:analyzer/src/summary/package_bundle_reader.dart'
2620
show
27-
SummaryDataStore,
28-
InSummaryPackageUriResolver,
29-
InputPackagesResultProvider,
30-
InSummarySource;
21+
SummaryDataStore,
22+
InSummaryPackageUriResolver,
23+
InputPackagesResultProvider,
24+
InSummarySource;
3125
import 'package:analyzer/src/summary/summary_sdk.dart' show SummaryBasedDartSdk;
3226

3327
import 'package:args/command_runner.dart';
@@ -43,6 +37,7 @@ typedef void MessageHandler(Object message);
4337
/// The command for invoking the modular compiler.
4438
class WebCompileCommand extends Command {
4539
get name => 'compile';
40+
4641
get description => 'Compile a set of Dart files into a JavaScript module.';
4742
final MessageHandler messageHandler;
4843

@@ -69,7 +64,7 @@ class WebCompileCommand extends Command {
6964

7065
Future.wait(summaryRequests).then((summaryResponses) {
7166
// Map summary responses to summary bytes.
72-
var summaryBytes = [];
67+
var summaryBytes = <List<int>>[];
7368
for (var response in summaryResponses) {
7469
summaryBytes.add(BASE64.decode(response.responseText));
7570
}
@@ -108,8 +103,8 @@ class WebCompileCommand extends Command {
108103
fileResolvers: fileResolvers,
109104
resourceProvider: resourceProvider);
110105

111-
compiler.context.resultProvider =
112-
new InputPackagesResultProvider(compiler.context, summaryDataStore);
106+
(compiler.context as AnalysisContextImpl).resultProvider =
107+
new InputPackagesResultProvider(compiler.context, summaryDataStore);
113108

114109
var compilerOptions = new CompilerOptions.fromArguments(argResults);
115110

0 commit comments

Comments
 (0)