Skip to content

Bit 0.18.0

Choose a tag to compare

@mdwekat mdwekat released this 15 Sep 14:07
a388efe

Bit 0.18.0

JSX text is now read as raw source, as SPEC 12.12 always specified. Six
characters it used to reject (', ", `, #, $ and \) are ordinary
prose again, so <p>the compiler's own suite</p> compiles. A < in JSX text
that starts no tag, as in <p>a < 3</p>, no longer hangs bit check, and
bit fmt no longer duplicates a comment written inside JSX text.

A valueless JSX attribute compiles: <input disabled /> and
<input disabled={true} /> mean the same thing, and a literal ={false} emits
no attribute at all. A non-string {expr} attribute value still needs a string,
and its diagnostic now names the "${expr}" spelling that works.

bench/cases/json allocates 1,050,001 fewer objects: an exploded enum's match
arm no longer rebuilds its payload box. Cycles fall from 1376.7 M to 1309.4 M
and the ratio against C from 4.01x to 3.82x.

A generic method calling a sibling method through its own receiver no longer
fails at link time with an undefined symbol, and append(dst, ...spread)
compiles instead of raising E0092.

pkg/web adds Ctx.bytes(body, contentType) for a body whose type is none of
text/html/json's, taking the content type verbatim and refusing an empty
one. An app-level onError now renders a route miss, where a 404 or 405
previously bypassed it and returned the framework's own body.

Every change above widens what compiles or what an API accepts. No program that
compiled against 0.17.0 stops compiling.

Fixes

  • fix: comment bytes inside jsx_text no longer duplicate on bit fmt (a6d4b34)

Compiler

  • enum eligibility + conservative isRef union for explodedWordTypes (14aaf24)
  • Honor a trailing defaulted parameter on method and constructor calls (577430e)
  • x64: lower a seq-cst atomic store to XCHG, not mov+MFENCE (b2d504c)
  • wire eligible enums into explodedWordTypes, zero-alloc match round-trip (608a4ab)
  • compiler: E0163, the literal-column compile check for pkg/orm's find chain (dbc2b03)
  • ref-payload stress coverage, and keep the two lint ceilings (604f2a1)
  • bit fmt bindArmPayloadDirect's parameter list (5b5af3a)

Runtime

  • serialise the chan reserve bump and bound the registry scan (f2c1c0f)

Tests

  • Add timerstress golden fixture for (20000-timer RSS bound) (4c4c3b6)
  • Add BIT_GC_NO_CONSERVATIVE_SCAN test mode to prove precise-rooting regressions are detectable (5ddb1dc)
  • scale test-pmaddgit's warm-cache budget by observed host load (dc4ea1c)
  • tests/bit: check_orm_bad_column, the E0163 checkercase (e23197d)
  • tests/bit: fix stale spec/SPEC.md:3505 citations shifted by the own insertion (1d7c14c)
  • a generic-receiver method can call another generic with its own T (ae93089)
  • regression test for the chan reserve alias race (e708af5)
  • lint: E0218 relation-unloaded-read, the compile-time half of the read-side check (c946213)
  • lint: E0218 anchors on the real pkg/orm API and covers hasOne/belongsTo (9c2dffc)
  • a method's receiver-merged type params reuse the receiver's own ids (7c17ac5)
  • append(dst, ...spread) lowers instead of raising E0092 (48e137c)
  • JSX text is a raw byte scan, not a lexer run (SPEC 12.12) (8ca8110)
  • Add SPEC 12.12 JSX conformance gate (tests/bit/jsxconformance.bit) (8b99e6e)
  • Desugar literal boolean JSX attributes (SPEC 12.12, ) (61e862f)
  • type an exploded enum's payload word exactly, so a match arm costs no object (4c93e98)
  • Clear three reds the drained suite found on merged main (bd43099)
  • gc-retention: re-pin json live 4200027 -> 3150026 after (dc082cd)
  • E0041 gains a note naming the "${expr}" spelling for a JSX attribute value (9ce5a8c)
  • benchgate: re-baseline json after , and put "json" back in flipDebt() (8da8572)
  • parseJsxChildren carries its own byte cursor, so two text runs in a row terminate (0467fc2)
  • benchgate: re-baseline sort and trustcache objects, restoring sort's flip comparison (68e32a1)

Documentation

  • pkg/orm: the schema builder — tables, columns, indexes and constraints as an intent tree (923ad31)
  • pkg/orm: document the schema builder per docs/STYLE.md (f689afe)
  • pkg/orm: the find chain builder (1725837)
  • pkg/orm: fix E0092 lowering failure in Query terminals, add tests (f4bb9ea)
  • spec/SPEC.md: document pkg/orm's find chain and E0163 (d55e531)
  • pkg/orm: docs/query.md, the find chain chapter (6549d52)
  • pkg/orm/docs: stop re-importing a name already imported on the page (3c761fa)
  • pkg/orm: add save, delete and upsert (a28d1af)
  • pkg/orm: document save, delete and upsert (e39ba3b)
  • pkg/orm: render the schema tree to Postgres DDL behind SchemaDialect (5655e7f)
  • pkg/orm: typed constraint-violation errors via SQLSTATE (1bb4b38)
  • pkg/orm: add the update/delete patch builder (1c389c7)
  • pkg/orm: insertAll (chunked bulk insert) and after() keyset pagination (8648851)
  • pkg/orm: docs for insertAll (bulk insert) and after() (keyset pagination) (9648bcd)
  • pkg/orm: @timestamps filling createdAt on insert and updatedAt on every write (eb6a1b2)
  • pkg/orm: hasMany/hasOne/belongsTo relations and eager loading via with() (6f676e3)
  • pkg/orm: @softDelete — delete marks instead of removing, every read excludes it (45309cb)
  • pkg/orm: wire the soft delete into with()/after() now that have landed (b26508e)
  • orm: split Dialect (schema-render interface) from UpsertDialect (enum) (f0ada7f)
  • orm: fix stale SchemaDialect name in write.bit's UpsertDialect comment (83f8ae9)
  • Document JSX's required elem/attr/frag import (fa19926)
  • app-level onError now renders a route miss, not just a raised failure (847c29c)
  • add Ctx.bytes() for a body with an arbitrary Content-Type (34a812d)

Build and tooling

  • stage0: repin the oracle to 0.17.0, clearing the JSX lag (a64b98f)
  • scripts: both hardware gates died at exit 141 reading the stage0 pin (0bfe144)
  • test-schedbench states which compiler built its linked libbitrt (419f503)
  • gatesexec: report which compiler built libbitrt.a for test-benchgate (1dce643)
  • register test-jsx-conformance gate, fix trailing-newline comparison (b81976c)

Benchmarks

  • bench: regenerate README/RESULTS/history for 0.18.0 on a solo box (5fbb034)

Artifacts

Published for x86_64-linux, aarch64-linux and aarch64-macos.
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.17.0..HEAD