Skip to content

e2e compare: setClassMetadata extraction regex never matches (ɵɵ vs ɵ) — classMetadataDiffs is dead code #561

Closed

Description

@Brooooooklyn

The e2e compare harness never actually compares setClassMetadata: extractClassMetadataCalls (src/compare.ts:2328) matches i\d+\.ɵɵsetClassMetadata but both compilers emit i0.ɵsetClassMetadata (single ɵ), so classMetadataDiffs is always empty and testFixture's known-difference gate never sees them.

Correcting the regex surfaces 79 fixture mismatches. Sampling shows most are normalization noise — same decorator payloads differing in quote style, indentation and trailing commas — so normalizeMetadataString needs to be made syntax-insensitive (e.g. parse and compare the AST or normalize quotes/commas) before the check can be enabled.

Steps: fix the regex, strengthen normalizeMetadataString, triage the residual diffs (real emit bugs vs. remaining noise), and extend KnownDifference to allowlist classMetadataDiffs per fixture — the new edge-cases/aliased-injectable entry should then declare its extra setClassMetadata explicitly.

Surfaced by a Codex review comment on #560.

Activity

  1. added a commit that references this issue on Oct 8, 2026
    a600759
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions