Skip to content

Commit

Permalink
refactor(core): large restructuring of DI code
Browse files Browse the repository at this point in the history
Despite the scary size, this commit largely just moves DI code around to
make it a bit more organized and accessible. It does make a few behavioral
changes that should be no-ops:

One, it standardizes on one concept of "current injector". This eliminates
the "inject implementation" global variable and the `directiveInject()`
instruction in favor of a `DIRECTIVE_INJECTOR` implementation of `Injector`.
The runtime code path is the same.

Two, it eliminates the legacy "limp mode" of using DI without a current
injector (which only ever supported `providedIn: 'root'` tokens). This mode
is unused in modern Angular and existed to support experiments around the
smallest possible Hello World application. Modern Angular can assume DI is
used.

Three, it renames `R3Injector` to `InjectorImpl`, and restructures its
inheritance hierarchy since there's no longer the complication of
`StaticInjector`.
  • Loading branch information
alxhub committed Dec 4, 2024
1 parent 10b3dcc commit c0c4914
Show file tree
Hide file tree
Showing 159 changed files with 1,960 additions and 2,389 deletions.
15 changes: 2 additions & 13 deletions goldens/public-api/core/index.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -668,18 +668,9 @@ export function enableProdMode(): void;
export const ENVIRONMENT_INITIALIZER: InjectionToken<readonly (() => void)[]>;

// @public
export abstract class EnvironmentInjector implements Injector {
export abstract class EnvironmentInjector extends Injector {
// (undocumented)
abstract destroy(): void;
abstract get<T>(token: ProviderToken<T>, notFoundValue: undefined, options: InjectOptions & {
optional?: false;
}): T;
abstract get<T>(token: ProviderToken<T>, notFoundValue: null | undefined, options: InjectOptions): T | null;
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions): T;
// @deprecated
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
// @deprecated (undocumented)
abstract get(token: any, notFoundValue?: any): any;
// @deprecated
abstract runInContext<ReturnT>(fn: () => ReturnT): ReturnT;
}
Expand Down Expand Up @@ -954,9 +945,7 @@ export abstract class Injector {
// (undocumented)
static NULL: Injector;
// (undocumented)
static THROW_IF_NOT_FOUND: {};
// (undocumented)
static ɵprov: unknown;
static THROW_IF_NOT_FOUND: unknown;
}

