Old (see comments below):
Was: Transformers: Don't set reflector.reflectionCapabilities over an async gap
In generator.dart we first set reflector.reflectionCapabilities, then wait for the compiler to compile and then reset the state. Although the caller of this particular method sequences calls, the call sites of generator.dart don't do this.
This yields to adding setters/getters to the wrong ng_deps.dart files.
Solution:
- change
DomRenderCompiler to have a new method compileSync, which takes a ViewDefinition and a template string. The normal compile method can delegate to this one internally.
- change
generator.dart to first load the template, then set a temporal reflector.reflectionCapabilities, call compiler.compileSync and reset the temporal reflector.reflectionCapabilities.