Skip to content

Release v0.4.21: Node 22 full-ICU binary build (#132)#141

Merged
thiagoralves merged 6 commits into
mainfrom
development
Jun 1, 2026
Merged

Release v0.4.21: Node 22 full-ICU binary build (#132)#141
thiagoralves merged 6 commits into
mainfrom
development

Conversation

@thiagoralves

Copy link
Copy Markdown
Contributor

Promote development to main for the v0.4.21 release.

Highlights:

Tagging v0.4.21 after this merges kicks the release build.

🤖 Generated with Claude Code

marconetsf and others added 6 commits June 1, 2026 09:29
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>
@thiagoralves thiagoralves merged commit 769a67e into main Jun 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants