From 7befe5d506509e003a56c4ad37e68b41b49595a2 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Thu, 29 Oct 2026 21:52:03 -0500 Subject: [PATCH] Regenerate the IR codec for partial record views codec.generated.ts was not regenerated when partialView was added to IR expressions, so IR read through the binary codec dropped the field and the stale-codec check failed. --- packages/compiler/src/ir/codec.generated.ts | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/compiler/src/ir/codec.generated.ts b/packages/compiler/src/ir/codec.generated.ts index 557f85592..4dc292756 100644 --- a/packages/compiler/src/ir/codec.generated.ts +++ b/packages/compiler/src/ir/codec.generated.ts @@ -5,7 +5,7 @@ import type { IrReader, IrWriter } from "./codec.js"; /** A digest of the coders below: an encoding written with other coders is * refused instead of misread, also after a change that keeps IR_VERSION. */ -export const IR_CODEC_LAYOUT = "a1813b4b2a32bfd0"; +export const IR_CODEC_LAYOUT = "b964edeec6535396"; /** Writes `mod` field by field (codec.ts describes the bytes). */ export function encodeIrModule(w: IrWriter, mod: IrModule): void { @@ -150,7 +150,7 @@ const KEYS122: readonly string[] = ["kind","fnName","captures","adapts","type"," const KEYS123: readonly string[] = ["kind","value","type","loc"]; const KEYS124: readonly string[] = ["kind","elems","type","loc"]; const KEYS125: readonly string[] = ["kind","callee","receiver","calleeName","calleeNameValue","args","spreads","type","loc"]; -const KEYS126: readonly string[] = ["kind","value","preserveRefs","adopt","exact","inferredSite","origin","type","loc"]; +const KEYS126: readonly string[] = ["kind","value","preserveRefs","adopt","exact","partialView","inferredSite","origin","type","loc"]; const KEYS127: readonly string[] = ["kind","value","spelling","firstProp","type","loc"]; const KEYS128: readonly string[] = ["kind","value","type","loc","liveRef","fnName","fnLength"]; const KEYS129: readonly string[] = ["kind","key","negated","value","type","loc"]; @@ -2923,6 +2923,11 @@ function encIrExpr(w: IrWriter, v: IrExpr): void { w.byte(1); w.bool(v.exact); } + if (v.partialView === undefined) w.byte(0); + else { + w.byte(1); + w.bool(v.partialView); + } if (v.inferredSite === undefined) w.byte(0); else { w.byte(1); @@ -3953,11 +3958,12 @@ function decIrExpr(r: IrReader): IrExpr { const f1 = r.tag(2, "IrFunction.body[].arr.preserveRefs") === 0 ? undefined : (r.bool() as NonNullable["preserveRefs"]>); const f2 = r.tag(2, "IrFunction.body[].arr.adopt") === 0 ? undefined : (r.bool() as NonNullable["adopt"]>); const f3 = r.tag(2, "IrFunction.body[].arr.exact") === 0 ? undefined : (r.bool() as NonNullable["exact"]>); - const f4 = r.tag(2, "IrFunction.body[].arr.inferredSite") === 0 ? undefined : r.str(); - const f5 = r.tag(2, "IrFunction.body[].arr.origin") === 0 ? undefined : r.num(); - const f6 = decIrType(r); - const f7 = decSrcLoc(r); - const o: Extract = { kind: "dynCheck", value: f0, ...(f1 !== undefined ? { preserveRefs: f1 } : {}), ...(f2 !== undefined ? { adopt: f2 } : {}), ...(f3 !== undefined ? { exact: f3 } : {}), ...(f4 !== undefined ? { inferredSite: f4 } : {}), ...(f5 !== undefined ? { origin: f5 } : {}), type: f6, loc: f7 }; + const f4 = r.tag(2, "IrFunction.body[].arr.partialView") === 0 ? undefined : (r.bool() as NonNullable["partialView"]>); + const f5 = r.tag(2, "IrFunction.body[].arr.inferredSite") === 0 ? undefined : r.str(); + const f6 = r.tag(2, "IrFunction.body[].arr.origin") === 0 ? undefined : r.num(); + const f7 = decIrType(r); + const f8 = decSrcLoc(r); + const o: Extract = { kind: "dynCheck", value: f0, ...(f1 !== undefined ? { preserveRefs: f1 } : {}), ...(f2 !== undefined ? { adopt: f2 } : {}), ...(f3 !== undefined ? { exact: f3 } : {}), ...(f4 !== undefined ? { partialView: f4 } : {}), ...(f5 !== undefined ? { inferredSite: f5 } : {}), ...(f6 !== undefined ? { origin: f6 } : {}), type: f7, loc: f8 }; return o; } case 26: {