From 8ab5e99c1abae60a4495f2a4bfa92e37658575fd Mon Sep 17 00:00:00 2001 From: Conor Bronsdon Date: Tue, 11 Aug 2026 16:48:33 -0700 Subject: [PATCH] Migrate to released Mojo 1.0 and cut 0.2.0 Re-pin pixi to the max channel and mojo >=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. One source fix, benchmark only: perf_counter_ns() no longer returns UInt, so _report takes Int. README test counts and measured figures re-checked against a full run on Mojo 1.0. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/docs.yaml | 6 ++---- .github/workflows/test.yml | 16 +++++++--------- CHANGELOG.md | 15 ++++++++++++++- README.md | 10 ++++++---- bench/bench_resp.mojo | 2 +- pixi.toml | 9 +++------ recipe.yaml | 4 ++-- 7 files changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6152236..5fa6ce7 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -17,7 +17,7 @@ concurrency: env: # Keep in step with test.yml's pin -- docs runs `mojo doc`, which compiles the # sources and so breaks on the same stdlib changes the tests do. - MOJO_VERSION: "1.0.0b3.dev2026073014" + MOJO_VERSION: "1.0.0" jobs: build-deploy: @@ -35,9 +35,7 @@ jobs: - name: Install Mojo run: | uv venv - uv pip install "mojo==$MOJO_VERSION" \ - --index https://whl.modular.com/nightly/simple/ \ - --prerelease allow + uv pip install "mojo==$MOJO_VERSION" - name: Generate API reference run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03fa3f1..ee5243c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,11 +12,11 @@ on: workflow_dispatch: env: - # The nightly this repo is known to build and pass on. CI installs exactly - # this for pushes and PRs, so upstream churn cannot turn a green repo red - # without a commit. Bump it when the weekly drift check goes green on a newer - # one, or after fixing whatever it caught. - MOJO_VERSION: "1.0.0b3.dev2026073014" + # The released Mojo this repo is known to build and pass on. CI installs + # exactly this for pushes and PRs, so upstream churn cannot turn a green repo + # red without a commit. Bump it when the weekly drift check goes green on a + # newer one, or after fixing whatever it caught. + MOJO_VERSION: "1.0.0" jobs: test: @@ -40,9 +40,7 @@ jobs: --index https://whl.modular.com/nightly/simple/ \ --prerelease allow else - uv pip install "mojo==$MOJO_VERSION" \ - --index https://whl.modular.com/nightly/simple/ \ - --prerelease allow + uv pip install "mojo==$MOJO_VERSION" fi .venv/bin/mojo --version @@ -81,7 +79,7 @@ jobs: Run: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID Fix the breakage, then bump MOJO_VERSION in .github/workflows/test.yml - and .github/workflows/docs.yaml to the nightly that passes. + and .github/workflows/docs.yaml to the release that passes. EOF ) existing=$(gh issue list --repo "$GITHUB_REPOSITORY" --state open \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a0611e..32ef6b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ # Changelog -## Unreleased +## 0.2.0 — 2026-08-11 + +- **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. +- **1.0 source fix (benchmark only).** `_report`'s `elapsed_ns` + parameter is now `Int`: `perf_counter_ns()` no longer returns `UInt`, + so `bench/bench_resp.mojo` failed to compile. +- README test counts corrected: 34 → 36 protocol tests, and the two + transport regressions CI also runs are now named. The 21 live-Redis + integration tests were re-run against a real server and pass. ### Fixed - **Transport: suppress SIGPIPE on a dead connection.** Writing to a diff --git a/README.md b/README.md index 3cadcc4..ff946a3 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ **A Redis client for Mojo, mirroring redis-py's basic surface. RESP2 over a direct libc socket, no third-party networking dependency.** [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](LICENSE) -[![Mojo](https://img.shields.io/badge/Mojo-1.0.0b3%2B_nightly-orange?style=flat-square)](https://mojolang.org) +[![Mojo](https://img.shields.io/badge/Mojo-1.0-orange?style=flat-square)](https://mojolang.org) [![Podcast](https://img.shields.io/badge/Podcast-Chain_of_Thought-purple?style=flat-square)](https://chainofthought.show/?utm_source=github&utm_medium=referral&utm_campaign=repo-readme&utm_content=mojo-redis) [![X](https://img.shields.io/badge/X-@ConorBronsdon-black?style=flat-square&logo=x)](https://x.com/ConorBronsdon) @@ -100,7 +100,7 @@ the protocol layer or the client. ## Install Add it to a pixi workspace, or point the compiler at `src/` with `-I src` -as the tasks below do. Requires a Mojo nightly (`>=1.0.0b3`). +as the tasks below do. Requires Mojo 1.0 or newer. ## Usage @@ -134,7 +134,8 @@ Two layers: 1. **Protocol unit tests** (`test/test_resp.mojo`): pure and network-free. RESP serialize/parse round-trips, split-buffer (incremental) parsing, nil handling, nested arrays, error replies. - 34 tests. This is what CI runs. + 36 tests. CI runs these plus the two transport regressions in + `test/test_connection.mojo`. ```bash pixi run test # or: mojo run -I src test/test_resp.mojo @@ -151,7 +152,8 @@ Two layers: REDIS_PORT=6399 pixi run test-integration ``` -Both suites pass: 34 protocol tests plus 21 live-Redis integration tests. +Both suites pass: 36 protocol tests (plus 2 transport regressions) and +21 live-Redis integration tests. ## Layout diff --git a/bench/bench_resp.mojo b/bench/bench_resp.mojo index 84c72c1..031326c 100755 --- a/bench/bench_resp.mojo +++ b/bench/bench_resp.mojo @@ -19,7 +19,7 @@ def _bytes(s: String) -> List[UInt8]: return out^ -def _report(name: String, bytes_per_op: Int, iterations: Int, elapsed_ns: UInt): +def _report(name: String, bytes_per_op: Int, iterations: Int, elapsed_ns: Int): var ns_per_op = Float64(elapsed_ns) / Float64(iterations) var mb_per_s = ( Float64(bytes_per_op) diff --git a/pixi.toml b/pixi.toml index 14b0f93..d9d0eb2 100644 --- a/pixi.toml +++ b/pixi.toml @@ -1,10 +1,10 @@ [workspace] authors = ["Conor Bronsdon "] -channels = ["https://conda.modular.com/max-nightly", "conda-forge"] +channels = ["https://conda.modular.com/max", "conda-forge"] name = "mojo-redis" description = "A Redis client for Mojo (RESP2), redis-py-shaped, over direct libc socket FFI" platforms = ["linux-64", "osx-arm64"] -version = "0.1.0" +version = "0.2.0" [tasks] # Protocol unit tests — pure, no server required (this is what CI runs). @@ -23,7 +23,4 @@ fmt = "mojo format src/ test/ examples/ bench/" docs = "mojo doc -o docs/api.json -I src src/redis && python3 docs/render_api.py docs/api.json docs/api.html" [dependencies] -# Must be `.dev0`, not `1.0.0b3`: a bare `1.0.0b3` sorts *after* the dev -# nightlies (e.g. 1.0.0b3.dev2026070506), so the solver rejects the only -# available builds and `pixi install` fails to resolve. -mojo = ">=1.0.0b3.dev0,<2" +mojo = ">=1.0,<2" diff --git a/recipe.yaml b/recipe.yaml index 6cff865..b63125e 100644 --- a/recipe.yaml +++ b/recipe.yaml @@ -11,7 +11,7 @@ # Build locally with: rattler-build build --recipe recipe.yaml context: - version: "0.1.0" + version: "0.2.0" package: name: mojo-redis @@ -29,7 +29,7 @@ build: requirements: run: - - mojo >=1.0.0b3.dev0,<2 + - mojo >=1.0,<2 about: homepage: https://github.com/conorbronsdon/mojo-redis