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

Unified Diff: sdk/lib/_internal/compiler/implementation/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: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 8b1c8a58f46dd59bd9b3ed2dedc791a413efcd03..d1adf9568a50cd0f930df1545278e010e8b8e746 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -2060,6 +2060,30 @@ Please include the following information:
// 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.8, 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/articles/reflection-and-code-gen
+****************************************************************
+''');
+
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