Skip to content

PropertySetterFactory: don't cache property setters globally as this leads to problems in the transformer #2359

@tbosch

Description

@tbosch

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:

  1. 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.
  2. change generator.dart to first load the template, then set a temporal reflector.reflectionCapabilities, call compiler.compileSync and reset the temporal reflector.reflectionCapabilities.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions