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

Unified Diff: pkg/compiler/lib/src/warnings.dart

Issue 588183002: Emit warning on import of dart:mirrors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/warnings.dart
diff --git a/pkg/compiler/lib/src/warnings.dart b/pkg/compiler/lib/src/warnings.dart
index 5d872d0106329df0c54e6cad4f495e7a2b76494a..b45b9f566e71f95ff5403efab80e42fd7466a95c 100644
--- a/pkg/compiler/lib/src/warnings.dart
+++ b/pkg/compiler/lib/src/warnings.dart
@@ -2226,6 +2226,30 @@ main() sync* {
// Patch errors end.
//////////////////////////////////////////////////////////////////////////////
+ static const String IMPORT_EXPERIMENTAL_MIRRORS_PADDING = '\n* ';
+
+ static const MessageKind IMPORT_EXPERIMENTAL_MIRRORS =
+ const MessageKind(r'''
+
+****************************************************************
+* WARNING: dart:mirrors support in dart2js is experimental,
+* and not recommended.
+* This implementation of mirrors is incomplete,
+* and often greatly increases the size of the generated
+* JavaScript code.
+*
+* Your app imports dart:mirrors via:''''''
+$IMPORT_EXPERIMENTAL_MIRRORS_PADDING#{importChain}
+*
+* Starting with Dart 1.9, you must use the
+* --enable-experimental-mirrors command-line flag to opt-in.
+* You can begin using this flag now if mirrors support is critical.
+*
+* To learn what to do next, please visit:
+* http://dartlang.org/dart2js-reflection
+****************************************************************
+''');
+
static const MessageKind CALL_NOT_SUPPORTED_ON_NATIVE_CLASS =
const MessageKind(
"Non-supported 'call' member on a native class, or a "

Powered by Google App Engine
This is Rietveld 408576698