Doing the following import in dart import 'package:http/browser_client.dart';
causes a warning when doing a pub build
****************************************************************
* 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:
* index.html_bootstrap.dart => package:myapp => package:http => dart:mirrors
*
* 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
****************************************************************
[Warning from Dart2JS on myapp|web/index.html_bootstrap.dart]:
3 hint(s) suppressed in package:http.
[Dart2JS on myapp|web/index.html_bootstrap.dart]:
5 warning(s) suppressed in package:myapp.
[Warning from Dart2JS]:
web/index.html_bootstrap.dart:
1 methods retained for use by dart:mirrors out of 2361 total methods (0%).
[Info from Dart2JS on myapp|web/index.html_bootstrap.dart]:
packages/http/src/io.dart:9:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
The code using that browser_client is:
var client = new BrowserClient();
client.post(url, body: req.toString())...
Is this something I should be concerned about, or is this one of those pesky warnings that won't go away unless I stop using the http package?
Update:
Looking inside browser_client.dart, I see the following comment:
// TODO(nweiz): Move this under src/, re-export from lib/http.dart, and use this
// automatically from [new Client] once we can create an HttpRequest using
// mirrors on dart2js (issue 18541) and dart2js doesn't crash on pkg/collection
// (issue 18535).
Update:
Running pub help, I see no such flag:
pub help
Pub is a package manager for Dart.
Usage: pub <command> [arguments]
Global options:
-h, --help Print this usage information.
--version Print pub version.
--[no-]trace Print debugging information when an error occurs.
--verbosity Control output verbosity.
[all] Show all output including internal tracing messages.
[io] Also show IO operations.
[normal] Show errors, warnings, and user messages.
[solver] Show steps during version resolution.
-v, --verbose Shortcut for "--verbosity=all".
Available commands:
build Apply transformers to build a package.
cache Work with the system cache.
deps Print package dependencies.
downgrade Downgrade the current package's dependencies to oldest versions.
get Get the current package's dependencies.
global Work with global packages.
help Display help information for Pub.
publish Publish the current package to pub.dartlang.org.
run Run an executable from a package.
serve Run a local web development server.
upgrade Upgrade the current package's dependencies to latest versions.
uploader Manage uploaders for a package on pub.dartlang.org.
version Print pub version.
Calling it directly, pub tells me there is no such flag:
pub build --enable-experimental-mirrors
Could not find an option named "enable-experimental-mirrors".