Skip to content

refactor(compiler): run some of our tests also against NGP - #71313

Closed
JeanMeche wants to merge 15 commits into
angular:mainfrom
JeanMeche:ngp-shared-compiler-tests
Closed

JeanMeche wants to merge 15 commits into
angular:mainfrom
JeanMeche:ngp-shared-compiler-tests

Conversation

@JeanMeche

@JeanMeche JeanMeche commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

This change will help us highlight the remaining gaps in the implementation by running a set of our compiler tests against NGP.

See individual commits

@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Oct 12, 2026
@ngbot ngbot Bot added this to the Backlog milestone Oct 12, 2026
@JeanMeche
JeanMeche requested review from crisbeto and mattrbeck and removed request for crisbeto October 12, 2026 15:55
@JeanMeche
JeanMeche marked this pull request as ready for review October 12, 2026 15:55
@JeanMeche JeanMeche changed the title Ngp shared compiler tests refactor(compiler): run some of our tests also against NGP Oct 12, 2026
@crisbeto

Copy link
Copy Markdown
Member

Looks like this needs another rebase.

atscott and others added 14 commits October 12, 2026 17:21
Add synchronous execution paths to WasmAnalyzer, HybridCompiler, and processor so synchronous compiler test harnesses can invoke the WASM analyzer and preprocessor without async bridging.
Introduce performNgpCompilationSync, createNgpBoundTemplate, createNgpTestCompiler, MockFileSystem-to-WasmHostFs bridging, and output AST normalization so compiler-cli test suites can execute against NGP when NG_COMPILER_BACKEND=ngp.
…t helper

Register a Jasmine SpecFilter in runInEachFileSystem that marks known NGP compiler gap specs as pending (xit) by default in NG_COMPILER_BACKEND=ngp mode (unless NGP_RUN_KNOWN_FAILURES=1 is set).
Wire NgtscTestEnvironment to execute compilations and diagnostics through NGP when NG_COMPILER_BACKEND=ngp is set, and add the //packages/compiler-cli/test/ngtsc:ngtsc_ngp Bazel test target.
Support NGP compilation and output normalization in the compliance test harness and add the full_ngp and local_ngp Bazel test targets.
…t NGP

Normalize declaration-only .d.ts output in NGP test mode and add the declaration-only_ngp Bazel test target.
Verify preprocessed NGP .ng.ts output across all compliance test cases via ts.getPreEmitDiagnostics and add the codegen_ngp Bazel test target.
Delegate diagnose() in the template typecheck test helper to NGP when NG_COMPILER_BACKEND=ngp is set, and add the //packages/compiler-cli/src/ngtsc/typecheck/test:test_ngp Bazel test target.
Add test_ngp Bazel test targets across all 16 extended template check test suites under packages/compiler-cli/src/ngtsc/typecheck/extended/test/checks.
Delegate getBoundTemplate() in the template indexer test helper to NGP's HybridCompiler and IndexerBoundTemplate in NG_COMPILER_BACKEND=ngp mode, and add the //packages/compiler-cli/src/ngtsc/indexer/test:test_ngp Bazel test target.
Wire makeFreshCompiler() in compiler_spec.ts to createNgpTestCompiler in NG_COMPILER_BACKEND=ngp mode, and add the //packages/compiler-cli/src/ngtsc/core/test:test_ngp Bazel test target.
@JeanMeche
JeanMeche force-pushed the ngp-shared-compiler-tests branch from 4bcc42e to eb3d99b Compare October 12, 2026 21:23
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Oct 13, 2026
@crisbeto
crisbeto removed the request for review from mattrbeck October 13, 2026 03:00
@crisbeto

Copy link
Copy Markdown
Member

This PR was merged into the repository. The changes were merged into the following branches:

@crisbeto crisbeto closed this in 4b6788f Oct 13, 2026
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…ngular#71313)

Introduce performNgpCompilationSync, createNgpBoundTemplate, createNgpTestCompiler, MockFileSystem-to-WasmHostFs bridging, and output AST normalization so compiler-cli test suites can execute against NGP when NG_COMPILER_BACKEND=ngp.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…t helper (angular#71313)

Register a Jasmine SpecFilter in runInEachFileSystem that marks known NGP compiler gap specs as pending (xit) by default in NG_COMPILER_BACKEND=ngp mode (unless NGP_RUN_KNOWN_FAILURES=1 is set).

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
Wire NgtscTestEnvironment to execute compilations and diagnostics through NGP when NG_COMPILER_BACKEND=ngp is set, and add the //packages/compiler-cli/test/ngtsc:ngtsc_ngp Bazel test target.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…1313)

Support NGP compilation and output normalization in the compliance test harness and add the full_ngp and local_ngp Bazel test targets.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…t NGP (angular#71313)

Normalize declaration-only .d.ts output in NGP test mode and add the declaration-only_ngp Bazel test target.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…gular#71313)

Verify preprocessed NGP .ng.ts output across all compliance test cases via ts.getPreEmitDiagnostics and add the codegen_ngp Bazel test target.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…gular#71313)

Delegate diagnose() in the template typecheck test helper to NGP when NG_COMPILER_BACKEND=ngp is set, and add the //packages/compiler-cli/src/ngtsc/typecheck/test:test_ngp Bazel test target.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…GP (angular#71313)

Add test_ngp Bazel test targets across all 16 extended template check test suites under packages/compiler-cli/src/ngtsc/typecheck/extended/test/checks.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…lar#71313)

Delegate getBoundTemplate() in the template indexer test helper to NGP's HybridCompiler and IndexerBoundTemplate in NG_COMPILER_BACKEND=ngp mode, and add the //packages/compiler-cli/src/ngtsc/indexer/test:test_ngp Bazel test target.

PR Close angular#71313
crisbeto pushed a commit to crisbeto/angular that referenced this pull request Oct 13, 2026
…ar#71313)

Wire makeFreshCompiler() in compiler_spec.ts to createNgpTestCompiler in NG_COMPILER_BACKEND=ngp mode, and add the //packages/compiler-cli/src/ngtsc/core/test:test_ngp Bazel test target.

PR Close angular#71313
@angular-automatic-lock-bot

Copy link
Copy Markdown

This pull request 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.

@angular-automatic-lock-bot angular-automatic-lock-bot Bot locked and limited conversation to collaborators Nov 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: compiler Issues related to `ngc`, Angular's template compiler detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants