2

I have a bunch of @MirrorsUsed(targets: '...') annotations, however the problem with them is that because all part statements go below them, dart2js complains. For example, here's how it goes in the file:

library foo;
@MirrorsUsed(targets: "foo.BarClass")
import "dart:mirrors";
part "bar_class.dart";

And, when compiled, dart2js shows the following warning:

Hint: Can't find 'BarClass' in the library 'foo'.
Is 'BarClass' spelled right?

The compiled file works, but the resulting file size is significantly larger than it should be precisely because dart2js cannot make use of the mirror annotation.

Is there a way to make this work with part?

orion3
  • 9,797
  • 14
  • 67
  • 93
  • Cross-link https://github.com/dart-lang/sdk/issues/28406 – Günter Zöchbauer Jan 16 '17 at 06:53
  • The github issue linked above seems to suggest this was misdiagnosed. Could you provide context (answer own question)? Even if you misdiagnosed, it would still be useful to hint on what was actually the problem. Maybe the error message should be imporved. – filiph Jan 24 '17 at 21:22

0 Answers0