Fail actionably when vendor submodules are missing
A user downloaded the auto-generated 'Source code' zip from the release (no submodules) and hit the raw 'load failed for vendor/irregex/irregex.scm'. cli.ss and make now check for vendor/irregex up front and print the fix (clone --recurse-submodules / git submodule update --init --recursive); README documents both and warns that GitHub's source archives can't build. Release notes updated with the same pointer.
This commit is contained in:
parent
dbc4298c0a
commit
5467c1d98d
3 changed files with 46 additions and 5 deletions
11
Makefile
11
Makefile
|
|
@ -4,18 +4,23 @@
|
|||
# build step. `make test` is the full gate. `make remint` rebuilds the seed after a
|
||||
# source change.
|
||||
|
||||
.PHONY: test ci values corpus unit smoke buildsmoke staticnativesmoke selfhost sci cts certify ffi transient infer wp devirt fieldread numwp fieldnum protoret narrow directlink numeric inline shakesmoke remint joltc joltc-release joltc-debug joltcsmoke
|
||||
.PHONY: test ci values corpus unit smoke buildsmoke staticnativesmoke selfhost sci cts certify ffi transient infer wp devirt fieldread numwp fieldnum protoret narrow directlink numeric inline shakesmoke remint joltc joltc-release joltc-debug joltcsmoke submodules
|
||||
|
||||
# Every target needs the vendored submodules; fail with the fix, not a load error.
|
||||
submodules:
|
||||
@test -f vendor/irregex/irregex.scm || { \
|
||||
echo "vendor submodules missing; run: git submodule update --init --recursive"; exit 1; }
|
||||
|
||||
# Full gate (dev machine). Includes the self-host byte-fixpoint, which only holds
|
||||
# on the same Chez that minted the seed.
|
||||
test: selfhost ci
|
||||
test: submodules selfhost ci
|
||||
@echo "OK: all gates passed"
|
||||
|
||||
# CI gate: behavior only. The checked-in seed is a minted artifact (like a
|
||||
# lockfile) — it RUNS correctly on any Chez, but `selfhost` rebuilds it and a
|
||||
# different Chez version may emit byte-different (gensym/order) output, so the
|
||||
# byte-fixpoint is a dev-machine check, not a CI one (jolt-8479).
|
||||
ci: values corpus unit smoke buildsmoke staticnativesmoke sci cts ffi transient infer wp devirt fieldread numwp fieldnum protoret narrow directlink numeric inline certify
|
||||
ci: submodules values corpus unit smoke buildsmoke staticnativesmoke sci cts ffi transient infer wp devirt fieldread numwp fieldnum protoret narrow directlink numeric inline certify
|
||||
@echo "OK: CI gates passed"
|
||||
|
||||
# Self-host fixpoint: bootstrap.ss rebuild == checked-in seed.
|
||||
|
|
|
|||
20
README.md
20
README.md
|
|
@ -9,8 +9,12 @@ runs it on Chez. The compiler is self-hosted: it is written in Clojure
|
|||
|
||||
## Install
|
||||
|
||||
Grab the self-contained `joltc` binary (Linux/macOS) — it bundles the runtime,
|
||||
compiler, and standard library, so there is nothing else to install.
|
||||
Grab the self-contained `joltc` binary (Linux/macOS/Windows) — it bundles the
|
||||
runtime, compiler, and standard library, so there is nothing else to install.
|
||||
Download the binary archive for your platform from the
|
||||
[releases page](https://github.com/jolt-lang/jolt/releases) (`joltc-<ver>-<platform>.tar.gz`,
|
||||
or the `.zip` on Windows). The "Source code" archives GitHub attaches to every
|
||||
release are not binaries — see [Build](#build) before using one.
|
||||
|
||||
With Homebrew:
|
||||
|
||||
|
|
@ -45,6 +49,18 @@ cd jolt
|
|||
bin/joltc -e '(+ 1 2)' # => 3
|
||||
```
|
||||
|
||||
The `--recurse-submodules` matters: jolt vendors its regex engine and test
|
||||
suites as git submodules. In a checkout that's missing them (a plain
|
||||
`git clone`, or after pulling a commit that adds one), fetch them with:
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
Note that GitHub's auto-generated "Source code (zip/tar.gz)" archives on the
|
||||
releases page do **not** contain submodules, so they can't run or build —
|
||||
clone the repo instead (or grab a prebuilt binary from the same page).
|
||||
|
||||
After changing a compiler source — the reader (`host/chez/reader.ss`), the
|
||||
analyzer/IR/backend (`jolt-core/jolt/*.clj`), or the `clojure.core` overlay
|
||||
(`jolt-core/clojure/core/*.clj`) — re-mint the seed:
|
||||
|
|
|
|||
|
|
@ -11,6 +11,26 @@
|
|||
|
||||
(define cli-args (cdr (command-line))) ; drop the script name
|
||||
|
||||
;; Fail early and actionably when the vendored submodules aren't checked out —
|
||||
;; a plain `git clone` or GitHub's auto-generated "Source code" release archive
|
||||
;; lacks them, and the raw failure ("load failed for vendor/irregex/irregex.scm")
|
||||
;; doesn't say how to fix it. (The self-contained joltc binary embeds these and
|
||||
;; never runs this file.)
|
||||
(unless (file-exists? "vendor/irregex/irregex.scm")
|
||||
(display "jolt: vendor submodules are missing (vendor/irregex).
|
||||
" (current-error-port))
|
||||
(display "GitHub's 'Source code' release archives don't include submodules.
|
||||
" (current-error-port))
|
||||
(display "Clone the repo instead:
|
||||
" (current-error-port))
|
||||
(display " git clone --recurse-submodules https://github.com/jolt-lang/jolt.git
|
||||
" (current-error-port))
|
||||
(display "or, in an existing checkout:
|
||||
" (current-error-port))
|
||||
(display " git submodule update --init --recursive
|
||||
" (current-error-port))
|
||||
(exit 1))
|
||||
|
||||
(load "host/chez/rt.ss")
|
||||
(set-chez-ns! "clojure.core")
|
||||
(load "host/chez/seed/prelude.ss")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue