chore(deps): bump @juspay/rescript-bindgen to ^1.4.0-beta.1 + regenerate - #142
Merged
Conversation
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-bindgen^1.4.0-beta.0→^1.4.0-beta.1and regenerates.Regenerated against the current pin
@juspay/blend-design-system@0.0.37, so this diff is the bindgen delta alone — no blend changes mixed in. #141 (blend0.0.38-beta.0) can rebase on this and show a clean blend-only diff.Is this an improvement?
Yes, and measurably. beta.1 is eight correctness fixes, no new surface. Two close defects this repo has already been bitten by:
*Types.rescould both defineValue; where the expected type isn't known ReScript silently binds the last one. In blend this hitHighchartsSharedTypes.Point—"point"vs"Point", which Highcharts treats as case-sensitive — and broke the portal dashboard migration (#133).Plus #175 (
void/undefined→unit, not a deadstring), #186 (views modules were write-only for some arms — 95 readers added), #181, #177, and entry-lifecycle #179/#180/#182.Verification
rescript format -cclean.⚪ loosefields removed, 0 added:undefined, 18 werevoid— both emitted as a deadstring, nowunit. Anything passed there never reached the library.ColumnDefinition<T>degraded to'a, now the realcolumnDefinition_t(#177 — two instantiations of one generic are two types, rather than one record lying about both).[#flex],[#center],[#auto]).⚠️ REVIEWplaceholders unchanged at 93.@as("…")literals acrosssrc/is byte-identical before and after, except@as("type")225 → 235, which is exactly the 10 new per-armColumnDefinitionrecords. No emitted string moved.Breaking — at ReScript call sites only, never at runtime
HighchartsSharedTypes:Solid→SolidStyleValue/SolidShapeValue,Point→PointConstructorType/PointObjectScope/PointPointArray,Pointer,Polygon,Series,TriangleDown,Value.DataTableTypes:DateRange→DateRangeColumnType/DateRangeTypeType/DateRangeFilterComponent.EditorSharedTypes: 12 groups. Full list insrc/_REPORT.mdunder 🔤.stringare nowunitor a polyvar, so a call site passing a string there becomes a compile error. That code was already broken; this turns a silent runtime no-op into a loud one.145 same-value collisions are reported but deliberately not renamed — they resolve to the same runtime shape either way, so renaming would churn consumers for no correctness gain. New 🔤 section in
src/_REPORT.mdlists them.Reviewer checklist
npm run buildgreen (CI blocks otherwise)src/_REPORT.md— 0 broken; skim the new 🔤 collision sectionVersion intentionally left at
0.0.37-1— matching #139, where the bindgen bump carried no version change and the release commit handled it separately.🤖 Generated with Claude Code