Skip to content

Support inline TCBs in language service - #68454

Closed
atscott wants to merge 5 commits into
angular:mainfrom
atscott:inlineTemplateExternalCopy-language-service
Closed

Support inline TCBs in language service#68454
atscott wants to merge 5 commits into
angular:mainfrom
atscott:inlineTemplateExternalCopy-language-service

Conversation

@atscott

@atscott atscott commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

@angular-robot angular-robot Bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler area: language-service Issues related to Angular's VS Code language service labels Apr 29, 2026
@ngbot ngbot Bot added this to the Backlog milestone Apr 29, 2026
@atscott
atscott force-pushed the inlineTemplateExternalCopy-language-service branch 7 times, most recently from 877f10d to b9f2673 Compare May 5, 2026 18:24
atscott added 2 commits May 5, 2026 11:28
Langauge service previously never compiled non-exported classes. This avoided issues
where test modules would cause diagnostic noise due to components appearing in
declarations of two modules, for example. This change updates the logic to ensure
non-exported, but standalone classes _are_ still compiled.

fixes angular#65515
…e typecheck blocks

This change updates the language service to generate TCBs for templates that would previously
have required inlining. The new strategy is to copy the original source and then do inlining
in the external TCB. This allows language features and type-checking in templates of non-exported
classes (such as test components) or classes with local, non exported dependencies.
@atscott
atscott force-pushed the inlineTemplateExternalCopy-language-service branch from b9f2673 to 46c57d9 Compare May 5, 2026 18:28
@atscott
atscott requested a review from crisbeto May 5, 2026 20:13
@atscott
atscott marked this pull request as ready for review May 5, 2026 20:13
@atscott atscott changed the title Inline template external copy language service Support inline TCBs in language service May 5, 2026
Ensure paths are normalized before comparison and key generation in tcb_adapter.ts to avoid failures on Windows.
Ensure a newline before appending imports in TypeCheckFile.render to prevent trailing comments from neutralizing them.
Comment thread packages/compiler-cli/src/ngtsc/transform/src/api.ts Outdated
Comment thread packages/compiler-cli/src/ngtsc/typecheck/src/checker.ts Outdated
@atscott
atscott force-pushed the inlineTemplateExternalCopy-language-service branch from a18b8c1 to 7e3208c Compare May 6, 2026 20:36
@atscott atscott added action: merge The PR is ready for merge by the caretaker 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 labels May 7, 2026
@atscott

atscott commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

caretaker: failures were unrelated, passed on rerun (not sure why it doesn't update)

@mattrbeck

Copy link
Copy Markdown
Member

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

@mattrbeck mattrbeck closed this in 7f0265e May 7, 2026
mattrbeck pushed a commit that referenced this pull request May 7, 2026
…e typecheck blocks (#68454)

This change updates the language service to generate TCBs for templates that would previously
have required inlining. The new strategy is to copy the original source and then do inlining
in the external TCB. This allows language features and type-checking in templates of non-exported
classes (such as test components) or classes with local, non exported dependencies.

PR Close #68454
mattrbeck pushed a commit that referenced this pull request May 7, 2026
…68454)

Ensure paths are normalized before comparison and key generation in tcb_adapter.ts to avoid failures on Windows.
Ensure a newline before appending imports in TypeCheckFile.render to prevent trailing comments from neutralizing them.

PR Close #68454
@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 7, 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 area: language-service Issues related to Angular's VS Code language service detected: feature PR contains a feature commit 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.

4 participants