angular/packages/compiler-cli/src/ngtsc
JoostK 3e3a1ef30d fix(ivy): support dynamic query tokens in AOT mode (#35307)
For view and content queries, the Ivy compiler attempts to statically
evaluate the predicate token so that string predicates containing
comma-separated reference names can be split into an array of strings
during compilation. When the predicate is a dynamic value that cannot be
statically interpreted at compile time, the compiler would previously
produce an error. This behavior breaks a use-case where an `InjectionToken`
is being used as query predicate, as the usage of the `new` keyword
prevents such predicates from being statically evaluated.

This commit changes the behavior to no longer produce an error for
dynamic values. Instead, the expression is emitted as is into the
generated code, postponing the evaluation to happen at runtime.

Fixes #34267
Resolves FW-1828

PR Close #35307
2020-02-27 16:05:21 -08:00
..
annotations fix(ivy): support dynamic query tokens in AOT mode (#35307) 2020-02-27 16:05:21 -08:00
core fix(ivy): add strictLiteralTypes to align Ivy + VE checking of literals (#35462) 2020-02-21 12:36:11 -08:00
cycles test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736) 2020-01-15 14:58:07 -05:00
diagnostics refactor(compiler): rename diagnostics/src/code.ts to diagnostics/src/error_code.ts (#35067) 2020-01-31 11:25:27 -08:00
entry_point test: handle bootstrap templated_args in jasmine_node_test defaults.bzl (#34736) 2020-01-15 14:58:07 -05:00
file_system feat(ngcc): pause async ngcc processing if another process has the lockfile (#35131) 2020-02-18 17:20:41 -08:00
imports fix(ivy): support emitting a reference to interface declarations (#34849) 2020-02-04 10:40:45 -08:00
incremental fix(ivy): recompile on template change in ngc watch mode on Windows (#34015) 2020-02-04 10:40:22 -08:00
indexer refactor(ivy): introduce the 'core' package and split apart NgtscProgram (#34887) 2020-01-24 08:59:59 -08:00
metadata feat(ivy): throw compilation error when providing undecorated classes (#34460) 2019-12-18 15:04:49 -08:00
modulewithproviders refactor(ivy): change ImportMode enum to ImportFlags (#34649) 2020-01-23 10:31:47 -08:00
partial_evaluator fix(ngcc): correctly detect emitted TS helpers in ES5 (#35191) 2020-02-21 09:06:46 -08:00
perf refactor(ivy): implement a virtual file-system layer in ngtsc + ngcc (#30921) 2019-06-25 16:25:24 -07:00
reflection fix(ngcc): correctly detect emitted TS helpers in ES5 (#35191) 2020-02-21 09:06:46 -08:00
resource fix(compiler-cli): add sass as a valid css preprocessor extension (#35052) 2020-01-31 13:28:39 -08:00
routing perf(ivy): use module resolution cache (#34332) 2019-12-12 14:06:37 -08:00
scope fix(ivy): provide a more detailed error message for NG6002/NG6003 (#35620) 2020-02-26 12:56:47 -08:00
shims refactor(ivy): compute ignoreFiles for compilation on initialization (#34792) 2020-02-06 15:27:34 -08:00
switch build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00
testing fix(ivy): support emitting a reference to interface declarations (#34849) 2020-02-04 10:40:45 -08:00
transform fix(ivy): catch FatalDiagnosticError thrown from preanalysis phase (#34801) 2020-01-27 10:58:27 -08:00
translator refactor(ivy): consistently translate types to ts.TypeNode (#34021) 2020-01-06 11:06:07 -08:00
typecheck fix(ivy): better inference for circularly referenced directive types (#35622) 2020-02-26 12:57:08 -08:00
util fix(ivy): support emitting a reference to interface declarations (#34849) 2020-02-04 10:40:45 -08:00
program.ts refactor(ivy): compute ignoreFiles for compilation on initialization (#34792) 2020-02-06 15:27:34 -08:00
tsc_plugin.ts refactor: update tscplugin api to match google3 (#35455) 2020-02-24 17:29:33 -08:00