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
?