angular/packages/compiler-cli/test/compliance/test_cases
Dylan Hunn ec661a3f0b refactor(compiler): Fix ambiguous repeater context variables in template pipeline (#53662)
In #52931, Kristiyan fixed a TemplateDefinitionBuilder bug in which derived alias variables in for loops (`$even`, `$first`, etc) were referring to the wrong level of nested `@for` block. (These variables are unique because they become inlined expressions, and are not "real" context variables.) He fixed this by appending level information to the generated alias name.

Template Pipeline actually suffered from the same bug. We fix it in a very similar way -- in particular, whenever these derived context variables are used, we make them depend on versions of `$index` and `$count` that have been suffixed with the xref of the enclosing repeater.

I have added a few more pipeline goldens, because we are not quite as clever as TDB about only generating the duplicate suffixed index and count variables when inside nested loops. This is fine, since in the long run, we want to refactor it more fundamentally.

I have also added a TODO to fix this more rigorously. In particular, it would be nice if we had proper support for shadowed variables, as well as unlimited levels of variables depending on one another.

PR Close #53662
2024-01-03 11:24:20 -08:00
..
r3_compiler_compliance refactor(compiler): Fix handling of namespaced attributes (#53646) 2024-01-03 10:19:02 -08:00
r3_view_compiler refactor(compiler): Support unary ops in template pipeline (#53376) 2023-12-06 09:43:35 -08:00
r3_view_compiler_bindings refactor(compiler): Host bindings do not const collect listener names (#53594) 2023-12-19 13:46:11 -08:00
r3_view_compiler_control_flow refactor(compiler): Fix ambiguous repeater context variables in template pipeline (#53662) 2024-01-03 11:24:20 -08:00
r3_view_compiler_deferred refactor(compiler): Defer when consumes a variable (binding) slot (#53574) 2023-12-15 19:48:28 +00:00
r3_view_compiler_di/di perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
r3_view_compiler_directives perf(compiler): further reduce bundle size using arrow functions (#52010) 2023-10-04 07:25:54 -07:00
r3_view_compiler_i18n refactor(compiler): Rework how ICU placeholders are handled (#53643) 2023-12-20 07:23:54 -08:00
r3_view_compiler_input_outputs fix(compiler-cli): enforce a minimum version to be used when a library uses input transform (#51413) 2023-08-18 07:58:53 -07:00
r3_view_compiler_listener test(compiler): Update partial golden files (#53596) 2023-12-18 22:09:26 +00:00
r3_view_compiler_providers fix(compiler-cli): libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50714) 2023-06-14 16:27:59 +02:00
r3_view_compiler_styling test(compiler): Fix mangling of camel case CSS vars in host bindings (#53665) 2024-01-03 11:23:37 -08:00
r3_view_compiler_template refactor(compiler): Drop the explicit this. in most explicit receivers (#53594) 2023-12-19 13:46:11 -08:00
source_mapping refactor(compiler): Add source maps support for i18n instructions (#53594) 2023-12-19 13:46:10 -08:00
BUILD.bazel test: refactor compiler-cli compliance test to work on windows (#45431) 2022-03-25 12:18:34 -07:00
list_golden_update_rules.ts refactor(compiler-cli): use semver range checking for partial versions (#39847) 2020-12-04 10:26:17 -08:00
test_case_schema.json test(compiler): allow alternate expected file for template pipeline (#51100) 2023-08-01 13:45:34 -07:00