From aa3da0a0f9c2ffa70ffe98425fa8d9def9958373 Mon Sep 17 00:00:00 2001 From: Reuben Brooks Date: Tue, 21 Jul 2026 09:54:14 -0500 Subject: [PATCH] Cut the 0.10.0 rockspec (kernel 41.2); make the 0.9.0 rockspec honest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the release-channel half of #38: the published luarocks rock (shen 0.9.0-1) builds from tag v0.9.0 and ships kernel 41.1, while HEAD has been on 41.2 since the S41.2 refresh (#36/#37) — and the 0.9.0 rockspec at HEAD misleadingly claimed 41.2 while still pinning v0.9.0. - shen-0.10.0-1.rockspec: new release rockspec, pins tag v0.10.0 (identical build to 0.9.0-1 otherwise; the kernel bump is in the tree). - shen-0.9.0-1.rockspec: description reverted to the accurate "kernel 41.1" it actually builds, with a pointer to 0.10.0 for 41.2. - README: document the rock-version -> kernel mapping. Publishing the rock (luarocks upload) still has to happen from a machine with a luarocks.org API key; see #38. Co-Authored-By: Claude Fable 5 --- README.md | 5 ++++ shen-0.10.0-1.rockspec | 53 ++++++++++++++++++++++++++++++++++++++++++ shen-0.9.0-1.rockspec | 9 ++++--- 3 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 shen-0.10.0-1.rockspec diff --git a/README.md b/README.md index bbb4163..10ba730 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,11 @@ luarocks make --local shen-scm-1.rockspec # or: install the development tree luarocks tree whose interpreter is LuaJIT, e.g. `luarocks --lua-dir=$(brew --prefix luajit) --lua-version=5.1 install shen`.) +Rock versions map to kernels: **0.9.0** bundles kernel **41.1**, **0.10.0+** +bundles **41.2** (check with `shen -e '(version)'`). If luarocks hands you +0.9.0, ask for the newer rock explicitly (`luarocks install shen 0.10.0-1`) +or build from a checkout with the `scm` rockspec above. + Prefer zero install? Grab `shen-bundle.lua` from the [latest release](https://github.com/pyrex41/shen-lua/releases/latest) — the whole system in one file. diff --git a/shen-0.10.0-1.rockspec b/shen-0.10.0-1.rockspec new file mode 100644 index 0000000..d32ede5 --- /dev/null +++ b/shen-0.10.0-1.rockspec @@ -0,0 +1,53 @@ +rockspec_format = "3.0" +package = "shen" +version = "0.10.0-1" + +source = { + url = "git+https://github.com/pyrex41/shen-lua.git", + tag = "v0.10.0", +} + +description = { + summary = "A speed-focused LuaJIT port of the Shen language (kernel 41.2)", + detailed = [[ +shen-lua runs the Shen language on LuaJIT 2.1 by compiling KLambda to Lua +source. Embed with `local shen = require("shen")` (boot/eval/call/fn plus +list/symbol marshaling), or use the `shen` launcher for a REPL, running +.shen files, and -e one-liners. Requires LuaJIT (Lua 5.1 semantics + FFI); +the Shen 41.2 KLambda sources are bundled and compiled on first boot, then +served from a bytecode cache. +]], + homepage = "https://github.com/pyrex41/shen-lua", + license = "BSD-3-Clause (Shen kernel: BSD)", + labels = { "shen", "language", "compiler", "luajit" }, +} + +dependencies = { + -- LuaJIT only: the runtime uses the FFI (prolog engine, test driver) and + -- Lua 5.1 semantics (loadstring/setfenv). + "lua == 5.1", +} + +build = { + type = "builtin", + modules = { + shen = "shen.lua", + boot = "boot.lua", + prims = "prims.lua", + runtime = "runtime.lua", + compiler = "compiler.lua", + prolog_engine = "prolog_engine.lua", + prolog_compile = "prolog_compile.lua", + typecheck_native = "typecheck_native.lua", + lua_interop = "lua_interop.lua", + repl = "repl.lua", + }, + install = { + bin = { shen = "bin/shen" }, + }, + -- The vendored Shen 41.2 KLambda kernel sources, compiled on boot. + -- They land in the rock directory + -- (/lib/luarocks/rocks-5.1/shen//klambda); boot.lua's + -- find_kldir() derives that path from its own install location. + copy_directories = { "klambda" }, +} diff --git a/shen-0.9.0-1.rockspec b/shen-0.9.0-1.rockspec index 905d12a..772e21c 100644 --- a/shen-0.9.0-1.rockspec +++ b/shen-0.9.0-1.rockspec @@ -7,15 +7,18 @@ source = { tag = "v0.9.0", } +-- NOTE: this rockspec pins tag v0.9.0, which bundles the Shen 41.1 kernel. +-- For kernel 41.2 use shen-0.10.0-1.rockspec (tag v0.10.0) or later. description = { - summary = "A speed-focused LuaJIT port of the Shen language (kernel 41.2)", + summary = "A speed-focused LuaJIT port of the Shen language (kernel 41.1)", detailed = [[ shen-lua runs the Shen language on LuaJIT 2.1 by compiling KLambda to Lua source. Embed with `local shen = require("shen")` (boot/eval/call/fn plus list/symbol marshaling), or use the `shen` launcher for a REPL, running .shen files, and -e one-liners. Requires LuaJIT (Lua 5.1 semantics + FFI); -the Shen 41.2 KLambda sources are bundled and compiled on first boot, then -served from a bytecode cache. +the Shen 41.1 KLambda sources are bundled and compiled on first boot, then +served from a bytecode cache. NOTE: this version bundles kernel 41.1; for +kernel 41.2 install shen 0.10.0 or later. ]], homepage = "https://github.com/pyrex41/shen-lua", license = "BSD-3-Clause (Shen kernel: BSD)",