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

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

Issue 430973002: Only support the new source_span spans in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 4 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
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | 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) 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.asset_environment; 5 library pub.barback.asset_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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // If the relevant asset isn't the primary input, mention it unless the 666 // If the relevant asset isn't the primary input, mention it unless the
667 // message already does. 667 // message already does.
668 if (entry.assetId != entry.transform.primaryId && 668 if (entry.assetId != entry.transform.primaryId &&
669 !messageMentionsAsset(entry.assetId)) { 669 !messageMentionsAsset(entry.assetId)) {
670 prefixParts.add("with input ${entry.assetId}"); 670 prefixParts.add("with input ${entry.assetId}");
671 } 671 }
672 672
673 var prefix = "[${prefixParts.join(' ')}]:"; 673 var prefix = "[${prefixParts.join(' ')}]:";
674 var message = entry.message; 674 var message = entry.message;
675 if (entry.span != null) { 675 if (entry.span != null) {
676 message = entry.span.getLocationMessage(entry.message); 676 message = entry.span.message(entry.message);
677 } 677 }
678 678
679 switch (entry.level) { 679 switch (entry.level) {
680 case LogLevel.ERROR: 680 case LogLevel.ERROR:
681 log.error("${log.red(prefix)}\n$message"); 681 log.error("${log.red(prefix)}\n$message");
682 break; 682 break;
683 683
684 case LogLevel.WARNING: 684 case LogLevel.WARNING:
685 log.warning("${log.yellow(prefix)}\n$message"); 685 log.warning("${log.yellow(prefix)}\n$message");
686 break; 686 break;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
741 String toString() => "polling"; 741 String toString() => "polling";
742 } 742 }
743 743
744 class _NoneWatcherType implements WatcherType { 744 class _NoneWatcherType implements WatcherType {
745 const _NoneWatcherType(); 745 const _NoneWatcherType();
746 746
747 DirectoryWatcher create(String directory) => null; 747 DirectoryWatcher create(String directory) => null;
748 748
749 String toString() => "none"; 749 String toString() => "none";
750 } 750 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/barback.dart ('k') | sdk/lib/_internal/pub/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698