Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

DI: In debug mode, trace a provider failure #434

@matanlurey

Description

@matanlurey

This used to happen in pre-Angular Dart 2.0, but was never added for code generation.

EDIT as of 2018-08-14 - We still need to cover the view-compiler cases to close this:

  • Child directives with dynamic dependencies:

    _CompChild2_0_5 = CompChild2(parentView.injectorGet(import1.A, viewData.parentIndex));

    ... should become ...

    // class _ViewFooComponent
    debugInjectorGet(CompChild2);
    _CompChild2_0_5 = CompChild2(parentView.injectorGet(import1.A, viewData.parentIndex));
    debugInjectorLeave(CompChild2);
  • Child directives in embedded templates (or anything that triggers parentView.injectorGet):

    (i.e. figure out what code-paths invoke injectFromViewParentInjector)

  • Queries for services that live on child directives that have dynamic dependencies

  • Provided services with dynamic dependencies:

    _InjectsMissingService_0_5 = InjectsMissingService(injectorGet(MissingService, viewData.parentIndex));

    ... should become ...

    debugInjectorGet(InjectsMissingService);
    _InjectsMissingService_0_5 = InjectsMissingService(injectorGet(MissingService, viewData.parentIndex));
    debugInjectorLeave(InjectsMissingService);
  • Provided services via a FactoryProvider

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions