Skip to content

Bit 0.32.0

Choose a tag to compare

@mdwekat mdwekat released this 28 Sep 04:58
· 1274 commits to d13a8daf9505f438586c7ee82eb5e2220a294c40 since this release
5c81553

Bit 0.32.0

Breaking changes

  • std/sql: Value has a new Bool variant for databases with a native boolean wire type. A match over Value that lists every variant needs a Bool arm (#6154).
  • std/tls: TrustStore moved to std/crypto. Import it from std/crypto; std/tls no longer exports one (#6155).
  • std/websocket: Conn.nc is now std/http's byte stream instead of a NetConn, so a WebSocket runs over TLS as well as plain TCP, and the Conn.useDeadline field is gone (#6172).

Features

  • feat(compiler,runtime): gate the append fix behind BIT_APPEND_FRESH (epic ) (16663d1)
  • feat(sql): add Value.Bool for Postgres' native boolean wire type (4f90ea3)

Fixes

  • fix(opt): root keepalive bases across block-param edges under BIT_DCE_PARAMS (53ee669)
  • fix(pkg/auth): requireAuth double-regenerates and never saves the session (9fdf82d)
  • fix(runtime): append on a non-null slice no longer aliases the caller's header (fc935f2)
  • fix: pkg/orm live-proof fixtures use the pre-'=' colon field-init spelling (7c21fce)

Performance

  • perf(compiler): recover the single-use append fast path, safely (95b3c0b)

Compiler

  • Repin stage0 to 0.31.0; delete BIT_IFACE_SIG/BIT_BCE_JOIN/BIT_JSON_APPEND; flip BIT_STATIC_CONST on (e26a926)
  • Add the bare map literal {k: v, ...} (SPEC §12.3/§15.2, ) (cf4ae15)
  • lower e.(EnumType) for a boxed enum target (E0092) (d8f2e32)
  • check zero-value existence after satisfiability, not before (2b2dc87)
  • Gate the bare map literal behind BIT_MAPLIT and check every entry (eb711e2)
  • identify a boxed-enum assert target by TypeId, not by name (d0659e9)
  • Fix: a bare slice literal only checked its first element (cb86998)
  • ELF dead-strip must close over force-kept .data/.bss/.tls relocs (a18c289)
  • Fix batch-gate reds: one TypeInfo writer for all three emitters, split vTypeAssert, bundle runRejected's expectation, Pool doc headings (1c41bab)
  • Point the vSweepContainerLits citations at validateexpr.bit, where it is declared (8071915)
  • compiler: @job("name") class attribute (06e9fec)
  • compiler: explode a generic instance's arguments from its substituted types (648692e)
  • compiler: hold lowerexplode.bit and lowerFuncNamed under their line limits (3d8bff8)
  • compiler: emit only the method-table slots some site dispatches to (23b9603)
  • compiler: BIT_DCE_METHODS gates method-table slot pruning, default off (331f05f)
  • compiler: parse static fn class methods behind BIT_STATIC_METHODS (4c7ee39)
  • compiler: ClassName.m()/T.m() call resolution, lowering, interface static requirements (662c86e)
  • compiler: reject an interface with a static requirement as a value type (E0170, ) (3825081)
  • compiler: pin a class member's merged-generics span to its own site (82c494a)
  • compiler/parsertype.bit: trim the new comments under the 800-line ceiling (2d26aaa)
  • Fix the reds the merges left on main (7c51494)
  • Drop fn from static class methods, reject static fn with a hint (798ec32)
  • Fix bit fmt silently dropping static from an interface requirement (842cf0e)
  • compiler/parserstatic.bit: bit fmt the rejection predicate (test-fmt-strict) (df32203)
  • pe linker must close over force-kept .data relocs (311b1f2)
  • seed the PE dead-strip walk with the force-kept data atoms instead of a second pass (14207f5)
  • fix undeclared mi left by the force-keep loop removal, ratchet down debt (5baf145)

Runtime

  • runtime/gc: keep gcHeapAlloc's cache hit free of frame spills (25d7bd9)
  • runtime/gc: allocObject calls gcHeapAllocUncached directly when unarmed (d63eef9)
  • std/os: waitForSignal(sigs) delivers SIGTERM/SIGINT to Bit code (a1738e2)
  • Windows console-control handler, docs and gate wiring for std/signal (8f6fa54)
  • Fix pollfree/docs gate findings; document an unresolved x86_64 race (5278374)
  • Fix the real x86_64 crash: non-naked sigReturnTrampoline + missing SA_ONSTACK (a259883)

Standard library

  • stdlib/sync: hoist a generic Pool out of stdlib/sql/pool.bit (5dd4c94)
  • stdlib/http: bounded-memory streaming request/response bodies (e5dabe6)
  • Move waitForSignal to std/signal; add Windows and an automated gate (ecf356c)
  • std/http: reason() names every RFC 9110 status, plus 429/431 (311e8c4)
  • stdlib/http3 drain-capable server so TlsServer.shutdown() finishes HTTP/3 too (f63aac4)
  • genericize std/websocket's Conn to std/http's byteStream (TLS support) (52676ee)

Tests

  • Fix SPEC.md:3676 citation drift in check_match_arity fixtures (95daf2e)
  • Fix citation drift from the BIT_MAPLIT SPEC.md edit (d539969)
  • checker-diag cases for the slice-literal join hole (ef2a8dc)
  • (integrator review): judge every container literal once, not per consumer (57dd9c7)
  • test-package-docs: scan pkg//guides/*.md and honour doctest deps directive (55e787d)
  • compiler: SPEC.md §10.5 for @job, fix citation drift and checker-diag fixtures (5d786a5)
  • spec: SPEC.md 10.4.1 Static Methods, interface static requirements (2dac01d)
  • docs: SPEC §10.6 names E0170, docs/reference/static-methods.md (1429504)
  • clicmd: bit fmt the nested-project check added by fixmain-6062 (ead338a)
  • Fill any unfilled defaulted parameter in a named-argument call (45f8bd1)
  • pkgdocsgate: port docs.bit's marker (56ff6cf)
  • Fix fallout from: JSX props diagnostic + SPEC.md citation drift (cdd22c4)
  • record a compiler-known field attribute even when its name resolves (6b6bc81)
  • test(gc): re-pin gc-retention baselines for the extra header allocation (7d0d42e)
  • Fix gate fallout from the SPEC.md edit and parsertype.bit growth (53c0b54)
  • releasesurface: name every symbol by its first token, so an enum that gains a variant reads as changed (bf622b0)

Documentation

  • pkg/redis: add RedisError, a typed error enum (07c2702)
  • pkg/redis: RESP3 decoder alongside RESP2 (fa45b7a)
  • docs/stdlib/sync.md: document Pool (3df79b7)
  • pkg/redis: connection core (URL parsing, HELLO/AUTH handshake, pooled Client) (f563527)
  • pkg/redis: uri.test.bit for parseUrl (1a71bf3)
  • pkg/redis: fix 4 bugs the live gate caught, fmt, and split shapeName (99dcf25)
  • pkg/redis: update docs to open()/connect(Options), RedisError (9a5fc25)
  • pkg/redis: Cmd command architecture, typed handle scaffold (d989f83)
  • pkg/redis: typed transaction results, one shared Batch for Pipeline+Tx (59300a3)
  • pkg/redis: tx.read runner abstraction + counter.bit reference family (e1321ab)
  • pkg/toml/bench: Rust toml/toml_edit, toml++ and tomlc17 peers, a service-config fixture, a sub-ms timer (3b923e2)
  • pkg/yaml/bench: widen the peers to libyaml, rapidyaml, saphyr and yaml-rust2, add a features fixture (06185de)
  • Inkwell: config.bit and db.bit (pool + migration registry) (a70d4e0)
  • Inkwell: users.bit (User entity, GET /users/:id) (84f0673)
  • Inkwell: auth.bit (register/login/logout, authorization helpers) (bc1da79)
  • Inkwell: tags.bit (Tag entity, list/create), auth.bit requireAdmin (e157f3e)
  • Inkwell: articles.bit (CRUD, relations, pagination/filter/sort, transactional create) (a04a68d)
  • Inkwell: comments.bit (list/create/delete, nested under an article) (1d46fec)
  • Inkwell: main.bit (middleware, boot, health/ready); fix db.bit revert type (66deb9c)
  • Inkwell: app.test.bit integration tests over app.handle() against real PostgreSQL (617f4d3)
  • pkg/yaml/bench: time each run with a microsecond clock, not time -l's 10 ms real (50e5be7)
  • pkg/web: App.serve() graceful shutdown, App.listenTls()/serveTls() for TLS+HTTP/2+HTTP/3 (d7a5834)
  • pkg/auth: TOTP (RFC 6238) over HOTP (RFC 4226) for two-factor auth (dcc4cd0)
  • pkg/s3: SigV4 request signing, checked against AWS's own test suite (06d9c32)
  • pkg/web/docs: document App.serve()/shutdown() and listenTls()/serveTls() (7dcac0f)
  • pkg/yaml/bench: name the zigbuild image knob BENCH_ZB_IMAGE, as pkg/toml/bench does; describe the timer (ba9bc78)
  • Inkwell: work around 3 confirmed pkg/orm/pkg/auth/compiler bugs, all 9 integration tests green against real Postgres (b9d85b7)
  • Inkwell: bit fmt canonical reflow; drop an unused (uv, ok) binding in auth.bit (249fb7f)
  • pkg/s3: Config/Client and put/get/head/delete over SigV4 (486fd20)
  • pkg/s3: ListObjectsV2 as a paginated iterator (b83c3f0)
  • pkg/web: hijack path for WebSockets, SSE and streaming (63bdc1c)
  • pkg/web: add idempotency-key middleware (9e29d18)
  • pkg/s3: presigned GET/PUT URLs (a560889)
  • pkg/redis hash.bit: every hash command, including field expiry, through the Cmd pattern (20ae8c8)
  • pkg/s3: multipart upload, the three-call shape (b243ee4)
  • pkg/redis hash.bit: rename scan's match param to pattern, a reserved word (742c753)
  • pkg/redis zset.bit: sorted-set commands through the Cmd pattern (a194b95)
  • pkg/s3: README, docs guide, and field-export fixes (d27f6c9)
  • pkg/redis zset.live.test.bit: live acceptance for every sorted-set command (209cce5)
  • pkg/web: static() and fileRes() support HTTP Range requests (53f4797)
  • pkg/web: one serving path for hijack, chosen at freeze() (8e14dc1)
  • pkg/redis zsetcmd.bit: decode RESP3's nested [member,score] pairs for WITHSCORES (e9a2df1)
  • pkg/redis hash.bit: fix HSETEX wire syntax, interpolation, fmt and E0214 (e979866)
  • pkg/s3: listPaged (max-keys) and putStream/getStream (641561f)
  • pkg/orm: fix save()/upsert() vs Postgres GENERATED ALWAYS AS IDENTITY, with() skipped by one()/oneOrFail() (c5e5543)
  • pkg/redis docs/sorted-sets.md: the sorted-set guide page (36039f4)
  • pkg/orm/write.test.bit: add a live-Postgres integration test for (5ae1967)
  • pkg/web/bench: fold the pinned, quiet-checked method into run.sh and regenerate at 920274f (ab6842f)
  • pkg/s3: live gate against SeaweedFS, RSS-proven streaming (975ac89)
  • pkg/web: fix E0067 in realtime.bit, finish docs for the single serving path (95a09f4)
  • pkg/s3: live tests skip cleanly without a server, not panic (aa9a964)
  • pkg/redis strings.bit and keys.bit: SET options, MGET/MSET, GETEX/GETDEL, ranges; key TTLs, TYPE, RENAME, COPY, SCAN iterator (97166e3)
  • fix strings-and-keys.md doctest failures and a flaky live LT test (57a8c9f)
  • pkg/orm/write.bit: exclude relation fields from save()/upsert()/update() column lists (08410eb)
  • pkg/orm/bulk.bit: exclude a sole database-generated @id from insertAll() (84fca59)
  • pkg/orm/lock.bit: run with()-requested relations through LockedQuery's terminals (4cae6b4)
  • pkg/orm/docs/timestamps.md: bind personValues(p) once in savePerson (f2d4200)
  • docs/stdlib/http.md: document the streaming client (BodySource, BodySink, requestWithStreamingBody, getStreaming) (5259b15)
  • Guides course: README index and parts 1-3 (first endpoint, routing/groups, validation) (eac38f0)
  • pkg/web/guides: parts 4-6, errors and consistent responses, configuration, connecting to PostgreSQL (857a9e0)
  • Guides course parts 7-9: tables/migrations, CRUD, relationships (pkg/orm) (8bb86f3)
  • Guides parts 7-9: fmt fix for 4 bit fmt-reflowed composite literals (793527e)
  • Guides part 7: replace em dash in captured Postgres log line (ae7af79)
  • Guides course writer D: parts 10-12 (registration, sessions, authorization) (b6c0d75)
  • Guides course: parts 13-15 (middleware, pagination/filtering/sorting, transactions) (08fe583)
  • Guides course parts 16-18: testing, operations and shipping (6031af3)
  • guides: link parts 7 and 9 to parts 6 and 10 now that all 18 parts are on one branch (0eddfba)
  • pkg/orm: bit fmt query.bit and relation.test.bit (6e904fe)
  • Inkwell full-text search, soft-deleted articles, optimistic locking (0e2196d)
  • pkg/web: autosave a dirty session at end of request (a77cc75)
  • a keep-alive-capable hijack primitive in stdlib/http (77f443d)
  • Inkwell JWT bearer tokens, refresh-token rotation, Sign in with Google (65afd1f)
  • pkg/kv, pkg/orm, stdlib/sync: restore comments the buggy formatter moved (7e77a6d)
  • pkg/orm: SoftQuery(...).with() loads a @belongsTo relation externally (8fe4032)
  • docs/stdlib/http.md: document the HijackOutcome/serveHijackableOn(Background)/Exchange.respondKeepAlive (e081894)
  • red/green test for accept()'s per-stream refusal; Listener.stopAccepting (c3114f7)
  • pkg/orm schema DSL: GIN/GiST/hash/brin indexes, expression/partial indexes, generated stored columns, tsvector + toTsvector() (28754e0)
  • guides: status lines carry their RFC 9110 reason phrases now that landed (7f3e1ed)
  • Unify std/tls and std/crypto TrustStore into one type (b7e0e32)
  • TlsExchange + TlsServer.accept() for TLS+HTTP/1.1 hijack (425e7e1)
  • docs(sql): the freeze essay now says Value gained Bool, and why (2f4f6b5)
  • revert pkg/web/middleware.test.bit to main (38dca12)
  • Fix the reds the 0.32 batch merges left on main (9047ce6)

Build and tooling

  • x64gate: take /tmp/benchlock on the host for every run, so no caller can skip it (41af2a3)
  • BIT_STATIC_CONST back to default off: the ELF writer cannot fix up the static cell yet (23c8ab6)
  • pkg/redis: add a Docker-provisioned live test gate (e5a8225)
  • reject a boxed-enum assert target with no zero value; add gate (005a6d6)
  • Add test-web-guides-app Gate{}: provisions postgres:18.6 in Docker for Inkwell's integration tests (753a96c)
  • tests: test-genericexplode pins BIT_GENERIC_EXPLODE=1 against a flag-off control (0c6ae0d)
  • Split the gate table past 800 lines; bit test stops at a nested bit.json (97e841c)
  • tools/build/lint-debt.txt: drop stale stdlib/http/http.bit E0204 entry (a21c50f)
  • tools/build: move the standalone steps to defssteps.bit (defs.bit hit 800 lines) (e5e011a)
  • complexity-debt: retire stdlib/http/http.bit reason, moved to reason.bit and split by (2e70476)
  • selfhost-ir-signatures: explain the fmt delta against the pinned 0.31.0 formatter (1e742ff)

Benchmarks

  • bench: regenerate for 0.32.0 (7066b5d)

Artifacts

Published for aarch64-linux, aarch64-macos, x86_64-linux and x86_64-windows.
See dist/README.md for the full target table, the archive layout,
the required BIT_STDLIB/BIT_LIBBITRT environment, and the
SHA256SUMS format.

Verify a download before running it:

sha256sum --check --ignore-missing SHA256SUMS   # shasum -a 256 on macOS

Full commit log: v0.31.0..HEAD