Skip to content

fix(compiler): fix detection of directive deps in JIT#62666

Closed
JeanMeche wants to merge 2 commits intoangular:mainfrom
JeanMeche:fix/62573
Closed

fix(compiler): fix detection of directive deps in JIT#62666
JeanMeche wants to merge 2 commits intoangular:mainfrom
JeanMeche:fix/62573

Conversation

@JeanMeche
Copy link
Member

fixes #62573

@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jul 16, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 16, 2025
This fix also matches the implementation to the jsdoc for `hasDirectiveDependencies` "Whether any of the component's dependencies are directives"

fixes angular#62573
@JeanMeche JeanMeche marked this pull request as ready for review July 16, 2025 18:27
@pullapprove pullapprove bot requested a review from crisbeto July 16, 2025 18:27
@kirjs kirjs added the target: patch This PR is targeted for the next patch release label Jul 16, 2025
@JeanMeche JeanMeche added the action: merge The PR is ready for merge by the caretaker label Jul 17, 2025
kirjs pushed a commit that referenced this pull request Jul 17, 2025
This fix also matches the implementation to the jsdoc for `hasDirectiveDependencies` "Whether any of the component's dependencies are directives"

fixes #62573

PR Close #62666
@kirjs
Copy link
Contributor

kirjs commented Jul 17, 2025

This PR was merged into the repository by commit 3171d01.

The changes were merged into the following branches: main, 20.1.x

@kirjs kirjs closed this in 3171d01 Jul 17, 2025
@aceArt-GmbH
Copy link

just out of curiosity: why is JIT still supported in angular?
AOT has been the default since angular 9 and provides many advantages.
Wouldn't it simplify angular if AOT was the only option? (of course with the disadvantage of making another breaking change)
Do many projects (beside testing) still use JIT?

@damiansire
Copy link
Contributor

@aceArt-GmbH my two cents:

My friends and I discuss this often, and we've concluded that the JIT compiler has become an obstacle to improving the Developer Experience (DX).

JIT creates "friction" when implementing desirable new features in the framework (as was the case with the global flag for standalone components). Furthermore, modern features like @defer don't function correctly with JIT, and future ideas such as "selectorless components" also wouldn't be feasible without adding more complexity and transformations.

We can get, much better solutions that don't involve sending the entire Angular compiler to the user's browser, which would significantly improve performance.

However, on the other hand, many existing applications rely on it.

Therefore, discontinuing it isn't so simple. First, a comprehensive list of all current JIT use cases needs to be created and understood. The ultimate goal is to develop viable and superior replacements for these use cases before removing it entirely.

@angular-automatic-lock-bot
Copy link

This issue 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 Aug 18, 2025
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Karma builder in 20.1 CLI version cannot execute 3rd party templates with structural directives

6 participants