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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 21544003: Handle missing imports/exports/parts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add example to warning. Created 7 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * The messages in this file should meet the following guide lines: 8 * The messages in this file should meet the following guide lines:
9 * 9 *
10 * 1. The message should start with exactly one of "Error", "Internal error", 10 * 1. The message should start with exactly one of "Error", "Internal error",
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 static const MessageKind IMPORTED_HERE = const MessageKind( 624 static const MessageKind IMPORTED_HERE = const MessageKind(
625 'Info: "#{element}" is imported here.'); 625 'Info: "#{element}" is imported here.');
626 626
627 static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind( 627 static const MessageKind OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind(
628 'Hint: The class "#{class}" overrides "operator==", ' 628 'Hint: The class "#{class}" overrides "operator==", '
629 'but not "get hashCode".'); 629 'but not "get hashCode".');
630 630
631 static const MessageKind PACKAGE_ROOT_NOT_SET = const MessageKind( 631 static const MessageKind PACKAGE_ROOT_NOT_SET = const MessageKind(
632 'Error: Cannot resolve "#{uri}". Package root has not been set.'); 632 'Error: Cannot resolve "#{uri}". Package root has not been set.');
633 633
634 static const MessageKind INTERNAL_LIBRARY_FROM = const MessageKind(
ahe 2013/08/20 10:18:16 Could you add an example for this as well?
635 'Error: Internal library "#{resolvedUri}" is not accessible from '
636 '"#{importingUri}".');
637
638 static const MessageKind INTERNAL_LIBRARY = const MessageKind(
639 'Error: Internal library "#{resolvedUri}" is not accessible.');
ahe 2013/08/20 10:18:16 Ditto.
640
641 static const MessageKind LIBRARY_NOT_FOUND = const MessageKind(
642 'Error: Library not found "#{resolvedUri}".');
ahe 2013/08/20 10:18:16 Ditto.
643
634 static const MessageKind UNSUPPORTED_EQ_EQ_EQ = const MessageKind( 644 static const MessageKind UNSUPPORTED_EQ_EQ_EQ = const MessageKind(
635 'Error: "===" is not an operator. ' 645 'Error: "===" is not an operator. '
636 'Did you mean "#{lhs} == #{rhs}" or "identical(#{lhs}, #{rhs})"?'); 646 'Did you mean "#{lhs} == #{rhs}" or "identical(#{lhs}, #{rhs})"?');
637 647
638 static const MessageKind UNSUPPORTED_BANG_EQ_EQ = const MessageKind( 648 static const MessageKind UNSUPPORTED_BANG_EQ_EQ = const MessageKind(
639 'Error: "!==" is not an operator. ' 649 'Error: "!==" is not an operator. '
640 'Did you mean "#{lhs} != #{rhs}" or "!identical(#{lhs}, #{rhs})"?'); 650 'Did you mean "#{lhs} != #{rhs}" or "!identical(#{lhs}, #{rhs})"?');
641 651
642 static const MessageKind UNSUPPORTED_THROW_WITHOUT_EXP = const MessageKind( 652 static const MessageKind UNSUPPORTED_THROW_WITHOUT_EXP = const MessageKind(
643 'Error: No expression after "throw". ' 653 'Error: No expression after "throw". '
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 howToFix: "Is '#{name}' spelled right?", 745 howToFix: "Is '#{name}' spelled right?",
736 examples: const [ 746 examples: const [
737 """ 747 """
738 // 'addAll' is misspelled. 748 // 'addAll' is misspelled.
739 @MirrorsUsed(targets: 'dart.core.List.addAl') 749 @MirrorsUsed(targets: 'dart.core.List.addAl')
740 import 'dart:mirrors'; 750 import 'dart:mirrors';
741 751
742 main() {} 752 main() {}
743 """]); 753 """]);
744 754
755 static const MessageKind READ_SCRIPT_ERROR = const MessageKind(
756 "Error: Can't read '#{uri}' (#{exception}).",
ahe 2013/08/20 10:18:16 howToFix?
757 examples: const [
758 """
759 // 'foo.dart' does not exist.
760 import 'foo.dart';
761
762 main() {}
763 """]);
764
745 static const MessageKind COMPILER_CRASHED = const MessageKind( 765 static const MessageKind COMPILER_CRASHED = const MessageKind(
746 'Error: The compiler crashed when compiling this element.'); 766 'Error: The compiler crashed when compiling this element.');
747 767
748 static const MessageKind PLEASE_REPORT_THE_CRASH = const MessageKind(''' 768 static const MessageKind PLEASE_REPORT_THE_CRASH = const MessageKind('''
749 The compiler is broken. 769 The compiler is broken.
750 770
751 When compiling the above element, the compiler crashed. It is not 771 When compiling the above element, the compiler crashed. It is not
752 possible to tell if this is caused by a problem in your program or 772 possible to tell if this is caused by a problem in your program or
753 not. Regardless, the compiler should not crash. 773 not. Regardless, the compiler should not crash.
754 774
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 967
948 class CompileTimeConstantError extends Diagnostic { 968 class CompileTimeConstantError extends Diagnostic {
949 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) 969 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse)
950 : super(kind, arguments, terse); 970 : super(kind, arguments, terse);
951 } 971 }
952 972
953 class CompilationError extends Diagnostic { 973 class CompilationError extends Diagnostic {
954 CompilationError(MessageKind kind, Map arguments, bool terse) 974 CompilationError(MessageKind kind, Map arguments, bool terse)
955 : super(kind, arguments, terse); 975 : super(kind, arguments, terse);
956 } 976 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/source_file_provider.dart ('k') | tests/compiler/dart2js/import_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698