chore(deps): bump @juspay/rescript-bindgen to ^1.4.0-beta.0 + regenerate (@tag variants) - #139
Merged
Merged
Conversation
1.4.0-beta.0 ships #167/#169: a nested discriminated union now maps to a `@tag` variant instead of a flattened record. - DataTableTypes.rowAnimationConfig: record -> @tag variant. Closes the binding half of #134 — `Bezier` can no longer be constructed without its curve, so the DataTable crash is now a compile error rather than something the library's runtime guard has to absorb. - MenuV2Types.menuV2FlatRow: 6 `%identity` externals + 3 per-arm records -> one matchable variant; retires 3 `⚪ loose` `type_` fields. Reading an arm was an unchecked cast; it is now compiler-verified. - BlendDesignSystemBindings.flattenMenuV2Groups returns the variant. - 3360 -> 3356 shared types. Buckets unchanged: 226 components, 219 usable, 7 review, 0 broken. All 305 modules compile. src/ is byte-identical to the pkg.pr.new build of #168 that was tested in #138, so the published beta reproduces exactly what was reviewed. BREAKING for consumers of both types — `rowAnimationConfig` is no longer a record, and `MenuV2FlatRow.t` with its from*/as* externals is gone. Known issue in this beta, NOT triggered by blend: a self-referential discriminated union (`type T = {kind:'leaf',…} | {kind:'branch', children: T[]}`) recurses without bound and the component is dropped from the output with only an `extract-error` line. blend has recursive types (MenuItemType.subMenu) and discriminated unions (MenuV2FlatRow) but never both in one type, so nothing here is affected. Verified still present in 1.4.0-beta.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`git add -A` in the bump commit swept in `.claude/worktrees/feat+figma-code-connect` as an embedded-repository gitlink (mode 160000). That is local Claude Code state, not repository content, and a gitlink is unusable to anyone cloning. Net effect across the branch is nil — the squash merge sees only the intended 6 files. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 6, 2026
jagguji
added a commit
that referenced
this pull request
Aug 12, 2026
…ate (#142) 1.4.0-beta.1 is eight correctness fixes on top of beta.0. Two of them close defects this repo has already been bitten by: - #171 constructor-name collisions put the WRONG string on the wire. ReScript scopes variant constructors per module, so two enums in one *Types.res could both define `Value`; where the expected type isn't known ReScript silently binds the last definition. In blend this hit HighchartsSharedTypes.Point ("point" vs "Point" — Highcharts treats these as case-sensitive) and broke the portal dashboard migration (#133). 16 collision groups are now renamed by their owning type; 145 same-value collisions are reported, not renamed. - #170 self-referential discriminated unions crashed extraction and the affected components vanished from the output with no report entry. This was called out as a known issue when #139 landed beta.0; it is fixed here. Also #175 (void/undefined leaves map to unit, not a dead string), #186 (views modules were write-only for some arms — 95 readers added), #181, #177, and the entry-lifecycle fixes #179/#180/#182. Regenerated against the current pin, @juspay/blend-design-system@0.0.37, so this diff is the bindgen delta alone with no blend changes mixed in. Buckets unchanged: 226 components, 219 usable, 7 review, 0 broken. Same 7 components in review as before. 3356 -> 3365 shared types. All 305 modules compile; rescript format -c is clean. Typing strictly improves — 362 `⚪ loose` fields removed, 0 added: - 330 were TS `undefined` and 18 were `void`, both emitted as a dead `string`; they are now `unit`. Anything passed there never reached the library. - 10 were `ColumnDefinition<T>` degraded to `'a`, now the real `columnDefinition_t` (#177 — two instantiations of one generic are two types, instead of one record that lied about both). - 3 single string literals became polyvars (`[#flex]`, `[#center]`, `[#auto]`). `⚠️ REVIEW` placeholders unchanged at 93. Runtime wire format is provably unchanged: the multiset of `@as("...")` literals across src/ is byte-identical before and after, except `@as("type")` 225 -> 235, which is the 10 new per-arm ColumnDefinition records. No emitted string moved. BREAKING at ReScript call sites only, never at runtime: - Renamed collision constructors, e.g. HighchartsSharedTypes `Solid` -> `SolidStyleValue`/`SolidShapeValue`, `Point` -> `PointConstructorType`/ `PointObjectScope`/`PointPointArray`, DataTableTypes `DateRange` -> `DateRangeColumnType`/`DateRangeTypeType`/`DateRangeFilterComponent`. - Content-hashed shared type names churn where content changed (14 names retired, 51 added) — the hash follows the content by design. - Props that were a dead `string` are now `unit` or a polyvar, so a call site passing a string there becomes a compile error. That code was already broken; this converts a silent runtime no-op into a loud one. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
@juspay/rescript-bindgento^1.4.0-beta.0and regenerates.The beta ships juspay/rescript-bindgen#168 (issues #167/#169): a nested discriminated union now maps to a
@tagvariant instead of a flattened record.Changes — 6 files, +37/−50
DataTableTypes.rowAnimationConfig— record →@tagvariant:This closes the binding half of #134. The crash shape no longer compiles:
Previously
{transitionType: Bezier}with no curve compiled fine and took the DataTable down insideuseLayoutEffect. That is now a compile error rather than something the runtime guard in juspay/blend-design-system#1653 has to absorb.MenuV2Types.menuV2FlatRow— 6%identityexternals and 3 per-arm records → one matchable variant, retiring 3⚪ loosetype_: stringfields. Reading an arm was an unchecked cast; it is now compiler-verified.BlendDesignSystemBindings.flattenMenuV2Groupsreturns the variant. Shared types 3360 → 3356.Verification
npm run generatenpm run buildsrc/byte-identical to the pkg.pr.new build of #168 tested thereThat last row matters: the published beta reproduces exactly what was reviewed and tested pre-release, so nothing changed between the PR build and the tag.
Runtime is the flat object blend reads, with the real lowercase tag:
Pattern matching compiles to a bare
cfg.transitionType === "bezier"— no wrapper, no coercion.Both types change shape.
MenuV2Types.MenuV2FlatRow.tand itsfrom*/as*externals are gone — replace the casts with aswitch.Pattern matching needs the type in scope or the constructors won't resolve:
Without the annotation: "The variant constructor Bezier can't be found." Normal ReScript behaviour for a variant from another module, but it is the first thing anyone will hit.
Known issue in this beta — not triggered by blend
A self-referential discriminated union recurses without bound in the generator and the component is dropped from the output entirely, with only an
extract-errorline:Verified still present in
1.4.0-beta.0(it was flagged during review of #168 and shipped anyway). On bindgen1.3.0the same input produces a degraded-but-present binding, so this is a regression.blend is unaffected: it has recursive types (
MenuItemType.subMenu) and discriminated unions (MenuV2FlatRow), but never both in one type. Nothing in this regeneration is impacted — which is also why a green result here is not evidence the bug is gone. Worth tracking before promoting this beta tolatest.Notes
.claude/worktreesgitlink accidentally staged in the first; net branch diff is the 6 files above.🤖 Generated with Claude Code