angular/packages/compiler-cli
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
..
integrationtest fix(core): link errors to ADEV (#55554) (#56038) 2024-05-28 12:50:53 +02:00
linker feat(core): add support for let syntax (#56715) 2024-06-26 12:37:02 -07:00
ngcc refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
private refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
src feat(compiler-cli): run JIT transform on classes with jit: true opt-out (#56892) 2024-07-10 17:29:19 +02:00
test feat(compiler-cli): run JIT transform on classes with jit: true opt-out (#56892) 2024-07-10 17:29:19 +02:00
BUILD.bazel refactor(docs-infra): complete removal of aio directory (#56496) 2024-06-18 12:26:00 -07:00
esbuild.config.js refactor: migrate compiler-cli to prettier formatting (#55485) 2024-04-29 10:25:43 -07:00
index.ts refactor(compiler-cli): support extracting initializer API functions (#54925) 2024-03-26 09:17:20 -07:00
package.json build: update babel dependencies to v7.24.7 (#56373) 2024-06-12 13:11:12 -07:00
tsconfig-build.json refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) 2021-12-01 10:36:30 -08:00
tsconfig.json build: update tsconfigs to use ES2020 as target and module (#43431) 2021-10-01 18:28:42 +00:00