github PerryTS/perry v0.5.158

latest releases: v0.5.1167, v0.5.1166, v0.5.1159...
one month ago

Three versions' worth of fixes (v0.5.156–v0.5.158) plus the watch-mode AST cache and a perry check UX fix.

Fixes

  • --target web / WASM — five compounding bugs (#133): str.charCodeAt and other un-special-cased String.prototype methods fell through __classDispatch → undefined; Math.sin/cos/tan/atan2/exp/… returned undefined because the WASM codegen had no handlers for the trig family; arr.push(1); arr.length === 0 on top-level const arr = [] because ArrayPush/Pop/Shift/Unshift/PushSpread/Splice only looked in local_map; Firefox NaN-canonicalization stripped STRING / POINTER / INT32 tag payloads across the JS↔WASM boundary (split wrapForI64 into legacy-rt + BigInt-safe-ffi variants); INT32_TAG constants crashed wasm-bindgen with TypeError.
  • --target android — obj.field returns NaN (#128): the PIC receiver guard (#51) and .length fast-path guard (#73) both used a Darwin-mimalloc-calibrated heap-window check. Bionic's Scudo allocator places allocations far below the 2 TB floor, so every real object pointer failed. Replaced with a platform-independent NaN-box tag check — same LLVM cost, works everywhere.
  • perry check — emit file:line:column for HIR lowering errors (#129): previously every HIR-lowering error printed location-less. New LowerError type carries an Option<Span>, lower_bail! macro wraps sites, check.rs downcasts and attaches the span to the emitted diagnostic. Two sites migrated (super-prop access, binding patterns); infrastructure is in place for the remaining ~35 sites to land incrementally.
  • Release-packages await-tests gate — query by filename, stop swallowing gh errors (v0.5.156): v0.5.155's gate timed out for 45 min with [] from gh run list --workflow even though the runs existed. Swapped to gh api /repos/{repo}/actions/workflows/{file}/runs and dropped the 2>/dev/null || echo '[]' that masked real API errors. Emergency-republish workflow_dispatch bypass preserved.

Features

  • perry dev — in-memory AST cache across rebuilds (#131, PR #132, by @TheHypnoo): new path-keyed content-addressed ParseCache owned by perry dev for the watch session's lifetime. Unchanged files reuse their prior AST; byte-identical content → hit regardless of mtime. Smoke test: after editing one file, rebuild is 1/2 hit (1 miss) in 502 ms. Scope is strictly perry devperry compile and other entrypoints pass None and behave identically to v0.5.155.

Infrastructure

  • chore: gitignore benchmark binariesimage_conv, issue42_noalloc no longer surface in git status.

Full commit range: v0.5.155..v0.5.158.

Don't miss a new perry release

NewReleases is sending notifications on new releases.