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

Side by Side Diff: pkg/analyzer/lib/src/codegen/tools.dart

Issue 1533693003: - Fix usage of Platform.packageRoot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync to latest Created 5 years 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 * Tools for generating code in analyzer and analysis server. 6 * Tools for generating code in analyzer and analysis server.
7 */ 7 */
8 library analyzer.src.codegen.tools; 8 library analyzer.src.codegen.tools;
9 9
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (!target.check(pkgPath)) { 304 if (!target.check(pkgPath)) {
305 print( 305 print(
306 '${target.output(pkgPath).absolute} does not have expected contents. '); 306 '${target.output(pkgPath).absolute} does not have expected contents. ');
307 generateNeeded = true; 307 generateNeeded = true;
308 } 308 }
309 } 309 }
310 if (generateNeeded) { 310 if (generateNeeded) {
311 print('Please regenerate using:'); 311 print('Please regenerate using:');
312 String executable = Platform.executable; 312 String executable = Platform.executable;
313 String packageRoot = ''; 313 String packageRoot = '';
314 if (Platform.packageRoot.isNotEmpty) { 314 if (Platform.packageRoot != null) {
315 packageRoot = ' --package-root=${Platform.packageRoot}'; 315 packageRoot = ' --package-root=${Platform.packageRoot}';
316 } 316 }
317 String generateScript = 317 String generateScript =
318 join(pkgPath, joinAll(posix.split(generatorRelPath))); 318 join(pkgPath, joinAll(posix.split(generatorRelPath)));
319 print(' $executable$packageRoot $generateScript'); 319 print(' $executable$packageRoot $generateScript');
320 exit(1); 320 exit(1);
321 } else { 321 } else {
322 print('All generated files up to date.'); 322 print('All generated files up to date.');
323 } 323 }
324 } 324 }
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 if (lines.last.isEmpty) { 597 if (lines.last.isEmpty) {
598 lines.removeLast(); 598 lines.removeLast();
599 buffer.add(new dom.Text(lines.join('\n$indent') + '\n')); 599 buffer.add(new dom.Text(lines.join('\n$indent') + '\n'));
600 indentNeeded = true; 600 indentNeeded = true;
601 } else { 601 } else {
602 buffer.add(new dom.Text(lines.join('\n$indent'))); 602 buffer.add(new dom.Text(lines.join('\n$indent')));
603 indentNeeded = false; 603 indentNeeded = false;
604 } 604 }
605 } 605 }
606 } 606 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/integration/integration_tests.dart ('k') | pkg/analyzer/tool/task_dependency_graph/generate.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698