Release v0.4.21: Node 22 full-ICU binary build (#132)#141
Merged
Conversation
Overloaded standard functions (NOT, AND, OR, ADD, ...) are published in the builtin stdlib manifest with their generic return *constraint* (e.g. NOT -> ANY_BIT). inferFunctionCallType resolved a call via the symbol-table lookup first, returning that generic group type and never reaching the std-registry logic that applies returnMatchesFirstParam. As a result ladder-generated code like 'MOVE(EN := NOT(led), ...)' failed with "'EN' input must be a BOOL expression, got ANY_BIT", since NOT(BOOL) resolved to ANY_BIT instead of BOOL. Refine a generic group return type to the concrete first-argument type when the std signature declares returnMatchesFirstParam (NOT(BOOL) -> BOOL, ADD(INT,INT) -> INT, ...). The 'is this a generic type group' predicate lives in type-utils alongside the other type predicates and the TypeCategory enumeration. Adds a regression test for EN := NOT(BOOL). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-type fix(types): refine overloaded std-function return type at call sites
The released `strucpp` binary crashed at startup (even `--version`) on
Debian 12 / Windows 10 with `ERR_ENCODING_NOT_SUPPORTED: "latin1"`. Root
cause is an environment mismatch, not the latin1 decoder itself: the code
targets Node 22 (CI uses `DecompressionStream("deflate-raw")`, Node 21.2+),
but `release.yml` built every target with the frozen `vercel/pkg` on a
node18 small-ICU base, where `TextDecoder("latin1")` throws at module load.
- Migrate `vercel/pkg@5.8.1` -> `@yao-pkg/pkg@^6.20.0` (maintained fork,
node22 full-ICU base) and retarget all builds to `node22-*`.
- Bump esbuild bundle target to node22; fix `engines` to `>=22.0.0`;
add `.nvmrc` (22) for dev parity.
- Add `scripts/smoke-test.mjs` that runs the produced binary and asserts
exit 0 on `--version`/`--help` and a trivial ST compile. Replaces the
`strucpp --help || true` checks whose `|| true` let the crash ship.
- release.yml: smoke-test every binary (no `|| true`); add a
`smoke-windows` job (the .exe is cross-built on Linux) wired into
create-release. ci.yml: add a `binary-smoke` job so PRs catch this.
`src/byte-utils.ts` is intentionally unchanged: the full-ICU node22 base
supports both `latin1` and `deflate-raw`.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…arity fix(build): ship binary on Node 22 full-ICU to match dev/CI (#132)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
chore(release): v0.4.21
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.
Promote development to main for the v0.4.21 release.
Highlights:
@yao-pkg/pkg, resolving theTextDecoder("latin1")startup crash on Debian/Windows. Adds a real binary smoke test to CI and the release pipeline (the old--help || truecheck let the crash ship).Tagging
v0.4.21after this merges kicks the release build.🤖 Generated with Claude Code