@@ -10,7 +10,6 @@ import type * as ng from '@angular/compiler-cli';
1010import assert from 'node:assert' ;
1111import { relative } from 'node:path' ;
1212import ts from 'typescript' ;
13- import { useTypeChecking } from '../../../utils/environment-options' ;
1413import { profileAsync , profileSync } from '../../esbuild/profiling' ;
1514import {
1615 AngularHostOptions ,
@@ -176,19 +175,9 @@ export class AotCompilation extends AngularCompilation {
176175 }
177176 }
178177
179- // The affected files walk runs a full semantic type-check as a side effect
180- // (via `getSemanticDiagnosticsOfNextAffectedFile`). Its result is only consumed to
181- // scope Angular template diagnostics and to force re-emit of TS-affected files in the
182- // slow TypeScript emit path. When type-checking is disabled, template/semantic
183- // diagnostics are already suppressed at the consumption layer (see the compiler-plugin
184- // `diagnoseFiles` mask), and in the isolatedModules fast path emit is per-file, so the
185- // set is never read. Skip the walk in that case to avoid a discarded semantic pass.
186- const affectedFiles =
187- useTypeChecking || useTypeScriptTranspilation
188- ? profileSync ( 'NG_FIND_AFFECTED' , ( ) =>
189- findAffectedFiles ( typeScriptProgram , angularCompiler , usingBuildInfo ) ,
190- )
191- : new Set < ts . SourceFile > ( ) ;
178+ const affectedFiles = profileSync ( 'NG_FIND_AFFECTED' , ( ) =>
179+ findAffectedFiles ( typeScriptProgram , angularCompiler , usingBuildInfo ) ,
180+ ) ;
192181
193182 const componentResourcesDependencies = new Map < string , string [ ] > ( ) ;
194183
0 commit comments