-
Notifications
You must be signed in to change notification settings - Fork 381
Remove dart:mirror usage from package:http #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is blocked on having a viable alternative (issue 6943). I believe the end result of the discussion about this warning was that it also shouldn't be introduced until a viable alternative to mirrors exists. |
I'm told this warning is spurious and dart2js should be fixed to only print it when code size is actually affected. |
Here's the bug for fixing dart2js: |
Just wondering, how can we get package http to not use mirrors, such that it can be used "out of the box" by Flutter? See also this discussion flutter/flutter#5831 (comment) Given that cross-platform package support is not there, what is the best viable way to solve this in the short term? |
Having talked to @floitschG it seems we might be able to rewrite things in a way that uses config-specific imports instead of mirrors. Config-specific imports are tracked here dart-lang/sdk#24581. |
Nice! |
I'm definitely planning on rewriting this with config-specific imports—I On Sep 13, 2016 4:47 PM, "Matan Lurey" [email protected] wrote:
|
Flutter would be extremely excited to finally use the package directly. If you are willing to publish the local branch separately, we can even test it out for you by specifying the package as a Git dependency. Thanks. |
Thanks @nex3 ! We'd love to DEP in your branch so we can use http again. |
Flutter has checked in a forked copy of http/http.dart for the time being: We'll happily remove it as soon as this is resolved. Thanks! |
I've pushed my local changes in the cross-platform branch. Heads up: it's not especially thoroughly tested. |
Thanks! On Tue, Sep 27, 2016 at 5:32 PM, Natalie Weizenbaum <
|
Curious for an update? Folks are attempting to use package:http-dependent packages in Flutter and are I believe blocked by this bug. Theoretically users could use dependency_override to override package:http to point to packages/flutter/lib/src/http, but I've not actually seen that work yet. |
An internal dev got dependency overrides working, but we needed to create a fake http package which imports Flutter's http package and reexports everything. Then, we put that fake http package onto git, so it could be pulled down during pub's download/resolution step. |
This is still blocked on getting interface libraries implemented everywhere and out from behind the flag. |
@nex3 could you remind me which issues(s) those are? Presumably some subset of the ones mentioned in earlier comments? |
dart-lang/sdk#24581 is the tracking issue for config-specific imports. |
@nex3 removing blocked field, as per dart-lang/sdk#24581 (comment) all main pieces have landed and verified in a new test case. Can we try out this package change now? |
@mit-mit There's not much we can do until the feature is available in a stable release. |
Oh, good point. That is scheduled for late January! |
A change to the dart2js compiler introduced a warning on mirror usage in dart code -- see Emit warning on import of dart:mirrors.. According to the warning, users will be forced to pass an additional flag to the dart2js compiler when their code is using dart:mirrors. This affects all users of
package:http
.When compiling the following example
dart2js will print out the following warning:
That flag does not seem to be enforced as of SDK version 1.9.0-dev.1.0+google3-trunk, but that seems to be only a matter of time.
The text was updated successfully, but these errors were encountered: