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

Side by Side Diff: pkg/analyzer/tool/task_dependency_graph/generate.dart

Issue 1420533004: Revert "Add temporary code to debug windows bot failures." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 // 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 /** 5 /**
6 * This file contains code to output a description of tasks and their 6 * This file contains code to output a description of tasks and their
7 * dependencies in ".dot" format. Prior to running, the user should run "pub 7 * dependencies in ".dot" format. Prior to running, the user should run "pub
8 * get" in the analyzer directory to ensure that a "packages" folder exists. 8 * get" in the analyzer directory to ensure that a "packages" folder exists.
9 * 9 *
10 * TODO(paulberry): 10 * TODO(paulberry):
(...skipping 14 matching lines...) Expand all
25 import 'package:analyzer/file_system/physical_file_system.dart'; 25 import 'package:analyzer/file_system/physical_file_system.dart';
26 import 'package:analyzer/src/generated/constant.dart'; 26 import 'package:analyzer/src/generated/constant.dart';
27 import 'package:analyzer/src/generated/element.dart'; 27 import 'package:analyzer/src/generated/element.dart';
28 import 'package:analyzer/src/generated/engine.dart'; 28 import 'package:analyzer/src/generated/engine.dart';
29 import 'package:analyzer/src/generated/java_io.dart'; 29 import 'package:analyzer/src/generated/java_io.dart';
30 import 'package:analyzer/src/generated/sdk.dart'; 30 import 'package:analyzer/src/generated/sdk.dart';
31 import 'package:analyzer/src/generated/sdk_io.dart'; 31 import 'package:analyzer/src/generated/sdk_io.dart';
32 import 'package:analyzer/src/generated/source.dart'; 32 import 'package:analyzer/src/generated/source.dart';
33 import 'package:analyzer/src/generated/source_io.dart'; 33 import 'package:analyzer/src/generated/source_io.dart';
34 import 'package:path/path.dart' as path; 34 import 'package:path/path.dart' as path;
35 import 'dart:convert';
36 35
37 /** 36 /**
38 * Generate the target .dot file. 37 * Generate the target .dot file.
39 */ 38 */
40 main() { 39 main() {
41 new Driver().generateFile(); 40 new Driver().generateFile();
42 } 41 }
43 42
44 typedef void GetterFinderCallback(PropertyAccessorElement element); 43 typedef void GetterFinderCallback(PropertyAccessorElement element);
45 44
(...skipping 20 matching lines...) Expand all
66 65
67 /** 66 /**
68 * Determine if the output [file] contains the expected contents. 67 * Determine if the output [file] contains the expected contents.
69 */ 68 */
70 bool checkFile() { 69 bool checkFile() {
71 String expectedContents = generateFileContents(); 70 String expectedContents = generateFileContents();
72 String actualContents = file.readAsStringSync(); 71 String actualContents = file.readAsStringSync();
73 // Normalize Windows line endings to Unix line endings so that the 72 // Normalize Windows line endings to Unix line endings so that the
74 // comparison doesn't fail on Windows. 73 // comparison doesn't fail on Windows.
75 actualContents = actualContents.replaceAll('\r\n', '\n'); 74 actualContents = actualContents.replaceAll('\r\n', '\n');
76 if (expectedContents != actualContents) {
77 // Print additional information for debugging.
78 // TODO(paulberry): eliminate this when it is no longer needed.
79 print('expected: ${JSON.encode(expectedContents)}');
80 print('actual: ${JSON.encode(actualContents)}');
81 }
82 return expectedContents == actualContents; 75 return expectedContents == actualContents;
83 } 76 }
84 77
85 /** 78 /**
86 * Starting at [node], find all calls to registerExtension() which refer to 79 * Starting at [node], find all calls to registerExtension() which refer to
87 * the given [extensionIdVariable], and execute [callback] for the associated 80 * the given [extensionIdVariable], and execute [callback] for the associated
88 * result descriptors. 81 * result descriptors.
89 */ 82 */
90 void findExtensions(AstNode node, TopLevelVariableElement extensionIdVariable, 83 void findExtensions(AstNode node, TopLevelVariableElement extensionIdVariable,
91 void callback(descriptorName)) { 84 void callback(descriptorName)) {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 @override 338 @override
346 visitIdentifier(Identifier node) { 339 visitIdentifier(Identifier node) {
347 Element element = node.staticElement; 340 Element element = node.staticElement;
348 if (element is PropertyAccessorElement && 341 if (element is PropertyAccessorElement &&
349 element.isGetter && 342 element.isGetter &&
350 element.returnType.isSubtypeOf(type)) { 343 element.returnType.isSubtypeOf(type)) {
351 callback(element); 344 callback(element);
352 } 345 }
353 } 346 }
354 } 347 }
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