Bugfix: S267 added injectBindingMarkers() post-processor AND primary...
Documentation for Sessions
🐛 Bugfix: S267 added injectBindingMarkers() post-processor AND primary...
Date: 2026-03-24
Time: 20:29:45 UTC
Session: gspace1-264.9
Agent: angular
Confidence: 97%
Status: ✅ Documented
📋 Decision Context
Question:
S267 added injectBindingMarkers() post-processor AND primary codegen fix for AttributeMarker.Bindings. How to reconcile?
Task: S264.7: Clean up redundant Bug 9 fixes from S267
🎯 Decision Made
Chosen:
Remove the post-processor (injectBindingMarkers), keep only the codegen fix in IvyCodegen.generateElement()
Options Considered:
- Keep both (double-injection risk)
- Keep only post-processor (fragile string parsing)
- Keep only codegen fix (chosen — direct AST access, no ambiguity)
💭 Reasoning
The post-processor had two bugs: (1) Double-injection — codegen already emits [3, 'routerLink'] in consts, then the post-processor appended ANOTHER [3, 'routerLink'] by parsing the templateFn string. This would produce malformed consts arrays. (2) ɵɵadvance tracking — the post-processor treated ɵɵadvance(N) as an absolute element index, but ɵɵadvance is a DELTA (advances N from last position). The mapping of ɵɵproperty calls to element indices was incorrect for any element past index 0. The codegen fix is superior because it has direct access to the AST nodes — it knows exactly which bindings belong to which element. No string parsing, no index tracking ambiguity.
📁 Files Involved
libs/libs-structural/platform-preview/src/lib/compiler/decorator-transformer.tslibs/libs-structural/platform-preview/src/lib/compiler/ivy-codegen.ts
🔗 Related
- Decision ID:
dev_1774384185521_fsdl78l - Session: 264
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation