Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

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

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy