Skip to content
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

Restructure http/browser_client.dart in http package to avoid dart:mirrors usage (?) #25

Closed
DartBot opened this issue Jun 5, 2015 · 7 comments
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

Blocked by dart-lang/sdk#24581

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1047298?v=3" align="left" width="48" height="48"hspace="10"> Comment by Scorpiion


To be clear, a simple Hello World app importing package:http/browser_client.dart gives this:

* Your app imports dart:mirrors via:

  • main.dart => package:http => dart:mirrors

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/4865287?v=3" align="left" width="48" height="48"hspace="10"> Comment by lrhn


Removed Type-Defect label.
Added Type-Enhancement, Pkg-Http, Area-Pkg, Triaged labels.

@DartBot DartBot added the type-enhancement A request for a change that isn't a bug label Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


The warning sucks, but in practice the usage of mirrors in the http package is harmless. It's only used to determine that dart:io is unavailable, and adds essentially no size overhead to the compiled output.

I'd love to remove mirrors from the package, but right now the language just doesn't support it while maintaining the same API.


Marked this as being blocked by dart-lang/sdk#6943.

@polux
Copy link

polux commented Nov 16, 2015

The usage of mirrors makes it impossible to use this lib with flutter (which disables mirrors).

@sethladd
Copy link
Contributor

@nex3
Copy link
Member

nex3 commented Nov 16, 2015

Disabling mirrors makes sense, but making programs statically invalid just by importing dart:mirrors seems like overkill. Why not just have createMirrorSystem() throw an error? Then you could use HTTP and any other libraries that use similar workarounds.

@nex3
Copy link
Member

nex3 commented Sep 1, 2016

I'm merging this as a duplicate of #1.

@nex3 nex3 closed this as completed Sep 1, 2016
@nex3 nex3 added closed-duplicate Closed in favor of an existing report and removed status-blocked Blocked from making progress by another (referenced) issue type-enhancement A request for a change that isn't a bug labels Sep 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

5 participants