// @public
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MyOtherPipe.ɵfac = function MyOtherPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyOtherPipe)($i0$.ɵɵdirectiveInject($i0$.ChangeDetectorRef, 24)); };
MyOtherPipe.ɵfac = function MyOtherPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyOtherPipe)($i0$.ɵɵinject($i0$.ChangeDetectorRef, 24)); };
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MyPipe.ɵfac = function MyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyPipe)($i0$.ɵɵdirectiveInject($i0$.ChangeDetectorRef, 16)); };
MyPipe.ɵfac = function MyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyPipe)($i0$.ɵɵinject($i0$.ChangeDetectorRef, 16)); };
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ForOfDirective.ɵfac = function ForOfDirective_Factory(__ngFactoryType__) {
return new (__ngFactoryType__ || ForOfDirective)($r3$.ɵɵdirectiveInject($r3$.ViewContainerRef), $r3$.ɵɵdirectiveInject($r3$.TemplateRef));
return new (__ngFactoryType__ || ForOfDirective)($r3$.ɵɵinject($r3$.ViewContainerRef), $r3$.ɵɵinject($r3$.TemplateRef));
};
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IfDirective.ɵfac = function IfDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IfDirective)($r3$.ɵɵdirectiveInject($i$.TemplateRef)); };
IfDirective.ɵfac = function IfDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || IfDirective)($r3$.ɵɵinject($i$.TemplateRef)); };
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MyComponent.ɵfac = function MyComponent_Factory(__ngFactoryType__) {
return new (__ngFactoryType__ || MyComponent)(
$r3$.ɵɵdirectiveInject($i$.ElementRef), $r3$.ɵɵdirectiveInject($i$.ViewContainerRef),
$r3$.ɵɵdirectiveInject($i$.ChangeDetectorRef));
$r3$.ɵɵinject($i$.ElementRef), $r3$.ɵɵinject($i$.ViewContainerRef),
$r3$.ɵɵinject($i$.ChangeDetectorRef));
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ MyComponent.ɵfac = function MyComponent_Factory(__ngFactoryType__) {
return new (__ngFactoryType__ || MyComponent)(
$r3$.ɵɵinjectAttribute('name'),
$r3$.ɵɵinjectAttribute(dynamicAttrName()),
$r3$.ɵɵdirectiveInject(MyService),
$r3$.ɵɵdirectiveInject(MyService, 1),
$r3$.ɵɵdirectiveInject(MyService, 2),
$r3$.ɵɵdirectiveInject(MyService, 4),
$r3$.ɵɵdirectiveInject(MyService, 8),
$r3$.ɵɵdirectiveInject(MyService, 10)
$r3$.ɵɵinject(MyService),
$r3$.ɵɵinject(MyService, 1),
$r3$.ɵɵinject(MyService, 2),
$r3$.ɵɵinject(MyService, 4),
$r3$.ɵɵinject(MyService, 8),
$r3$.ɵɵinject(MyService, 10)
);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// NOTE The prov definition must be last so MyOtherPipe.fac is defined
MyOtherPipe.ɵfac = function MyOtherPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyOtherPipe)($r3$.ɵɵdirectiveInject(Service, 16)); };
MyOtherPipe.ɵfac = function MyOtherPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyOtherPipe)($r3$.ɵɵinject(Service, 16)); };
MyOtherPipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "myOtherPipe", type: MyOtherPipe, pure: true, standalone: false });
MyOtherPipe.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MyOtherPipe, factory: MyOtherPipe.ɵfac });
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// NOTE The prov definition must be last so MyPipe.fac is defined
MyPipe.ɵfac = function MyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyPipe)(i0.ɵɵdirectiveInject(Service, 16)); };
MyPipe.ɵfac = function MyPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MyPipe)(i0.ɵɵinject(Service, 16)); };
MyPipe.ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "myPipe", type: MyPipe, pure: true, standalone: false });
MyPipe.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MyPipe, factory: MyPipe.ɵfac });
12 changes: 6 additions & 6 deletions packages/compiler-cli/test/ngtsc/local_compilation_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ runInEachFileSystem(() => {
const jsContents = env.getContents('test.js');

expect(jsContents).toContain(
`MainComponent.ɵfac = function MainComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainComponent)(i0.ɵɵdirectiveInject(i1.SomeService1), i0.ɵɵdirectiveInject(SomeService2), i0.ɵɵdirectiveInject(i2.SomeService3), i0.ɵɵdirectiveInject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵdirectiveInject(MESSAGE_TOKEN)); };`,
`MainComponent.ɵfac = function MainComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainComponent)(i0.ɵɵinject(i1.SomeService1), i0.ɵɵinject(SomeService2), i0.ɵɵinject(i2.SomeService3), i0.ɵɵinject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵinject(MESSAGE_TOKEN)); };`,
);
});

Expand Down Expand Up @@ -1093,7 +1093,7 @@ runInEachFileSystem(() => {
const jsContents = env.getContents('test.js');

expect(jsContents).toContain(
`MainComponent.ɵfac = function MainComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainComponent)(i0.ɵɵdirectiveInject(i1.SomeService1), i0.ɵɵdirectiveInject(SomeService2), i0.ɵɵdirectiveInject(i2.SomeService3), i0.ɵɵdirectiveInject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵdirectiveInject(MESSAGE_TOKEN)); };`,
`MainComponent.ɵfac = function MainComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainComponent)(i0.ɵɵinject(i1.SomeService1), i0.ɵɵinject(SomeService2), i0.ɵɵinject(i2.SomeService3), i0.ɵɵinject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵinject(MESSAGE_TOKEN)); };`,
);
});

Expand Down Expand Up @@ -1133,7 +1133,7 @@ runInEachFileSystem(() => {
const jsContents = env.getContents('test.js');

expect(jsContents).toContain(
`MainDirective.ɵfac = function MainDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainDirective)(i0.ɵɵdirectiveInject(i1.SomeService1), i0.ɵɵdirectiveInject(SomeService2), i0.ɵɵdirectiveInject(i2.SomeService3), i0.ɵɵdirectiveInject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵdirectiveInject(MESSAGE_TOKEN)); };`,
`MainDirective.ɵfac = function MainDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainDirective)(i0.ɵɵinject(i1.SomeService1), i0.ɵɵinject(SomeService2), i0.ɵɵinject(i2.SomeService3), i0.ɵɵinject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵinject(MESSAGE_TOKEN)); };`,
);
});

