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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/barback/build_environment.dart

Issue 203673003: Allow [path.fromUri] to take a string as well as a URI. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 | Annotate | Revision Log
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 library pub.barback.build_environment; 5 library pub.barback.build_environment;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 /// 430 ///
431 /// Since both [LogEntry] objects and the message itself often redundantly 431 /// Since both [LogEntry] objects and the message itself often redundantly
432 /// show the same context like the file where an error occurred, this tries 432 /// show the same context like the file where an error occurred, this tries
433 /// to avoid showing redundant data in the entry. 433 /// to avoid showing redundant data in the entry.
434 void _log(LogEntry entry) { 434 void _log(LogEntry entry) {
435 messageMentions(text) => 435 messageMentions(text) =>
436 entry.message.toLowerCase().contains(text.toLowerCase()); 436 entry.message.toLowerCase().contains(text.toLowerCase());
437 437
438 messageMentionsAsset(id) => 438 messageMentionsAsset(id) =>
439 messageMentions(id.toString()) || 439 messageMentions(id.toString()) ||
440 messageMentions(path.joinAll(path.url.split(entry.assetId.path))); 440 messageMentions(path.fromUri(entry.assetId.path));
441 441
442 var prefixParts = []; 442 var prefixParts = [];
443 443
444 // Show the level (unless the message mentions it). 444 // Show the level (unless the message mentions it).
445 if (!messageMentions(entry.level.name)) { 445 if (!messageMentions(entry.level.name)) {
446 prefixParts.add("${entry.level} from"); 446 prefixParts.add("${entry.level} from");
447 } 447 }
448 448
449 // Show the transformer. 449 // Show the transformer.
450 prefixParts.add(entry.transform.transformer); 450 prefixParts.add(entry.transform.transformer);
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 String toString() => "polling"; 522 String toString() => "polling";
523 } 523 }
524 524
525 class _NoneWatcherType implements WatcherType { 525 class _NoneWatcherType implements WatcherType {
526 const _NoneWatcherType(); 526 const _NoneWatcherType();
527 527
528 DirectoryWatcher create(String directory) => null; 528 DirectoryWatcher create(String directory) => null;
529 529
530 String toString() => "none"; 530 String toString() => "none";
531 } 531 }
OLDNEW
« no previous file with comments | « pkg/path/test/windows_test.dart ('k') | sdk/lib/_internal/pub/lib/src/barback/pub_package_provider.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698