angular/packages/compiler-cli/src/ngtsc
Paul Gschwendtner 98ed5b609e feat(compiler-cli): run JIT transform on classes with jit: true opt-out (#56892)
Currently when compiling code with the Angular compiler, all classes
with Angular decorators are compiled with AOT. This includes type
checking, scope collection etc.

This may not be desirable for all components, e.g. dynamic components,
or test components w/ `TestBed.configureTestingModule` (if compiled with ngtsc).

Those components can opt out of AOT on a per component-basis via `jit:
true`. This is helpful as it allows incremental migrations/refactorings
to AOT. Whether we want to keep this capability long-term is something
to be discussed separately.

For now though, we should fix that components compiled with `jit: true`
actually work as expected. Currently this **not the case** as soon as
the new initializer APIs are used— as those do no longer declare class
metadata with decorators.

This commit runs the JIT transform on JIT-opted classes.

Related: https://docs.google.com/document/d/1ox4atCJldWWDXlaYgwM-hU8BNsTpKNW7gx8OfZ0HtRY/edit?resourcekey=0-G1haTNYtD-dN0vNRkQ8_OQ&tab=t.0

PR Close #56892
2024-07-10 17:29:19 +02:00
..
annotations feat(compiler-cli): run JIT transform on classes with jit: true opt-out (#56892) 2024-07-10 17:29:19 +02:00
core feat(compiler-cli): run JIT transform on classes with jit: true opt-out (#56892) 2024-07-10 17:29:19 +02:00
cycles refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
diagnostics feat(compiler): Add extended diagnostic to warn when there are uncalled functions in event bindings (#56295) (#56295) 2024-07-03 15:36:39 +00:00
docs refactor(compiler-cli): escape missing decorators. (#56794) 2024-07-09 13:13:52 +02:00
entry_point refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
file_system build: update to TypeScript 5.5 stable (#56358) 2024-06-25 09:29:16 -07:00
imports feat(core): support TypeScript 5.5 (#56096) 2024-05-29 15:33:33 +02:00
incremental refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
indexer feat(core): add support for let syntax (#56715) 2024-06-26 12:37:02 -07:00
logging build: ensure bootstrap transitive runfiles are made available (#48521) 2022-12-19 19:50:41 +00:00
metadata refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
partial_evaluator refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
perf refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
program_driver build: update to TypeScript 5.5 stable (#56358) 2024-06-25 09:29:16 -07:00
reflection feat(core): support TypeScript 5.5 (#56096) 2024-05-29 15:33:33 +02:00
resource refactor(core): clean up clang comments and workarounds (#55750) 2024-05-13 11:10:36 -07:00
scope refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
shims refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
sourcemaps refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
testing refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
transform refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
translator refactor(compiler-cli): allow generating same import specifier in different files (#56406) 2024-06-13 10:14:09 -07:00
typecheck fix(compiler-cli): used before declared diagnostic not firing for control flow blocks (#56843) 2024-07-05 13:02:58 +02:00
util refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
validation refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
xi18n refactor(compiler-cli): support xi18n in ngtsc (#42485) 2021-06-21 16:50:28 +00:00
program.ts build: update to TypeScript 5.5 stable (#56358) 2024-06-25 09:29:16 -07:00
tsc_plugin.ts build: update to TypeScript 5.5 stable (#56358) 2024-06-25 09:29:16 -07:00