Expand Down Expand Up @@ -1168,7 +1168,7 @@ runInEachFileSystem(() => {
const jsContents = env.getContents('test.js');

expect(jsContents).toContain(
`MainDirective.ɵfac = function MainDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainDirective)(i0.ɵɵdirectiveInject(i1.SomeService1), i0.ɵɵdirectiveInject(SomeService2), i0.ɵɵdirectiveInject(i2.SomeService3), i0.ɵɵdirectiveInject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵdirectiveInject(MESSAGE_TOKEN)); };`,
`MainDirective.ɵfac = function MainDirective_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainDirective)(i0.ɵɵinject(i1.SomeService1), i0.ɵɵinject(SomeService2), i0.ɵɵinject(i2.SomeService3), i0.ɵɵinject(i3.nested.SomeService4), i0.ɵɵinjectAttribute('title'), i0.ɵɵinject(MESSAGE_TOKEN)); };`,
);
});

Expand Down Expand Up @@ -1207,7 +1207,7 @@ runInEachFileSystem(() => {
const jsContents = env.getContents('test.js');

expect(jsContents).toContain(
`MainPipe.ɵfac = function MainPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainPipe)(i0.ɵɵdirectiveInject(i1.SomeService1, 16), i0.ɵɵdirectiveInject(SomeService2, 16), i0.ɵɵdirectiveInject(i2.SomeService3, 16), i0.ɵɵdirectiveInject(i3.nested.SomeService4, 16), i0.ɵɵinjectAttribute('title'), i0.ɵɵdirectiveInject(MESSAGE_TOKEN, 16)); };`,
`MainPipe.ɵfac = function MainPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainPipe)(i0.ɵɵinject(i1.SomeService1, 16), i0.ɵɵinject(SomeService2, 16), i0.ɵɵinject(i2.SomeService3, 16), i0.ɵɵinject(i3.nested.SomeService4, 16), i0.ɵɵinjectAttribute('title'), i0.ɵɵinject(MESSAGE_TOKEN, 16)); };`,
);
});

Expand Down Expand Up @@ -1243,7 +1243,7 @@ runInEachFileSystem(() => {
const jsContents = env.getContents('test.js');

expect(jsContents).toContain(
`MainPipe.ɵfac = function MainPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainPipe)(i0.ɵɵdirectiveInject(i1.SomeService1, 16), i0.ɵɵdirectiveInject(SomeService2, 16), i0.ɵɵdirectiveInject(i2.SomeService3, 16), i0.ɵɵdirectiveInject(i3.nested.SomeService4, 16), i0.ɵɵinjectAttribute('title'), i0.ɵɵdirectiveInject(MESSAGE_TOKEN, 16)); };`,
`MainPipe.ɵfac = function MainPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MainPipe)(i0.ɵɵinject(i1.SomeService1, 16), i0.ɵɵinject(SomeService2, 16), i0.ɵɵinject(i2.SomeService3, 16), i0.ɵɵinject(i3.nested.SomeService4, 16), i0.ɵɵinjectAttribute('title'), i0.ɵɵinject(MESSAGE_TOKEN, 16)); };`,
);
});

Expand Down
8 changes: 4 additions & 4 deletions packages/compiler-cli/test/ngtsc/ngtsc_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2214,7 +2214,7 @@ runInEachFileSystem((os: string) => {

const jsContents = env.getContents('test.js');
expect(jsContents).toContain(
'return new (__ngFactoryType__ || TestPipe)(i0.ɵɵdirectiveInject(Dep, 16));',
'return new (__ngFactoryType__ || TestPipe)(i0.ɵɵinject(Dep, 16));',
);
});

Expand Down Expand Up @@ -4723,7 +4723,7 @@ runInEachFileSystem((os: string) => {
env.driveMain();
const jsContents = env.getContents('test.js');
expect(jsContents).toContain(
`FooCmp.ɵfac = function FooCmp_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FooCmp)(i0.ɵɵinjectAttribute("test"), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Injector), i0.ɵɵdirectiveInject(i0.Renderer2), i0.ɵɵdirectiveInject(i0.TemplateRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef)); }`,
`FooCmp.ɵfac = function FooCmp_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || FooCmp)(i0.ɵɵinjectAttribute("test"), i0.ɵɵinject(i0.ChangeDetectorRef), i0.ɵɵinject(i0.ElementRef), i0.ɵɵinject(i0.Injector), i0.ɵɵinject(i0.Renderer2), i0.ɵɵinject(i0.TemplateRef), i0.ɵɵinject(i0.ViewContainerRef)); }`,
);
});

