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

Side by Side Diff: pkg/front_end/tool/bazel/worker.dart

Issue 3003743002: Move tools to tool folder. (Closed)
Patch Set: Fix two problems that show up elsewhere. Created 3 years, 4 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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'dart:async'; 4 import 'dart:async';
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:args/args.dart'; 7 import 'package:args/args.dart';
8 import 'package:bazel_worker/bazel_worker.dart'; 8 import 'package:bazel_worker/bazel_worker.dart';
9 import 'package:front_end/front_end.dart' hide FileSystemException; 9 import 'package:front_end/front_end.dart' hide FileSystemException;
10 import 'package:front_end/src/fasta/command_line_reporting.dart'; 10 import 'package:front_end/src/fasta/command_line_reporting.dart';
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 if (outputBuffer != null) { 92 if (outputBuffer != null) {
93 options.onError = (CompilationMessage error) { 93 options.onError = (CompilationMessage error) {
94 var severityString = severityName(error.severity, capitalized: true); 94 var severityString = severityName(error.severity, capitalized: true);
95 outputBuffer.writeln('$severityString: ${error.message}'); 95 outputBuffer.writeln('$severityString: ${error.message}');
96 if (error.severity != Severity.nit) { 96 if (error.severity != Severity.nit) {
97 throw error; 97 throw error;
98 } 98 }
99 }; 99 };
100 } else { 100 } else {
101 options.throwOnWarnings = true; 101 options.throwOnWarningsForDebugging = true;
102 } 102 }
103 103
104 var sources = parsedArgs['source'].map(Uri.parse).toList(); 104 var sources = parsedArgs['source'].map(Uri.parse).toList();
105 var program = await summaryFor(sources, options); 105 var program = await summaryFor(sources, options);
106 106
107 var outputFile = new File(parsedArgs['output']); 107 var outputFile = new File(parsedArgs['output']);
108 outputFile.createSync(recursive: true); 108 outputFile.createSync(recursive: true);
109 outputFile.writeAsBytesSync(program); 109 outputFile.writeAsBytesSync(program);
110 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698