Skip to content

Commit c26d149

Browse files
committed
fix(ci): add libshumate-dev for ubuntu doc-tests-gtk4 (v0.5.849)
v0.5.848 cleared the webkit6 .pc miss; libshumate-sys then surfaced the next missing system dep (shumate-1.0.pc). Ubuntu 24.04 ships libshumate-dev. Pure CI-config.
1 parent c38d299 commit c26d149

5 files changed

Lines changed: 72 additions & 70 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ jobs:
710710
libgtk-4-dev libadwaita-1-dev xvfb pkg-config \
711711
libpulse-dev \
712712
libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev \
713-
libwebkitgtk-6.0-dev
713+
libwebkitgtk-6.0-dev libshumate-dev
714714
715715
- name: Surface Android NDK location (for cross-compile)
716716
if: matrix.os == 'macos-14' || matrix.os == 'ubuntu-24.04'

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Detailed changelog for Perry. See CLAUDE.md for concise summaries.
44

5+
## v0.5.849 — fix(ci): add `libshumate-dev` to ubuntu-24.04 doc-tests-gtk4 apt step. v0.5.848 fixed the webkit6 .pc path; gtk4 doc-tests-gtk4 then surfaced the next missing system dep — `libshumate-sys`'s build script wants `shumate-1.0.pc`. The libshumate crate is the GTK4-native vector-tile map widget (perry/ui MapView, #517). Ubuntu 24.04 ships `libshumate-dev`. Pure CI-config; no runtime change.
6+
57
## v0.5.848 — fix(ci): swap to `libwebkitgtk-6.0-dev` for ubuntu-24.04 doc-tests-gtk4. v0.5.842 added `libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev` to the gtk4 doc-test apt step, but `webkit6 = "=0.4"` (perry-ui-gtk4 #658 WebView) pulls `javascriptcore6-sys` which needs `javascriptcoregtk-6.0.pc` AND `webkitgtk-6.0.pc` (the API rename — 4.1 dropped the "2"). Ubuntu 24.04 noble ships `libwebkitgtk-6.0-dev` which provides both .pc files. Pure CI-config; no runtime change.
68

79
## v0.5.847 — fix(runtime,codegen): two numeric-coercion-at-the-boundary bugs surfaced together while probing real-app patterns. **Bug 1 — `isNaN("1")` returned `true`, `Number.isFinite("1")` returned `true`.** Both forms of these globals exist (`isNaN` / `Number.isNaN` and `isFinite` / `Number.isFinite`); they differ in coercion: the bare global coerces via ToNumber, the `Number.`-prefixed variant is strict (any non-Number → false). Pre-fix the codegen at `crates/perry-codegen/src/expr.rs:5186` lowered `Expr::IsNaN` to an inline `fcmp uno x, x` (true iff either operand is NaN by IEEE 754 unordered compare). That idiom is correct for raw numbers, but every NaN-boxed Perry value (strings, pointers, undefined, null) HAS a NaN bit pattern by construction — `isNaN(any-non-number)` was unconditionally true. Separately the `Expr::IsFinite | Expr::NumberIsFinite` arm at line 5594 merged both forms and called `js_is_finite` (coercing), even though the runtime already had a separate strict `js_number_is_finite` (`builtins.rs:1755-1769`) that codegen never called. **Bug 2 — `"abc".padStart(-1, "_")` allocated 4+ GiB of underscores before OOM-killing the process.** Same shape, different boundary: the codegen at `crates/perry-codegen/src/lower_string_method.rs:387` lowered the target-length f64 via `fptosi(DOUBLE → I32)` — LLVM's `fptosi` is undefined behavior on NaN/Infinity and varies by platform; on macOS aarch64 a literal `NaN` constant-folded to a positive INT_MAX-ish value. The runtime signature took the result as `u32`, so any negative i32 (`-1`) reinterpreted to `0xFFFFFFFF` (~4 billion), the `current_len >= target_len` guard fell through unconditionally, and the loop ran 4 billion iterations of `push_char`. **Fixes.** (a) Split the merged `Expr::IsFinite | Expr::NumberIsFinite` arm into two arms; route `IsFinite` → `js_is_finite` (coercing), `NumberIsFinite` → `js_number_is_finite` (strict). (b) Rewrite the `Expr::IsNaN` arm to call `js_is_nan` (coercing) instead of the inline `fcmp uno`. `Expr::NumberIsNaN` was already correct. (c) Change `js_string_pad_start` and `js_string_pad_end` runtime sigs from `u32` to `f64`; drop the codegen `fptosi`+I32 step and forward the DOUBLE through. New runtime helper `to_length_clamped` applies ToLength semantics: NaN / ≤ 0 → 0, Infinity / huge values → a 1 MiB cap (saner than the spec's 2^53-1 — protects against pathological inputs without breaking real-app use). **Validation.** Probes byte-identical to Bun: 15-case `/tmp/probe_isfinite.ts` (all four isNaN/isFinite variants × number/NaN/Infinity/string/bool/null/undefined inputs); 7-case `/tmp/probe_pad_neg.ts` + 3-case `/tmp/probe_pad_nan.ts` (literal/dynamic neg/NaN/Infinity for both padStart and padEnd). 26/28 gap parity tests pass. Same worktree branch as v0.5.838 (`worktree-claude-array-followups`); renumbered through v0.5.842→843→844→845→847 on successive rebases as Ralph's CI / perf / msg_send! / cargo-fmt commits kept landing in parallel.

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
88

99
Perry is a native TypeScript compiler written in Rust that compiles TypeScript source code directly to native executables. It uses SWC for TypeScript parsing and LLVM for code generation.
1010

11-
**Current Version:** 0.5.848
11+
**Current Version:** 0.5.849
1212

1313

1414
## TypeScript Parity Status

0 commit comments

Comments
 (0)