Skip to content

Lasm 0.3.2

Choose a tag to compare

@github-actions github-actions released this 27 Oct 13:30
· 65 commits to main since this release
11572b4

Lasm 0.3.2

A patch release that fixes how deployed programs handle Std.Internal.UV
sockets, timers and signals, so that they match native Lean 4.35. Upgrade with
npm install -D @lasm/cli@0.3.2. Nothing changes in how programs build.

Fixes

  • A second accept on a TCP socket fails at once. Before, it returned a
    promise that later failed with a different error. It now fails with the same
    error native Lean gives (otherError, EALREADY).
    • The same applies to tryAccept, which now reports failures as IO errors, not
      inside its Except result.
  • accept on a socket that is not listening fails at once with
    invalidArgument ("socket is not listening"). It used to fail only later.
  • Std.Internal.UV.Loop.alive and Loop.configure work. alive used to
    stop the program and configure used to fail with "not supported". alive
    returns true, as native Lean 4.35 does, and configure succeeds.
  • Cancelling no longer stalls other asynchronous work. Cancelling or
    stopping an operation drops its pending promise:
    • The operations: Timer.stop/cancel, Signal.stop/cancel,
      TCP.Socket.cancelAccept/cancelRecv and UDP.Socket.cancelRecv.
    • The promise is now released on the thread that cancels, after the handle is
      unlocked, as libuv does.
    • Before, a (sync := true) continuation on that promise ran on the thread
      that completes every asynchronous operation. A continuation that blocked
      there held up every timer and socket.
    • Before, a continuation that stopped the same timer or signal again
      deadlocked.

These behaviours are pinned by Lean 4.36's new upstream tests (elab/uv_*,
compile/uv_*). Where Lean 4.36 changes behaviour on purpose, Lasm keeps
Lean 4.35's for 4.35 and switches when it moves to Lean 4.36:

  • truncated UDP datagrams fail with EMSGSIZE;
  • System.osHomedir and System.osTmpdir return values longer than PATH_MAX;
  • cancelled signal waiters keep listening.

Runtime

The Node runtime is 79968781… (CI build 40471483055). Only the event-loop
object and the host bridge changed, and no initialization path changed. The edge
runtime is rebuilt on it (lean-4.35.0-edge-v3). See docs/DECISIONS.md
(2026-10-27).