angular/packages/core/test/render3
Pete Bacon Darwin 393efa54e6 fix(compiler): ensure that partially compiled queries can handle forward references (#44113)
When a partially compiled component or directive is "linked" in JIT mode, the body
of its declaration is evaluated by the JavaScript runtime. If a class is referenced
in a query (e.g. `ViewQuery` or `ContentQuery`) but its definition is later in the
file, then the reference must be wrapped in a `forwardRef()` call.

Previously, query predicates were not wrapped correctly in partial declarations
causing the code to crash at runtime. In AOT mode, this code is never evaluated
but instead transformed as part of the build, so this bug did not become apparent
until Angular Material started running JIT mode tests on its distributable output.

This change fixes this problem by noting when queries are wrapped in `forwardRef()`
calls and ensuring that this gets passed through to partial compilation declarations
and then suitably stripped during linking.

See https://github.com/angular/components/pull/23882 and https://github.com/angular/components/issues/23907

PR Close #44113
2021-11-10 18:25:16 +00:00
..
i18n test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
instructions test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
interfaces ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
ivy build: remove "ivy-only" bazel tag (#43862) 2021-10-19 10:06:55 -07:00
jit fix(compiler): ensure that partially compiled queries can handle forward references (#44113) 2021-11-10 18:25:16 +00:00
perf build: Use Ivy compiler for bazel builds by default (#43862) 2021-10-19 10:06:54 -07:00
styling_next refactor(core): Ensure that previousOrParentTNode always belongs to current TView. (#38707) 2020-09-28 16:15:58 -04:00
util test: clean up internal testing utilities (#42177) 2021-05-26 20:07:25 +00:00
BUILD.bazel build: remove "ivy-only" bazel tag (#43862) 2021-10-19 10:06:55 -07:00
change_detection_spec.ts fix(core): markDirty() should only mark flags when really scheduling tick. (#39316) 2020-10-29 16:07:10 -07:00
common_with_def.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
component_ref_spec.ts refactor(core): clean up circular dependencies (#39722) 2020-11-18 09:15:29 -08:00
component_spec.ts refactor(compiler): move factory out of injector definition (#41022) 2021-03-08 15:31:30 -08:00
di_spec.ts test(core): verify that token IDs that exceed the bloom filter size are handled correctly (#40489) 2021-01-20 17:02:02 -08:00
global_utils_spec.ts feat(core): introduce getDirectiveMetadata global debugging utility (#41525) 2021-04-13 16:06:32 -07:00
i18n_debug_spec.ts refactor(core): cleanup i18n/icu data structures (#39233) 2020-10-21 18:33:00 -07:00
imported_renderer2.ts refactor: add override keyword to members implementing abstract declarations (#42512) 2021-07-12 13:11:17 -07:00
instructions_spec.ts refactor(core): Change TemplateFixture to named parameters (#39233) 2020-10-21 18:32:59 -07:00
integration_spec.ts Revert "perf(core): avoid storing LView in __ngContext__ (#41358)" (#41901) 2021-04-30 14:12:52 -07:00
is_shape_of.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
is_shape_of_spec.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
jit_environment_spec.ts refactor(compiler-cli): introduce declaration function to declare class metadata (#41200) 2021-04-12 10:41:17 -07:00
listeners_spec.ts refactor(core): Consistent use of HEADER_OFFSET (in ɵɵ* instructions only) (#39233) 2020-10-21 18:33:00 -07:00
load_domino.ts refactor(core): remove unused fakeAsyncFallback and asyncFallback (#37879) 2020-11-20 08:34:59 -08:00
matchers.ts test(core): update matcher.jasmineToString() to work with jasmine@3.6.0 (#43411) 2021-10-01 12:27:25 -04:00
matchers_spec.ts test(core): update matcher.jasmineToString() to work with jasmine@3.6.0 (#43411) 2021-10-01 12:27:25 -04:00
metadata_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
node_selector_matcher_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
perfCounter_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
pipe_spec.ts perf(core): remove support for the deprecated WrappedValue (#43507) 2021-10-01 12:25:19 -04:00
providers_spec.ts refactor(core): ensure compatibility with noImplicitOverride (#42512) 2021-07-12 13:11:15 -07:00
query_spec.ts fix(core): QueryList should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
render_util.ts refactor(core): remove the need for ɵɵinjectPipeChangeDetectorRef() (#41231) 2021-03-30 16:46:37 -07:00
renderer_factory_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
testing_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
utils.ts refactor(core): Rename debugMatch to matchDebug for consistency (#39233) 2020-10-21 18:33:00 -07:00
view_container_ref_spec.ts fix(core): QueryList should not fire changes if the underlying list did not change. (#40091) 2021-01-14 13:55:02 -08:00
view_fixture.ts ci: add lint error for files with missing trailing new-line (#42478) 2021-06-04 13:31:03 -07:00
view_utils_spec.ts fix(core): Store ICU state in LView rather than in TView (#39233) 2020-10-21 18:33:00 -07:00