Expand Down Expand Up @@ -6137,8 +6137,8 @@ runInEachFileSystem((os: string) => {
const jsContents = trim(env.getContents('test.js'));
expect(jsContents).toContain(`import Default from './types';`);
expect(jsContents).toContain(`import * as i1 from "./types";`);
expect(jsContents).toContain('i0.ɵɵdirectiveInject(Default)');
expect(jsContents).toContain('i0.ɵɵdirectiveInject(i1.Other)');
expect(jsContents).toContain('i0.ɵɵinject(Default)');
expect(jsContents).toContain('i0.ɵɵinject(i1.Other)');
expect(jsContents).toMatch(setClassMetadataRegExp('type: Default'));
expect(jsContents).toMatch(setClassMetadataRegExp('type: i1.Other'));
});
Expand Down
16 changes: 1 addition & 15 deletions packages/compiler/src/render3/r3_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ function compileInjectDependency(
if (flagsParam) {
injectArgs.push(flagsParam);
}
const injectFn = getInjectFn(target);
return o.importExpr(injectFn).callFn(injectArgs);
return o.importExpr(R3.inject).callFn(injectArgs);
} else {
// The `dep.attributeTypeName` value is defined, which indicates that this is an `@Attribute()`
// type dependency. For the generated JS we still want to use the `dep.token` value in case the
Expand Down Expand Up @@ -316,16 +315,3 @@ export function isExpressionFactoryMetadata(
): meta is R3ExpressionFactoryMetadata {
return (meta as any).expression !== undefined;
}

function getInjectFn(target: FactoryTarget): o.ExternalReference {
switch (target) {
case FactoryTarget.Component:
case FactoryTarget.Directive:
case FactoryTarget.Pipe:
return R3.directiveInject;
case FactoryTarget.NgModule:
case FactoryTarget.Injectable:
default:
return R3.inject;
}
}
1 change: 0 additions & 1 deletion packages/compiler/src/render3/r3_identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,6 @@ export class Identifiers {

static injectAttribute: o.ExternalReference = {name: 'ɵɵinjectAttribute', moduleName: CORE};

static directiveInject: o.ExternalReference = {name: 'ɵɵdirectiveInject', moduleName: CORE};
static invalidFactory: o.ExternalReference = {name: 'ɵɵinvalidFactory', moduleName: CORE};
static invalidFactoryDep: o.ExternalReference = {name: 'ɵɵinvalidFactoryDep', moduleName: CORE};

Expand Down
1 change: 0 additions & 1 deletion packages/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ ng_module(
"//packages/core/primitives/event-dispatch",
"//packages/core/primitives/signals",
"//packages/core/src/compiler",
"//packages/core/src/di/interface",
"//packages/core/src/interface",
"//packages/core/src/reflection",
"//packages/core/src/util",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/application/application_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {EnvironmentProviders, Provider} from '../di';
import {EnvironmentProviders, Provider} from '../di/provider';

/**
* Set of config options available during the application bootstrap operation.
Expand Down
16 changes: 7 additions & 9 deletions packages/core/src/application/application_init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@

import {Observable} from 'rxjs';

import {
EnvironmentProviders,
inject,
Injectable,
InjectionToken,
Injector,
makeEnvironmentProviders,
runInInjectionContext,
} from '../di';
import {runInInjectionContext} from '../di/contextual';
import {inject} from '../di/inject';
import {Injectable} from '../di/injectable';
import {InjectionToken} from '../di/injection_token';
import {Injector} from '../di/injector';
import {makeEnvironmentProviders} from '../di/provider_collection';
import {EnvironmentProviders} from '../di/provider';
import {RuntimeError, RuntimeErrorCode} from '../errors';
import {isPromise, isSubscribable} from '../util/lang';

Expand Down
9 changes: 4 additions & 5 deletions packages/core/src/application/application_ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ import {map} from 'rxjs/operators';

import {ZONELESS_ENABLED} from '../change_detection/scheduling/zoneless_scheduling';
import {Console} from '../console';
import {inject} from '../di';
import {inject} from '../di/inject';
import {Injectable} from '../di/injectable';
import {InjectionToken} from '../di/injection_token';
import {Injector} from '../di/injector';
import {EnvironmentInjector, type R3Injector} from '../di/r3_injector';
import {Injector, EnvironmentInjector, InjectorImpl} from '../di/injector';
import {ErrorHandler, INTERNAL_APPLICATION_ERROR_HANDLER} from '../error_handler';
import {formatRuntimeError, RuntimeError, RuntimeErrorCode} from '../errors';
import {Type} from '../interface/type';
Expand Down Expand Up @@ -643,7 +642,7 @@ export class ApplicationRef {
* pending dirtiness (potentially in a loop).
*/
private synchronize(): void {
if (this._rendererFactory === null && !(this._injector as R3Injector).destroyed) {
if (this._rendererFactory === null && !(this._injector as InjectorImpl).destroyed) {
this._rendererFactory = this._injector.get(RendererFactory2, null, {optional: true});
}

Expand Down Expand Up @@ -847,7 +846,7 @@ export class ApplicationRef {
);
}

const injector = this._injector as R3Injector;
const injector = this._injector as InjectorImpl;

// Check that this injector instance supports destroy operation.
if (injector.destroy && !injector.destroyed) {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/application/create_application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
*/

import {internalProvideZoneChangeDetection} from '../change_detection/scheduling/ng_zone_scheduling';
import {EnvironmentProviders, Provider, StaticProvider} from '../di/interface/provider';
import {EnvironmentInjector} from '../di/r3_injector';
import {EnvironmentProviders, Provider, StaticProvider} from '../di/provider';
import {EnvironmentInjector} from '../di/injector';
import {Type} from '../interface/type';
import {createOrReusePlatformInjector} from '../platform/platform';
import {assertStandaloneComponentType} from '../render3/errors';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/authoring/input/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {assertInInjectionContext} from '../../di';
import {assertInInjectionContext} from '../../di/contextual';

import {
createInputSignal,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/authoring/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {assertInInjectionContext} from '../../di';
import {assertInInjectionContext} from '../../di/contextual';
import {REQUIRED_UNSET_VALUE} from '../input/input_signal_node';

import {createModelSignal, ModelOptions, ModelSignal} from './model_signal';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/authoring/output/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {assertInInjectionContext} from '../../di';
import {assertInInjectionContext} from '../../di/contextual';

import {OutputEmitterRef} from './output_emitter_ref';

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/authoring/output/output_emitter_ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import {setActiveConsumer} from '@angular/core/primitives/signals';

import {inject} from '../../di/injector_compatibility';
import {inject} from '../../di/inject';
import {ErrorHandler} from '../../error_handler';
import {RuntimeError, RuntimeErrorCode} from '../../errors';
import {DestroyRef} from '../../linker/destroy_ref';
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/authoring/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {assertInInjectionContext} from '../di';
import {assertInInjectionContext} from '../di/contextual';
import {ProviderToken} from '../di/provider_token';
import {
createMultiResultQuerySignalFn,
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/cached_injector_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ɵɵdefineInjectable as defineInjectable} from './di/interface/defs';
import {Provider} from './di/interface/provider';
import {EnvironmentInjector} from './di/r3_injector';
import {ɵɵdefineInjectable as defineInjectable} from './di/defs';
import {Provider} from './di/provider';
import {EnvironmentInjector} from './di/injector';
import {OnDestroy} from './interface/lifecycle_hooks';
import {createEnvironmentInjector} from './render3/ng_module_ref';

Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/change_detection/change_detector_ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {InjectFlags} from '../di';
import {InternalInjectFlags} from '../di/interface/injector';
import {InjectFlags, InternalInjectFlags} from '../di/flags';
import {TNode, TNodeType} from '../render3/interfaces/node';
import {isComponentHost} from '../render3/interfaces/type_checks';
import {DECLARATION_COMPONENT_VIEW, LView} from '../render3/interfaces/view';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ɵɵdefineInjectable} from '../../di/interface/defs';
import {StaticProvider} from '../../di/interface/provider';
import {ɵɵdefineInjectable} from '../../di/defs';
import {StaticProvider} from '../../di/provider';
import {Optional, SkipSelf} from '../../di/metadata';
import {RuntimeError, RuntimeErrorCode} from '../../errors';
import {DefaultIterableDifferFactory} from '../differs/default_iterable_differ';
Expand Down
Loading

0 comments on commit c0c4914

Please sign in to comment.