Repository navigation
v0.5.6
Install: curl -fsSL https://strata-lang.dev/install.sh | sh (macOS arm64).
A bug-fixing release, plus §7 and §9 of SPEC.md from the lab.
Breaking changes
- Conversions return
Result[_, OutOfRange]instead of failing (#777). std's 116 conversion sites are moved. panic(message)is an obligationverifymust prove unreachable (#777). Shifts and rotations are total.- std.http's
servetakes aClock.serve_limitedalso takesServerLimits: by default 256 connections, 30 s to read a request and 30 s to send a response (#757). - A
pubdefinition may name onlypubtypes (#782), and a module shadowing one of core's names gets a warning. Warnings come only from the package's own code (#786). - In a contract, the result is
it.resultis an error (#756). - Nesting deeper than 1000 levels is a parse error, not a stack overflow (#779).
- A root type named like a module is an error (#779).
- Derived copies end in 8 hex digits instead of a running number (#769).
Verification
- Fixed proofs of false facts:
- two traits with the same short name were mixed up;
- a structural bound was read as a closed record;
- code points past U+1FFFF were modelled as themselves;
- a function value given to a builtin wasn't checked against its parameters;
- a function value that can be given itself was shown to terminate (#747, #774).
- Compile-time values are keyed by their decoded code, and scratch files by SHA-256 (#747).
- Now proven where they were unknown:
verify --terminationonmarkdown.*takes 2 s, not 95 s (#772).
Checker and front end
- Contracts are type-checked in the function's scope, and trait contracts and provided bodies too (#756). So
ensures n == "x"on anIntis an error. - One type-table builder replaces nine (#756).
- Union coverage tells
Option[Int]andOption[Float]apart, and integer patterns work past 2^62 (#756). - Core's names are matched by full path in handlers, faults, error labels, std.ffi and capabilities (#748, #776).
- A spawn inside a written
maplambda in ascopeis refused; comprehensions that spawn still run (#776). - Use before import is an error (#761).
- Columns count characters after strings, doc lines keep their indentation, and
comptimeis folded in contracts (#761). viewof deep code takes memory linear in its size: 70 MB at 300 levels, against 2 GB (#779).
Codegen, runtime and std
- Fixed crashes:
- Fixed leaks: trait default methods without written types, and
strata_host_run's arguments (#757, #776). - §9 concurrency (#771):
- resources carry a duty to close;
selectsend arms bind aResult;- adds
Replyand std.actor; - task stacks;
- six listener leaks fixed.
- std.toml skips a byte-order mark (#757).
Tools
verifychecks every selector given (#769).--helpworks on every command, andinit --helpno longer makes a package (#769).- The skill text is built from
strata help(#769). - The merge driver keeps the bytes of definitions it doesn't change (#769).
docs/stdis regenerated (#769).- A fault while the runtime holds a lock ends the process instead of hanging (#769).
- Editors know
blockingandnoalloc(#769).
Known
std.web.Htmlcan be built around its name checks again:std.web.Nodebecamepubin #782 (BUGS.md, std). A fix needs a way for apubtype to keep its contents private.- The runtime is macOS arm64 only.