angular/packages/compiler-cli
Paul Gschwendtner e6db288ffd refactor(compiler-cli): ensure proper TS incremental program re-use w/ signal inputs (#53521)
Whenever a signal input is captured in a type check block, we will
insert an import. This will change the import graph so that the full
TypeScript program cannot be structurally re-used.

We can fix this trivially by ensuring the import graph remains stable,
by always generating an import to e.g. `@angular/core`. This fixes the
issue nicely for type-check block files. A test verifies this.

For inline code, such as TCB inline or the type constructors inline,
this fix is not applicable because we would change user-input source files,
adding new edges that would not exist for subsequent builds- causing the
program to be not re-used completely. One idea was to rely on the
existing edge that can be assumed to exist for directive code files.
This is true technically, but in practice TS does not deduplicate
imports- so our new namespace import when referencing our symbols will
invalidate the re-use. We will address this in a follow-up. There are a
couple of options, such as working with the TS team, updating the
existing edge, or inlining our helpers as well.

PR Close #53521
2023-12-13 15:44:00 -08:00
..
integrationtest refactor: fix a number of typos throughout the codebase (#52249) 2023-10-25 16:51:24 -07:00
linker refactor(compiler): emit signal input info in d.ts and generate partial compilation output (#53521) 2023-12-13 15:44:00 -08:00
ngcc refactor(compiler-cli): add back ngcc as a no-op with a warning (#50045) 2023-04-28 18:18:40 +02:00
private build: remove unneeded babel types postinstall patching (#53441) 2023-12-08 14:33:59 -08:00
src refactor(compiler-cli): ensure proper TS incremental program re-use w/ signal inputs (#53521) 2023-12-13 15:44:00 -08:00
test refactor(compiler-cli): ensure proper TS incremental program re-use w/ signal inputs (#53521) 2023-12-13 15:44:00 -08:00
BUILD.bazel feat(compiler): initial skeleton for API doc extraction (#51733) 2023-09-18 12:29:19 +02:00
esbuild.config.js refactor: remove __ESM_IMPORT_META_URL__ workaround now that we can use ESM (#48521) 2022-12-19 19:50:41 +00:00
index.ts feat(compiler): extract docs via exports (#51828) 2023-09-20 18:34:55 +02:00
package.json feat(core): support TypeScript 5.3 (#52572) 2023-11-09 22:56:41 +00: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