Commit 8a6ecc4
fix(component): pool content-query predicates before view-query predicates
Upstream ngtsc's `compileComponent` emits the `contentQueries:` field
before `viewQuery:` in the component definition object literal, and
pools predicates in that order. The resulting `_c<N>` constant-table
indices end up content-first (`_c0`, `_c1` for content; `_c2`, `_c3`
for view) — the form pinned by every compliance golden under
`compiler-cli/test/compliance/test_cases/signal_queries/`.
This compiler had the order reversed (view queries pooled first), so
the same source produced `_c0`/`_c1` for view queries and `_c2`/`_c3`
for content — runtime-equivalent but breaks emit-anchored tooling and
diff-based comparisons against Angular's own goldens.
Fix: swap the call order in `compile_component` so content queries
are pooled and emitted before view queries. No behavioral change at
runtime — the metadata field order is unchanged in the output object
literal (Angular's runtime reads both fields by name); only the
const-table indices shift back into upstream alignment.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 61e4371 commit 8a6ecc4
1 file changed
Lines changed: 17 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3420 | 3420 | | |
3421 | 3421 | | |
3422 | 3422 | | |
3423 | | - | |
3424 | | - | |
3425 | | - | |
3426 | | - | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
3427 | 3435 | | |
3428 | | - | |
| 3436 | + | |
3429 | 3437 | | |
3430 | | - | |
| 3438 | + | |
3431 | 3439 | | |
3432 | 3440 | | |
3433 | 3441 | | |
3434 | 3442 | | |
3435 | 3443 | | |
3436 | 3444 | | |
3437 | 3445 | | |
3438 | | - | |
3439 | | - | |
3440 | | - | |
| 3446 | + | |
3441 | 3447 | | |
3442 | | - | |
| 3448 | + | |
3443 | 3449 | | |
3444 | | - | |
| 3450 | + | |
3445 | 3451 | | |
3446 | 3452 | | |
3447 | 3453 | | |
| |||
0 commit comments