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

Side by Side Diff: tools/patch_sdk.dart

Issue 2719453002: Pass patched_sdk path down to fasta as an Uri. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env dart 1 #!/usr/bin/env dart
2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
3 // for details. All rights reserved. Use of this source code is governed by a 3 // for details. All rights reserved. Use of this source code is governed by a
4 // BSD-style license that can be found in the LICENSE file. 4 // BSD-style license that can be found in the LICENSE file.
5 5
6 /// Command line tool to merge the SDK libraries and our patch files. 6 /// Command line tool to merge the SDK libraries and our patch files.
7 /// This is currently designed as an offline tool, but we could automate it. 7 /// This is currently designed as an offline tool, but we could automate it.
8 8
9 import 'dart:io'; 9 import 'dart:io';
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 // TODO(kustermann): We suppress compiler hints/warnings/errors temporarily 199 // TODO(kustermann): We suppress compiler hints/warnings/errors temporarily
200 // because everyone building the `runtime` target will get these now. 200 // because everyone building the `runtime` target will get these now.
201 // We should remove the suppression again once the underlying issues have 201 // We should remove the suppression again once the underlying issues have
202 // been fixed (either in fasta or the dart files in the patched_sdk). 202 // been fixed (either in fasta or the dart files in the patched_sdk).
203 final capturedLines = <String>[]; 203 final capturedLines = <String>[];
204 try { 204 try {
205 await runZoned(() async { 205 await runZoned(() async {
206 await compile_platform.main(<String>[ 206 await compile_platform.main(<String>[
207 '--packages', 207 '--packages',
208 new Uri.file(packagesFile).toString(), 208 new Uri.file(packagesFile).toString(),
209 outDir, 209 new Uri.directory(outDir).toString(),
210 path.join(outDir, 'platform.dill') 210 path.join(outDir, 'platform.dill')
211 ]); 211 ]);
212 }, zoneSpecification: new ZoneSpecification(print: (_, _2, _3, line) { 212 }, zoneSpecification: new ZoneSpecification(print: (_, _2, _3, line) {
213 capturedLines.add(line); 213 capturedLines.add(line);
214 })); 214 }));
215 } catch (_) { 215 } catch (_) {
216 for (final line in capturedLines) { 216 for (final line in capturedLines) {
217 print(line); 217 print(line);
218 } 218 }
219 rethrow; 219 rethrow;
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 if (diff != 0) return diff; 554 if (diff != 0) return diff;
555 return end - other.end; 555 return end - other.end;
556 } 556 }
557 } 557 }
558 558
559 List<SdkLibrary> _getSdkLibraries(String contents) { 559 List<SdkLibrary> _getSdkLibraries(String contents) {
560 var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(true); 560 var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(true);
561 parseCompilationUnit(contents).accept(libraryBuilder); 561 parseCompilationUnit(contents).accept(libraryBuilder);
562 return libraryBuilder.librariesMap.sdkLibraries; 562 return libraryBuilder.librariesMap.sdkLibraries;
563 } 563 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698