Skip to content
This repository was archived by the owner on Sep 24, 2026. It is now read-only.

0.2.0 — Mojo 1.0

Latest

Choose a tag to compare

@conorbronsdon conorbronsdon released this 12 Aug 00:28
be9e1db
  • Builds on released Mojo 1.0. The pixi channel moved from
    max-nightly to max and the dependency pin from >=1.0.0b3.dev… to
    >=1.0,<2; CI installs mojo==1.0.0 from PyPI instead of the nightly
    index with --prerelease allow. The weekly drift check still runs
    against the latest nightly, so the repo still reports when the language
    moves under it. No source changes were needed.

  • README figures re-measured on 1.0: 70 → 102 tests (the errors module
    added a fifth test file), 5,400 fuzz mutations with zero crashes and
    zero hangs, and a live corpus run where all 137 feeds that fetched
    parsed without a raise, crash, or hang. The throughput range is
    restated for the machine it was re-measured on — b3 and 1.0 benchmark
    the same there, so the move is the machine, not the compiler.

  • New feed.errors module (exported from the package): line_col(source, offset) maps a byte offset to a 1-based (line, column) pair — the column
    is the 1-based BYTE offset within the line, no UTF-8 decoding — and
    parse_error(msg, source, offset) builds an Error reading
    <msg> at line <L>, column <C>: '<snippet>', where the snippet is up to
    ~30 bytes of the offending line centered on the column,
    whitespace-trimmed, with ... where truncated, and never multi-line.
    This is the error-reporting pattern shared with mojo-xml.

  • Parse errors now carry that position + snippet wherever a byte offset
    exists at the raise site: every strict-mode XML error (previously a bare
    (line L, column C) suffix with no snippet), the structural XML errors
    both modes raise (unterminated constructs / start tags / attributes /
    attribute values, unquoted attribute values, malformed start/end tags,
    empty element names), every JSON Feed syntax error, and the positioned
    date-parsing errors (offsets relative to the date string).

  • No mechanism change: parsers still raise Error(...), no new error
    types, and existing contains=-style message checks keep matching.