docs: retire separate-fork narrative — Chez is maintained in-tree
ober
72841ffdb2edbb6036bf4f48af62bf314de96e95
--- a/README.md +++ b/README.md @@ -519,10 +519,10 @@ Property-based testing is available via `(std test check)`: ## Requirements - [Chez Scheme](https://cisco.github.io/ChezScheme/) 10.x (stock, - unmodified — though we maintain an additive fork at - [git.sr.ht/~lisp/ChezScheme](https://git.sr.ht/~lisp/ChezScheme) - with a handful of pure-Scheme primitives that the standard - library uses). Both work. + unmodified — though we maintain an additive in-tree fork in + this repo at [`vendor/ChezScheme/`](vendor/ChezScheme) with a + handful of pure-Scheme primitives that the standard library + uses). Both work. - Optional: [Rust toolchain](https://rustup.rs/) for building `libjerboa_native.so` (crypto, compression, regex, databases, TLS, OS integration, ed25519). --- a/docs/Chez-changes.md +++ b/docs/Chez-changes.md @@ -1,16 +1,17 @@ # What we change vs. stock Chez Scheme -The Chez Scheme bundled at `vendor/ChezScheme/` is **not stock**. It is a soft -fork of `github.com/cisco/ChezScheme` (hosted at `git.sr.ht/~lisp/ChezScheme`), -branched at upstream commit `4bde3b35` — just before `10.5.0-pre-release.1`. +The Chez Scheme at `vendor/ChezScheme/` is **not stock**. Jerboa maintains its +own lightly-forked Chez **in-tree** here, based on `github.com/cisco/ChezScheme` +@ `4bde3b35` (just before `10.5.0-pre-release.1`). There is no separate fork +repo — edit `vendor/ChezScheme/` and commit to Jerboa. This file is the plain-English list of everything that differs. For the maintainer narrative (themes, motivations, provenance) see -[`chez-fork.md`](chez-fork.md); for the exact line-level diffs see the one -`.patch`-per-commit series in [`../vendor/ChezScheme-patches/`](../vendor/ChezScheme-patches/). +[`chez-fork.md`](chez-fork.md); for the exact line-level diffs see the +`.patch`-per-change series in [`../vendor/ChezScheme-patches/`](../vendor/ChezScheme-patches/). -**Scope:** 24 source-affecting fork commits (a further 28 commits only touch the -internal logs below). Net diff vs. upstream: **63 files, +5498 / −243**. +**Scope:** 24 source-affecting changes (the rest of the divergence is the +internal logs in §6). Net diff vs. the cisco base: **63 files, +5498 / −243**. --- @@ -62,18 +63,18 @@ Performance only — semantics unchanged, each guarded by a regression mat. `--static` builds. - **`install.zuo`** copies instead of hard-linking (`makefiles/install.zuo`). - **WiX installer** updates for `--static` (`wininstall/*.wxs`). -- **`sync-upstream` / `sync-upstream-status`** make targets — fork-maintenance - helpers (`makefiles/Makefile.in`). +- **`sync-upstream` / `sync-upstream-status`** make targets — helpers for + rebasing a Chez git checkout onto cisco upstream (`makefiles/Makefile.in`). ## 5. Routine fix not yet upstreamed -- **ppc32 + logtest repairs** (cisco PR #1045) — carried as a fork commit until - it lands upstream (`s/ppc32.ss`). +- **ppc32 + logtest repairs** (cisco PR #1045) — carried in-tree until it lands + upstream (`s/ppc32.ss`). -## 6. Internal docs riding inside the fork — NOT Chez changes +## 6. Internal logs riding inside the Chez tree — NOT Chez changes -These are *jerboa* files that live in the Chez tree for editing convenience. -**Never** include them in a patch sent to cisco/ChezScheme: +These are *jerboa* files that live in the vendored Chez tree for editing +convenience. **Never** include them in a patch sent to cisco/ChezScheme: - `plan.md` — running log of Phase N investigations - `findings.md` — optimizer research notes @@ -82,15 +83,17 @@ These are *jerboa* files that live in the Chez tree for editing convenience. --- -## Re-deriving / keeping current +## Re-deriving the divergence + +Chez lives in-tree — edit `vendor/ChezScheme/` and commit to Jerboa; there is +no separate fork repo. To see the full divergence from the cisco base, diff +against a fresh upstream checkout (or replay the patch series): ``` -cd ~/mine/ChezScheme # the fork working tree (has full git history) -git fetch upstream -git log --no-merges --oneline upstream/main..HEAD # the divergence -git diff --stat upstream/main..HEAD # 63 files, +5498/-243 +git clone https://github.com/cisco/ChezScheme /tmp/chez +git -C /tmp/chez checkout 4bde3b35 +diff -ru /tmp/chez vendor/ChezScheme # 63 files, +5498/-243 (minus §6 logs) ``` -Regenerate the patch series after the fork advances: -`./tools/regen-chez-patches.sh`. Vendored snapshot currently at `a4be658a` -(see [`../vendor/ChezScheme/UPSTREAM.md`](../vendor/ChezScheme/UPSTREAM.md)). +Vendored snapshot originally imported at `a4be658a` (see +[`../vendor/ChezScheme/UPSTREAM.md`](../vendor/ChezScheme/UPSTREAM.md)). --- a/docs/bundling-chez.md +++ b/docs/bundling-chez.md @@ -1,5 +1,11 @@ # Bundling Chez +> **Status note:** Chez is now vendored in-tree at `vendor/ChezScheme/` and the +> `Makefile` builds it from there, so the "plan to vendor Chez" framing below is +> partly overtaken by events — treat the "Today" / "gap" sections as historical. +> The musl build scripts now default to `vendor/ChezScheme/`. See +> [`chez-fork.md`](chez-fork.md) and [`Chez-changes.md`](Chez-changes.md). + A plan to make Jerboa self-contained — no system Chez Scheme required on the build or development machine. The model is Gerbil's recent shift from "Gambit must be installed" to "Gambit ships with Gerbil." @@ -18,8 +24,8 @@ Today, Jerboa is split-bundled: - The **dev driver** (`bin/jerboa`) calls `${SCHEME:-scheme}` — needs system Chez to run. - The **musl static pipeline** (`support/musl-chez-build.sh`) builds Chez - from source, but expects the source at `$HOME/mine/ChezScheme` — not - vendored, not a submodule, not part of the Jerboa repo. + from source, defaulting to the in-tree `vendor/ChezScheme/` (override with + an explicit path arg). The goal: close the gap so `git clone jerboa && make` produces a working Jerboa with no system Chez anywhere. @@ -70,7 +76,7 @@ flag (v10.4.0+): - Embeds boot files via `static_boot_init()` - Provides `main.o` for downstream static builds -Expects source at `$HOME/mine/ChezScheme`. Installs to `/opt/chez-musl`. +Defaults to the in-tree `vendor/ChezScheme/`. Installs to `/opt/chez-musl`. ## The gap --- a/docs/chez-fork.md +++ b/docs/chez-fork.md @@ -1,121 +1,128 @@ # ChezScheme Fork Notes -The Chez Scheme bundled at `vendor/ChezScheme/` is **not stock**. It's a -soft fork hosted at `git.sr.ht/~lisp/ChezScheme` (working tree: -`~/mine/ChezScheme`), branched from upstream `github.com/cisco/ChezScheme` -and carrying jerboa-relevant patches. - -This doc is the **narrative** layer: themes, motivations, what -jerboa depends on. The **line-level** layer — one unified-diff file -per fork-side commit, carrying its commit message — lives at -[`../vendor/ChezScheme-patches/`](../vendor/ChezScheme-patches/). -Read this doc for orientation; drill into the patches for specifics. -Regenerate the patch series with `./tools/regen-chez-patches.sh` -when `~/mine/ChezScheme` advances. +The Chez Scheme at `vendor/ChezScheme/` is **not stock**. Jerboa maintains its +own lightly-forked Chez **directly in this repo**: edit the files under +`vendor/ChezScheme/`, commit to Jerboa, done. There is no separate ChezScheme +repo to sync against — Jerboa is the source of truth. It is based on upstream +`github.com/cisco/ChezScheme` and carries a small, jerboa-relevant set of +changes on top. + +This doc is the **narrative** layer: themes, motivations, what jerboa depends +on. The **line-level** layer — one unified-diff file per change, each carrying +its original commit message — lives at +[`../vendor/ChezScheme-patches/`](../vendor/ChezScheme-patches/) as a frozen +record of everything that differs from cisco. Read this doc for orientation; +drill into the patches for specifics. + +> **History note.** This Chez was previously developed in a standalone fork +> repo (`git.sr.ht/~lisp/ChezScheme`, working tree `~/mine/ChezScheme`) and +> vendored in as a flat snapshot. That fork is **retired**; the changes now +> live and evolve here in-tree. Older references to that separate repo are +> historical. ## At a glance -- **Upstream:** `github.com/cisco/ChezScheme` -- **Fork:** `git.sr.ht/~lisp/ChezScheme` -- **Last common commit at time of writing:** `4bde3b35` -- **Divergence:** ~52 commits, ~5500 insertions / 243 deletions across 63 files -- **Vendored snapshot in this repo:** `vendor/ChezScheme/` @ `a4be658a` - (see `vendor/ChezScheme/UPSTREAM.md`) +- **Upstream base:** `github.com/cisco/ChezScheme` @ `4bde3b35` (just before + `10.5.0-pre-release.1`) +- **Lives in:** `vendor/ChezScheme/` (in-tree; snapshot originally imported at + `a4be658a` — see `vendor/ChezScheme/UPSTREAM.md`) +- **Divergence:** 63 files, +5498 / −243 vs. the cisco base +- **Source-affecting changes:** 24, recorded one-per-file in + `vendor/ChezScheme-patches/`; the rest of the divergence is the internal + logs in "Logs that ride along" below. To re-derive the divergence yourself: ``` -cd ~/mine/ChezScheme -git fetch upstream -git log --no-merges --oneline upstream/main..HEAD -git diff --stat upstream/main..HEAD +git clone https://github.com/cisco/ChezScheme /tmp/chez +git -C /tmp/chez checkout 4bde3b35 +diff -ru /tmp/chez vendor/ChezScheme # ignore the internal logs +# …or replay our record onto the base: +cd /tmp/chez && git am /path/to/jerboa/vendor/ChezScheme-patches/*.patch ``` ## Themes -The divergence groups into five themes. SHAs below are fork-local — -resolve them in `~/mine/ChezScheme`, not in the vendored tree (where -history was stripped). +The divergence groups into the themes below. Each item is recorded as a patch +in `vendor/ChezScheme-patches/` — drill in there for the diff. ### 1. Security hardening -Why: jerboa ships as a single statically-linked binary that parses -untrusted FASL/data; stock Chez defaults assume a trusted build env. +Why: jerboa ships as a single statically-linked binary that parses untrusted +FASL/data; stock Chez defaults assume a trusted build env. -- `c3c3d6f3` — `--static` and `--foreign-libs` configure options - (required by the musl-static pipeline; enables hermetic binaries) -- `b3f35405` — harden FASL deserialization, FFI, and build scripts - against malformed input -- `aaa82190` — vfasl bounds checks + `path_append` hardening + HPUX typo -- `829bc806` — ENDBR64 emission at function entries (Intel CET/IBT) -- `beefa2a6` — `--enable-harden` configure flag + ARM64 BTI landing pads +- `--static` and `--foreign-libs` configure options (required by the + musl-static pipeline; enables hermetic binaries) +- harden FASL deserialization, FFI, and build scripts against malformed input +- vfasl bounds checks + `path_append` hardening + HPUX typo +- ENDBR64 emission at function entries (Intel CET/IBT) +- `--enable-harden` configure flag + ARM64 BTI landing pads -Touches: `c/fasl.c`, `c/vfasl.c`, `c/main.c`, `s/x86_64.ss`, -`s/arm64.ss`, `configure`, `c/build.zuo`. +Touches: `c/fasl.c`, `c/vfasl.c`, `c/main.c`, `s/x86_64.ss`, `s/arm64.ss`, +`configure`, `c/build.zuo`. ### 2. Optimizer enhancements ("Phase N" work) -Why: jerboa's stdlib (persistent collections, hashtables, defstruct, -match) leans hard on Chez's optimizer. Each "Phase N" is a bottleneck we -identified and fixed in Chez rather than working around in jerboa. +Why: jerboa's stdlib (persistent collections, hashtables, defstruct, match) +leans hard on Chez's optimizer. Each "Phase N" is a bottleneck we identified +and fixed in Chez rather than working around in jerboa. -- `506f43ac`, `b3ea8e63` — newhash: sealed-record dispatch for generic - + bulk hashtable ops -- `2629173b`, `5c25af3e`, `e37d7c58`, `03087783` — cptypes hashtable - specialization (cell/ref-cell, clear!/copy, 2-arg eq-hashtable) -- `1776fb2f` — cp0 literal string-append folding +- newhash: sealed-record dispatch for generic + bulk hashtable ops +- cptypes hashtable specialization (cell/ref-cell, clear!/copy, 2-arg + eq-hashtable) +- cp0 literal string-append folding -Touches: `s/cp0.ss`, `s/cptypes.ss`, `s/cptypes-lattice.ss`, -`s/newhash.ss`, `s/primdata.ss`. +Touches: `s/cp0.ss`, `s/cptypes.ss`, `s/cptypes-lattice.ss`, `s/newhash.ss`, +`s/primdata.ss`. Regression guards: `mats/cptypes.ms`, `mats/hash.ms`, `mats/record.ms`, `mats/bytevector.ms`. The deeper backstory for each Phase lives in `vendor/ChezScheme/plan.md` -(2500+ lines of running log — kept inside the fork, see §5). +(2500+ lines of running log — kept inside the tree; see "Logs that ride +along"). ### 3. New primitives -Why: jerboa's stdlib calls these from Scheme without round-tripping -through C FFI. Faster, and lets the optimizer see through them. +Why: jerboa's stdlib calls these from Scheme without round-tripping through +C FFI. Faster, and lets the optimizer see through them. -- `9c919405` — `bytevector-slice`, `bytevector-append` -- `6a7a21ce` — `base64-encode`, `base64-decode` -- `ada7cd0c` — `sha1-bytevector`, `sha256-bytevector` -- `b621c8d6` — ordered-hashtable (Phase 68) + record-walk (Phase 72) +- `bytevector-slice`, `bytevector-append` +- `base64-encode`, `base64-decode` +- `sha1-bytevector`, `sha256-bytevector` +- ordered-hashtable (Phase 68) + `record-walk` (Phase 72) Touches: `s/bytevector.ss`, `s/newhash.ss`, `s/primdata.ss`. ### 4. Build & packaging -- `457a455c` — `sync-upstream` + `sync-upstream-status` make targets - (maintenance helpers for this fork) -- `tools/gen-static-ffi.sh` (new) — generates static FFI tables for - `--static` builds -- `make-android` (new) + `d293dea3` — Android/Termux build wiring -- `5f9c697c` — `install.zuo`: copies instead of hard links +- `sync-upstream` + `sync-upstream-status` make targets — helpers for rebasing + a Chez git checkout onto cisco upstream when refreshing the vendored tree +- `tools/gen-static-ffi.sh` (new) — generates static FFI tables for `--static` + builds +- `make-android` (new) — Android/Termux build wiring +- `install.zuo`: copies instead of hard links - `wininstall/*.wxs` — WiX installer updates for `--static` -### 5. Jerboa-side docs living inside the fork +### Logs that ride along (NOT Chez source) -Three files live in `vendor/ChezScheme/` that are *jerboa* documentation, -not Chez source. They ride along in the fork for editing convenience but -are **not upstream-relevant** — never include them in a patch sent to -cisco/ChezScheme. +Several files under `vendor/ChezScheme/` are *jerboa* documentation, not Chez +source. They ride along for editing convenience but are **not upstream-relevant** +— never include them in a patch sent to cisco/ChezScheme. - `plan.md` — running log of Phase N investigations and outcomes - `findings.md` — research notes on optimizer behavior - `CLAUDE.md` — Claude instructions for work *inside* the Chez tree - (separate from jerboa-root `CLAUDE.md`) - `bench/jerboa-bench.ss` — jerboa-specific benchmark suite -### 6. Routine fixes not yet upstreamed +### Routine fixes not yet upstreamed -- `a4be658a` — ppc32 + logtest repairs (#1045) +- ppc32 + logtest repairs (cisco PR #1045) — carried until it lands upstream ## Keeping this doc current -When the fork advances or the vendored snapshot is resynced (recipe in -`vendor/ChezScheme/UPSTREAM.md`), re-run the at-a-glance commands above -and slot new commits into the themes. Add a new theme only if the work -genuinely doesn't fit (new platform port, new subsystem, etc.). +When the vendored Chez changes, re-run the at-a-glance diff above and slot new +changes into the themes. Add a new theme only if the work genuinely doesn't fit +(new platform port, new subsystem, etc.). To pull in cisco upstream fixes, diff +cisco against `vendor/ChezScheme/` and apply what you want (the vendored tree is +a flat snapshot with no git history of its own). --- a/lib/std/text/base64.ss +++ b/lib/std/text/base64.ss @@ -3,7 +3,7 @@ ;;; ;;; Override for static jsh builds. The upstream (std text base64) is a ;;; thin wrapper over Chez core base64-encode/base64-decode (Round 12 -;;; Phase 66). Some Chez builds — notably the ~lisp/ChezScheme tree +;;; Phase 66). Some Chez builds — notably the vendored Chez tree ;;; cloned inside jerboa21/jerboa — ship boot files that predate Phase ;;; 66, so the host scheme has the prims but the container scheme does ;;; not. Rather than chase boot-file regen across hosts, this file --- a/support/musl-chez-build-user.sh +++ b/support/musl-chez-build-user.sh @@ -8,11 +8,11 @@ # ./musl-chez-build-user.sh [chez-source-dir] [install-prefix] # # Examples: -# ./musl-chez-build-user.sh ~/mine/ChezScheme ~/chez-musl +# ./musl-chez-build-user.sh ~/mine/jerboa/vendor/ChezScheme ~/chez-musl # ./musl-chez-build-user.sh # uses defaults set -euo pipefail -CHEZ_DIR="${1:-$HOME/mine/ChezScheme}" +CHEZ_DIR="${1:-$HOME/mine/jerboa/vendor/ChezScheme}" INSTALL_PREFIX="${2:-$HOME/chez-musl}" # Check for musl-gcc --- a/support/musl-chez-build.sh +++ b/support/musl-chez-build.sh @@ -12,11 +12,11 @@ # sudo ./musl-chez-build.sh [chez-source-dir] [install-prefix] # # Examples: -# sudo ./musl-chez-build.sh ~/mine/ChezScheme /opt/chez-musl +# sudo ./musl-chez-build.sh ~/mine/jerboa/vendor/ChezScheme /opt/chez-musl # sudo ./musl-chez-build.sh # uses defaults set -euo pipefail -CHEZ_DIR="${1:-$HOME/mine/ChezScheme}" +CHEZ_DIR="${1:-$HOME/mine/jerboa/vendor/ChezScheme}" INSTALL_PREFIX="${2:-/opt/chez-musl}" # Check for musl-gcc deleted file mode 100755 --- a/tools/regen-chez-patches.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# Regenerate vendor/ChezScheme-patches/ from ~/mine/ChezScheme. -# -# Captures each fork-over-cisco commit as a numbered .patch file, -# skipping commits that only touched jerboa-side docs. -# -# See docs/chez-fork.md for the narrative; see -# vendor/ChezScheme-patches/README.md for how to read the output. -# -# Overrides: -# FORK_DIR=<path> (default: $HOME/mine/ChezScheme) -# UPSTREAM_REF=<ref> (default: upstream/main) - -set -euo pipefail - -FORK_DIR="${FORK_DIR:-$HOME/mine/ChezScheme}" -UPSTREAM_REF="${UPSTREAM_REF:-upstream/main}" -OUT_DIR="$(cd "$(dirname "$0")/.." && pwd)/vendor/ChezScheme-patches" - -if [ ! -d "$FORK_DIR/.git" ]; then - echo "ERROR: $FORK_DIR is not a git repo" >&2 - echo "Set FORK_DIR=<path> or clone the fork to ~/mine/ChezScheme" >&2 - exit 1 -fi - -# These paths are excluded from both commit selection (commits that -# only touch them are skipped) and from each patch's diff body. -SKIP=( - ':!plan.md' - ':!findings.md' - ':!CLAUDE.md' - ':!bench/jerboa-bench.ss' -) - -(cd "$FORK_DIR" && git fetch upstream --quiet) - -mkdir -p "$OUT_DIR" -# Wipe old patches but preserve README.md and any other non-patch files. -find "$OUT_DIR" -maxdepth 1 -name '*.patch' -delete - -( - cd "$FORK_DIR" - i=1 - for sha in $(git log --no-merges --reverse --format=%H \ - "${UPSTREAM_REF}..HEAD" -- "${SKIP[@]}"); do - git format-patch -1 "$sha" \ - --start-number "$i" \ - -o "$OUT_DIR" \ - -- "${SKIP[@]}" > /dev/null - i=$((i + 1)) - done -) - -count=$(find "$OUT_DIR" -maxdepth 1 -name '*.patch' | wc -l | tr -d ' ') -echo "wrote $count patches to $OUT_DIR" --- a/vendor/ChezScheme-patches/0021-makefiles-Makefile.in-add-sync-upstream-sync-upstrea.patch +++ b/vendor/ChezScheme-patches/0021-makefiles-Makefile.in-add-sync-upstream-sync-upstrea.patch @@ -7,7 +7,7 @@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Our fork (git.sr.ht/~lisp/ChezScheme) carries 50+ local commits on top +Our in-tree Chez (jerboa's vendor/ChezScheme) carries 50+ local commits on top of cisco/ChezScheme main — Round 12+ phases (base64, bytevector-append, sha1/sha256-bytevector, etc.), jerboa-perf, secure, and the Round 13/14 plans. Pulling in upstream bug fixes by hand was a multi-step dance of @@ -46,7 +46,7 @@ index ccada5e1..0c0083c6 100644 + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DZUO_LIB_PATH='"'"$(upsrcdir)/zuo/lib"'"' -o $(ZUO) $(srcdir)/zuo/zuo.c + +# ── Sync from upstream Cisco ChezScheme ────────────────────────────────────── -+# Our fork (git.sr.ht/~lisp/ChezScheme) carries local commits on top of ++# Our in-tree Chez (jerboa's vendor/ChezScheme) carries local commits on top of +# upstream/main (Round 12+ phases, jerboa-perf, secure, etc.). These targets +# add an `upstream` remote pointing at cisco/ChezScheme and rebase our main +# onto it so we pull in upstream bug fixes without losing local work. --- a/vendor/ChezScheme-patches/README.md +++ b/vendor/ChezScheme-patches/README.md @@ -1,33 +1,33 @@ -# Chez Scheme fork-over-upstream patch series +# ChezScheme divergence-from-upstream patch series -This directory records *what* we changed in ChezScheme relative to -upstream `github.com/cisco/ChezScheme`. Each `.patch` is one fork-side -commit produced by `git format-patch` — author, date, commit message -(the *why*), and unified diff (the *what*) in one self-contained -reviewable unit. +This directory records *what* we changed in ChezScheme relative to upstream +`github.com/cisco/ChezScheme`. Each `.patch` is one source change produced by +`git format-patch` — author, date, commit message (the *why*), and unified +diff (the *what*) in one self-contained reviewable unit. -For the high-level narrative (themes, motivations, which jerboa -features depend on which patches), see -[`../../docs/chez-fork.md`](../../docs/chez-fork.md). +It is a **frozen, line-level record** of the divergence. Chez is now maintained +in-tree — edit `../ChezScheme/` directly and commit to Jerboa — so this series +is the snapshot that tells you which lines are ours versus stock cisco. For the +high-level narrative (themes, motivations, which jerboa features depend on +what), see [`../../docs/chez-fork.md`](../../docs/chez-fork.md) and +[`../../docs/Chez-changes.md`](../../docs/Chez-changes.md). ## Why this exists -The vendored snapshot at `../ChezScheme/` is *just* source — it -doesn't show you which lines are ours. This series is the answer: -anyone (human or LLM) syncing the fork with upstream can read these -patches to know what to preserve. +The vendored snapshot at `../ChezScheme/` is *just* source — it doesn't show +you which lines are ours. This series is the answer: anyone pulling a newer +cisco upstream into the tree can read these patches to know what to preserve. ## Naming and order -Files are numbered chronologically in fork-side commit order -(oldest first). Numbers are gap-free *within a vendoring* but may -renumber across vendorings — don't cite patches by number across -syncs; cite by subject line or by commit SHA in the patch header. +Files are numbered in source-change order (oldest first). Cite patches by +subject line or by the commit SHA in the patch header — the numbers are stable +for this frozen series but would shift if it were ever rebuilt. -Excluded from the series: commits that *only* touched jerboa-side -docs (`plan.md`, `findings.md`, `CLAUDE.md`, `bench/jerboa-bench.ss`). -Those aren't real Chez source changes. Each remaining patch's diff -also strips those paths if they were edited alongside source. +Excluded from the series: changes that *only* touched jerboa-side logs +(`plan.md`, `findings.md`, `CLAUDE.md`, `bench/jerboa-bench.ss`). Those aren't +real Chez source changes. Each patch's diff also strips those paths if they +were edited alongside source. ## Themes (see `../../docs/chez-fork.md` for details) @@ -38,19 +38,12 @@ also strips those paths if they were edited alongside source. - **Build & packaging** — 0004 0005 0021 - **Upstream-style fixes not yet upstreamed** — 0024 -## Regenerating +## Refreshing this series -When `~/mine/ChezScheme` advances, regenerate from the jerboa root: - -``` -./tools/regen-chez-patches.sh -``` - -That wipes all `*.patch` files in this directory and rewrites them -from `~/mine/ChezScheme`'s `upstream/main..HEAD` range. This README -is preserved. Review `git status vendor/ChezScheme-patches/` after -running — added files are new fork commits, removed files mean -upstream has caught up. +This is a static record; day-to-day work doesn't regenerate it. If you ever +need to rebuild it — e.g. after pulling a newer cisco upstream into +`../ChezScheme/` — produce one `git format-patch` per source change against the +cisco base (`4bde3b35`), writing the files here and preserving this README. ## Applying these to a fresh Chez checkout --- a/vendor/ChezScheme/UPSTREAM.md +++ b/vendor/ChezScheme/UPSTREAM.md @@ -1,27 +1,33 @@ # Vendored Chez Scheme -This directory is a flat snapshot of **OUR** Chez Scheme — the Jerboa -project's customized fork, not stock Cisco Chez. It carries local changes -relative to upstream `cisco/ChezScheme` that Jerboa depends on. +This directory is Jerboa's **in-tree Chez Scheme** — a lightly-forked Chez +maintained directly in this repo, not stock Cisco Chez. Edit these files and +commit to Jerboa; there is no separate ChezScheme repo to sync against, and no +submodule. Jerboa is the source of truth. -For *what* diverged from cisco/ChezScheme and *why*: +For *what* diverges from upstream `cisco/ChezScheme` and *why*: -- [`docs/chez-fork.md`](../../docs/chez-fork.md) — narrative - (themes, motivations) -- [`vendor/ChezScheme-patches/`](../ChezScheme-patches/) — line-level - patch series, one `.patch` per fork commit, regenerable via - `tools/regen-chez-patches.sh` +- [`docs/chez-fork.md`](../../docs/chez-fork.md) — narrative (themes, motivations) +- [`docs/Chez-changes.md`](../../docs/Chez-changes.md) — plain-English change list +- [`vendor/ChezScheme-patches/`](../ChezScheme-patches/) — frozen line-level + patch series, one `.patch` per source change This file (UPSTREAM.md) records *provenance* only. ## Provenance -- **Source:** https://git.sr.ht/~lisp/ChezScheme -- **Branch:** main -- **Commit:** a4be658a9ff07fcbc3b578aad28aec317422862c -- **Commit subject:** ppc32 and logtest repairs (#1045) -- **Imported:** 2026-05-14 -- **Method:** flat snapshot — `.git/` stripped, no history preserved here +- **Upstream base:** https://github.com/cisco/ChezScheme @ + `4bde3b35316737b1c5d34329d02dbdf609fdd399` (just before Version + 10.5.0-pre-release.1) +- **Snapshot imported:** 2026-05-14, at fork commit + `a4be658a9ff07fcbc3b578aad28aec317422862c` ("ppc32 and logtest repairs (#1045)") +- **Method:** flat snapshot — `.git/` stripped, no history preserved here; now + maintained in-tree as ordinary files + +> This tree was originally developed in a standalone fork repo and vendored in +> as a flat snapshot. That fork is **retired** — the source of truth is now +> this directory. Earlier references to `git.sr.ht/~lisp/ChezScheme` are +> historical provenance, not a live remote. ### Submodule pins (also flattened, `.git` stripped) @@ -33,25 +39,23 @@ This file (UPSTREAM.md) records *provenance* only. | `zlib` | https://github.com/madler/zlib.git | `da607da739fa6047df13e66a2af6b8bec7c2a498` | | `zuo` | https://github.com/racket/zuo | `a288cbfe350403899311ca7d8267d570e781ed2c` | -`.gitmodules` is retained for reference but inert (no submodules registered -in this repo's git index). +`.gitmodules` is retained for reference but inert (no submodules registered in +this repo's git index). ## Updating -This is vendored, not a submodule. To sync a newer upstream: +This is maintained in-tree: edit the files here and commit to Jerboa. To pull +in newer cisco upstream fixes, diff `cisco/ChezScheme` against this directory +and apply the wanted changes by hand — the tree is a flat snapshot with no git +history of its own: ``` -rm -rf vendor/ChezScheme -git clone --recurse-submodules --shallow-submodules --depth 1 \ - https://git.sr.ht/~lisp/ChezScheme vendor/ChezScheme -find vendor/ChezScheme -name .git -exec rm -rf {} + -# update Commit/Imported fields + submodule SHA table above, -# commit as a single "vendor: sync chez @ <sha>" +git clone https://github.com/cisco/ChezScheme /tmp/chez +git -C /tmp/chez checkout 4bde3b35 # the current base +diff -ru /tmp/chez vendor/ChezScheme # review our divergence first ``` -Local changes (if any) live in `vendor/ChezScheme/` as ordinary files — -edit in place, commit to Jerboa. Patches that should go upstream should -be sent to https://git.sr.ht/~lisp/ChezScheme separately. +Changes worth sending to cisco upstream should be submitted there separately. ## License --- a/vendor/ChezScheme/makefiles/Makefile.in +++ b/vendor/ChezScheme/makefiles/Makefile.in @@ -171,7 +171,7 @@ $(ZUO_TARGET): $(srcdir)/zuo/zuo.c + $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DZUO_LIB_PATH='"'"$(upsrcdir)/zuo/lib"'"' -o $(ZUO) $(srcdir)/zuo/zuo.c # ── Sync from upstream Cisco ChezScheme ────────────────────────────────────── -# Our fork (git.sr.ht/~lisp/ChezScheme) carries local commits on top of +# Our in-tree Chez (jerboa's vendor/ChezScheme) carries local commits on top of # upstream/main (Round 12+ phases, jerboa-perf, secure, etc.). These targets # add an `upstream` remote pointing at cisco/ChezScheme and rebase our main # onto it so we pull in upstream bug fixes without losing local work.