Skip to content

Change Dart transformer to collect meta information about DI and Queries #6298

Closed

Description

@tbosch

Part of #6270

Needs to collect:

  • the tokens specified in constructors in the form of name + full module path where it is declared.
  • the flattened list of Provider in Directive.providers and Component.viewProviders with:
    • token: name + full module path of the token
    • useClass: name + full module path of the class
    • useValue: expression
    • useExisting: name + full module path of the token
    • useFactory: name + full module path of the function
    • dependencies: flat list of tokens (name + full module path)
  • the @ContentChild/ContentChildren/ViewChild/ViewChildren annotations on fields (we should drop query injection in constructors):
    • selectorType: name + full module path
    • selectorVar: string
    • descendants: boolean
    • first: boolean

3 different approaches:

  1. extend current transformer
  2. use analyzer to resolve types
    • slower
    • about to get faster in Q1/2016 (@keqluneq to add the tracking issue).
  3. run dartvm and use mirrors to read out the annotations
    • how fast is this, especially if we have a large dependency graph? Is the dartvm loading all dependencies eagerly?
    • need to mock out dart:html package (import dart:html through a package, and change the .package file for the VM-script that loads the program)

Activity

  1. tbosch commented on Jan 13, 2016

    @tbosch
    ContributorAuthor

    See https://github.com/kegluneq/angular/tree/tbosch_explore for an exploration of changing the current transformer

  2. tbosch commented on Jan 25, 2016

    @tbosch
    ContributorAuthor
  3. tbosch commented on May 31, 2016

    @tbosch
    ContributorAuthor

    Done

  4. angular-automatic-lock-bot commented on Sep 8, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  5. locked and limited conversation to collaborators on Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions