Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Missing a MirrorsUsed annotation #3

Closed
sethladd opened this issue Feb 5, 2014 · 2 comments
Closed

Missing a MirrorsUsed annotation #3

sethladd opened this issue Feb 5, 2014 · 2 comments

Comments

@sethladd
Copy link

sethladd commented Feb 5, 2014

Hi,

To help get the size down for the compiled JS, please add a @MirrorsUsed annotation where you import dart:mirrors.

Since your library uses annotations, I think something like this should work:

@MirrorsUsed(metaTargets: const [DartsonEntity]);
import 'dart:mirrors';
@sethladd
Copy link
Author

sethladd commented Feb 5, 2014

Let me know if that works. Thanks!

@eredo
Copy link
Owner

eredo commented Feb 5, 2014

Hi,

I added the MirrorsUsed annotation and it works. The size of compiled (minified) test_dartson.dart to 230kb (240kb before). DartsonEntity is currently not used, I marked it as deprecated. DartsonProperty is still required though.

Thanks for the tip!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants