Skip to content

refactor(compiler): emit instructions for foreign components#68786

Merged
alxhub merged 4 commits into
angular:mainfrom
leonsenft:foreign-component-instruction
May 27, 2026
Merged

refactor(compiler): emit instructions for foreign components#68786
alxhub merged 4 commits into
angular:mainfrom
leonsenft:foreign-component-instruction

Conversation

@leonsenft

@leonsenft leonsenft commented May 18, 2026

Copy link
Copy Markdown
Contributor

When a template element matches an imported foreign component, the compiler omits standard element instructions (ɵɵelementStart/ɵɵelement) and instead generates a single ɵɵforeignComponent call. The call passes the exact foreign import wrapper expression defined in @Component.foreignImports along with an aggregated object literal containing all static attributes and property bindings.

The instruction itself is currently a no-op.

@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label May 18, 2026
@ngbot ngbot Bot added this to the Backlog milestone May 18, 2026
@leonsenft leonsenft added the target: minor This PR is targeted for the next minor release label May 18, 2026
@leonsenft leonsenft force-pushed the foreign-component-instruction branch 3 times, most recently from 2cd45b5 to 6824070 Compare May 20, 2026 15:18
When a template element matches an imported foreign component, the compiler
omits standard element instructions (`ɵɵelementStart`/`ɵɵelement`) and instead
generates a single `ɵɵforeignComponent` call. The call passes the exact foreign
import wrapper expression defined in `@Component.foreignImports` along with an
aggregated object literal containing all static attributes and property
bindings.

The instruction itself is currently a no-op.
@leonsenft leonsenft force-pushed the foreign-component-instruction branch from 6824070 to b26fc24 Compare May 20, 2026 17:37
@leonsenft leonsenft marked this pull request as ready for review May 20, 2026 17:38
Comment thread packages/compiler/src/template/pipeline/src/ingest.ts Outdated
Comment thread packages/compiler/src/template/pipeline/src/ingest.ts
Comment thread packages/compiler/src/template/pipeline/src/ingest.ts Outdated
@leonsenft leonsenft force-pushed the foreign-component-instruction branch from b486e4d to d941c13 Compare May 21, 2026 18:47
@leonsenft leonsenft requested review from JeanMeche and atscott May 21, 2026 21:01
@leonsenft leonsenft added the action: merge The PR is ready for merge by the caretaker label May 22, 2026
Comment thread packages/compiler/src/template/pipeline/src/ingest.ts
Comment thread packages/compiler-cli/src/ngtsc/annotations/component/src/handler.ts Outdated
Comment thread packages/compiler/src/template/pipeline/src/ingest.ts
@leonsenft leonsenft requested a review from mattrbeck May 26, 2026 17:09
@leonsenft leonsenft added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label May 26, 2026
@leonsenft

Copy link
Copy Markdown
Contributor Author

Note for caretaker: TAP is green: cl/919726574.

@alxhub alxhub removed request for JeanMeche and mattrbeck May 27, 2026 23:38
@alxhub alxhub merged commit 6981cd7 into angular:main May 27, 2026
22 of 24 checks passed
@alxhub

alxhub commented May 27, 2026

Copy link
Copy Markdown
Member

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

@leonsenft leonsenft deleted the foreign-component-instruction branch May 27, 2026 23:41
@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 Jun 27, 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 merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants