Skip to content

dart2js: MirrorsUsed: need a way to select type + subtypes, or metatargets #13283

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

Closed
jmesserly opened this issue Sep 12, 2013 · 8 comments
Closed
Assignees
Labels
library-mirrors P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug web-dart2js
Milestone

Comments

@jmesserly
Copy link

"targets:" in MirrorsUsed seems to select only the exact type, ideally it would accept subtypes. For example:

    // in package:observe
    @­MirrorsUsed(targets: 'observe.Observable', override: 'observe')

    // We might reflect on this:
    class MyFoo implements Observable {
      @­observable int foo; // this is reflected on
    }

Alternatively if we had "metatargets:" I think that would work too.

One other twist, if I had:

    class FooElement extends HtmlElement implements Observable {
      @­observable int foo; // this is reflected on
    }

ideally, "foo" would be reflectable, but everything in HtmlElement would not be (since that would probably mess up tree shaking big time).

I think y'all know about this enhancement request already, just filing this so I can mark the Polymer code-size bug as blocked on it.

@jmesserly
Copy link
Author

Marked this as blocking #12396.

@kasperl
Copy link

kasperl commented Sep 18, 2013

Added this to the M7 milestone.

@kasperl
Copy link

kasperl commented Sep 25, 2013

Changed the title to: "dart2js: MirrorsUsed: need a way to select type + subtypes, or metatargets".

@kasperl
Copy link

kasperl commented Sep 25, 2013

Set owner to @peter-ahe-google.

@kasperl
Copy link

kasperl commented Oct 2, 2013

Removed this from the M7 milestone.
Added this to the M8 milestone.

@sethladd
Copy link
Contributor

sethladd commented Oct 2, 2013

cc @kasperl.

@kasperl
Copy link

kasperl commented Oct 4, 2013

Preliminary support for metatargets is in this CL: https://codereview.chromium.org/26007002/.

@kasperl
Copy link

kasperl commented Oct 7, 2013

Metatarget support added in r28301.

Filed a few follow up issues for the subtype targets and for dealing with referring to the type associated with a metatarget class in an annotation; see issue #13861 and issue #13862.


Added Fixed label.

@jmesserly jmesserly added Type-Enhancement P1 A high priority bug; for example, a single project is unusable or has many test failures web-dart2js library-mirrors labels Oct 7, 2013
@jmesserly jmesserly added this to the M8 milestone Oct 7, 2013
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed type-enhancement labels Mar 1, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library-mirrors P1 A high priority bug; for example, a single project is unusable or has many test failures type-enhancement A request for a change that isn't a bug web-dart2js
Projects
None yet
Development

No branches or pull requests

5 participants