Skip to content

Commit 20319fe

Browse files
crisbetoAndrewKushnir
authored andcommitted
refactor(compiler): remove unused code
The `fullInheritane` flag from the metadata and the `CopyDefinitionFeature` that it controls appear to no longer be used since `fullInheritance` is always false. The feature appears to have been there to support ngcc which was removed some time ago. (cherry picked from commit 8277906)
1 parent 91dbb4b commit 20319fe

File tree

11 files changed

+0
-204
lines changed

11 files changed

+0
-204
lines changed

packages/compiler-cli/linker/src/file_linker/partial_linkers/partial_directive_linker_1.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ export function toR3DirectiveMeta<TExpression>(
8888
? metaObj.getArray('viewQueries').map((entry) => toQueryMetadata(entry.getObject()))
8989
: [],
9090
providers: metaObj.has('providers') ? metaObj.getOpaque('providers') : null,
91-
fullInheritance: false,
9291
selector: metaObj.has('selector') ? metaObj.getString('selector') : null,
9392
exportAs: metaObj.has('exportAs')
9493
? metaObj.getArray('exportAs').map((entry) => entry.getString())

packages/compiler-cli/src/ngtsc/annotations/directive/src/shared.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ export function extractDirectiveMetadata(
438438
queries: contentQueries,
439439
viewQueries,
440440
selector,
441-
fullInheritance: false,
442441
type,
443442
typeArgumentCount: reflector.getGenericArityOfClass(clazz) || 0,
444443
typeSourceSpan: createSourceSpan(clazz.name),

packages/compiler/src/jit_compiler_facade.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,6 @@ function convertDirectiveFacadeToMetadata(facade: R3DirectiveMetadataFacade): R3
529529
queries: facade.queries.map(convertToR3QueryMetadata),
530530
providers: facade.providers != null ? new WrappedNodeExpr(facade.providers) : null,
531531
viewQueries: facade.viewQueries.map(convertToR3QueryMetadata),
532-
fullInheritance: false,
533532
hostDirectives,
534533
};
535534
}
@@ -564,7 +563,6 @@ function convertDeclareDirectiveFacadeToMetadata(
564563
lifecycle: {usesOnChanges: declaration.usesOnChanges ?? false},
565564
deps: null,
566565
typeArgumentCount: 0,
567-
fullInheritance: false,
568566
isStandalone:
569567
declaration.isStandalone ?? getJitStandaloneDefaultForVersion(declaration.version),
570568
isSignal: declaration.isSignal ?? false,

packages/compiler/src/render3/r3_identifiers.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,6 @@ export class Identifiers {
433433
moduleName: CORE,
434434
};
435435

436-
static CopyDefinitionFeature: o.ExternalReference = {
437-
name: 'ɵɵCopyDefinitionFeature',
438-
moduleName: CORE,
439-
};
440-
441436
static ProvidersFeature: o.ExternalReference = {name: 'ɵɵProvidersFeature', moduleName: CORE};
442437

443438
static HostDirectivesFeature: o.ExternalReference = {

packages/compiler/src/render3/view/api.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ export interface R3DirectiveMetadata {
9191
*/
9292
usesInheritance: boolean;
9393

94-
/**
95-
* Whether or not the component or directive inherits its entire decorator from its base class.
96-
*/
97-
fullInheritance: boolean;
98-
9994
/**
10095
* Reference name under which to export the directive's type in a template,
10196
* if any.

packages/compiler/src/render3/view/compiler.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,6 @@ function addFeatures(
145145
if (meta.usesInheritance) {
146146
features.push(o.importExpr(R3.InheritDefinitionFeature));
147147
}
148-
if (meta.fullInheritance) {
149-
features.push(o.importExpr(R3.CopyDefinitionFeature));
150-
}
151148
if (meta.lifecycle.usesOnChanges) {
152149
features.push(o.importExpr(R3.NgOnChangesFeature));
153150
}

packages/core/src/core_render3_private_export.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export {
9797
ɵɵcontrolCreate,
9898
ɵExtractFormControlValue,
9999
ɵɵcomponentInstance,
100-
ɵɵCopyDefinitionFeature,
101100
ɵɵdefineComponent,
102101
ɵɵdefineDirective,
103102
ɵɵdefineNgModule,

packages/core/src/render3/features/copy_definition_feature.ts

Lines changed: 0 additions & 93 deletions
This file was deleted.

packages/core/src/render3/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88
import {ɵɵdefineComponent, ɵɵdefineDirective, ɵɵdefineNgModule, ɵɵdefinePipe} from './definition';
9-
import {ɵɵCopyDefinitionFeature} from './features/copy_definition_feature';
109
import {ɵɵHostDirectivesFeature} from './features/host_directives_feature';
1110
import {ɵɵInheritDefinitionFeature} from './features/inherit_definition_feature';
1211
import {ɵɵNgOnChangesFeature} from './features/ng_onchanges_feature';
@@ -234,7 +233,6 @@ export {
234233
getRenderedText,
235234
PipeDef,
236235
ɵɵComponentDeclaration,
237-
ɵɵCopyDefinitionFeature,
238236
ɵɵdefineComponent,
239237
ɵɵdefineDirective,
240238
ɵɵdefineNgModule,

packages/core/src/render3/jit/environment.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ export const angularCoreEnv: {[name: string]: unknown} = (() => ({
4242
'ɵɵHostDirectivesFeature': r3.ɵɵHostDirectivesFeature,
4343
'ɵɵNgOnChangesFeature': r3.ɵɵNgOnChangesFeature,
4444
'ɵɵProvidersFeature': r3.ɵɵProvidersFeature,
45-
'ɵɵCopyDefinitionFeature': r3.ɵɵCopyDefinitionFeature,
4645
'ɵɵInheritDefinitionFeature': r3.ɵɵInheritDefinitionFeature,
4746
'ɵɵExternalStylesFeature': r3.ɵɵExternalStylesFeature,
4847
'ɵɵnextContext': r3.ɵɵnextContext,

0 commit comments

Comments
 (0)