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

Side by Side Diff: tools/patch_sdk.dart

Issue 3008563002: Removed Dartium SDK libs (Closed)
Patch Set: Needed few more definitions in dartium include (now removed). Created 3 years, 3 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 #!/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:isolate' show RawReceivePort; 10 import 'dart:isolate' show RawReceivePort;
(...skipping 25 matching lines...) Expand all
36 /// For more information see GN and Ninja references: 36 /// For more information see GN and Ninja references:
37 /// https://chromium.googlesource.com/chromium/src/+/56807c6cb383140af0c03da8 f6731d77785d7160/tools/gn/docs/reference.md#depfile_string_File-name-for-input-d ependencies-for-actions 37 /// https://chromium.googlesource.com/chromium/src/+/56807c6cb383140af0c03da8 f6731d77785d7160/tools/gn/docs/reference.md#depfile_string_File-name-for-input-d ependencies-for-actions
38 /// https://ninja-build.org/manual.html#_depfile 38 /// https://ninja-build.org/manual.html#_depfile
39 /// 39 ///
40 final deps = new Set<Uri>(); 40 final deps = new Set<Uri>();
41 41
42 /// Create [File] object from the given path and register it as a dependency. 42 /// Create [File] object from the given path and register it as a dependency.
43 File getInputFile(String path, {canBeMissing: false}) { 43 File getInputFile(String path, {canBeMissing: false}) {
44 final file = new File(path); 44 final file = new File(path);
45 if (!file.existsSync()) { 45 if (!file.existsSync()) {
46 if (!canBeMissing) throw "patch_sdk.dart expects all inputs to exist"; 46 if (!canBeMissing) throw "patch_sdk.dart expects all inputs to exist $path";
Alan Knight 2017/08/30 22:54:49 The error could be a little clearer, e.g. to exist
terry 2017/08/31 14:29:30 Done.
47 return null; 47 return null;
48 } 48 }
49 deps.add(Uri.base.resolveUri(file.uri)); 49 deps.add(Uri.base.resolveUri(file.uri));
50 return file; 50 return file;
51 } 51 }
52 52
53 /// Read the given file synchronously as a string and register this path as 53 /// Read the given file synchronously as a string and register this path as
54 /// a dependency. 54 /// a dependency.
55 String readInputFile(String path, {canBeMissing: false}) => 55 String readInputFile(String path, {canBeMissing: false}) =>
56 getInputFile(path, canBeMissing: canBeMissing)?.readAsStringSync(); 56 getInputFile(path, canBeMissing: canBeMissing)?.readAsStringSync();
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(forDart2js); 822 var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(forDart2js);
823 parseCompilationUnit(contents).accept(libraryBuilder); 823 parseCompilationUnit(contents).accept(libraryBuilder);
824 return libraryBuilder.librariesMap.sdkLibraries; 824 return libraryBuilder.librariesMap.sdkLibraries;
825 } 825 }
826 826
827 void addLocation(Map<String, Map<String, String>> locations, String libraryName, 827 void addLocation(Map<String, Map<String, String>> locations, String libraryName,
828 String libraryPath) { 828 String libraryPath) {
829 assert(locations[libraryName] == null); 829 assert(locations[libraryName] == null);
830 locations[libraryName] = {'uri': '${path.toUri(libraryPath)}'}; 830 locations[libraryName] = {'uri': '${path.toUri(libraryPath)}'};
831 } 831 }
OLDNEW
« tests/lib/analyzer/analyze_library.status ('K') | « tests/lib/analyzer/analyze_library.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698