Skip to content

Releases: nerima-lisp/cl-nix-forge

v0.6.1

Choose a tag to compare

@github-actions github-actions released this 27 Sep 07:08
v0.6.1
554ceba

Fixes a Nix evaluation crash on large .asd files.

Fixed

  • defsystemForms read .asd files one character at a time with plain recursion. Nix has no tail-call elimination, so every character and token cost a stack frame against max-call-depth, and a .asd of roughly 10k characters or more overflowed the default limit of 10000. Since mkPackageFlake evaluates cl.fromAsdSystem for every attribute, such a flake could not evaluate at all (nix flake check, nix run, and nix build all failed) unless the caller raised max-call-depth. The reader now tokenizes with builtins.split and drives lexing, paren matching, and form scanning with builtins.genericClosure, so depth no longer grows with file size. Results are identical to the previous reader on all existing fixtures, plus two new large-file edge cases (a generated 133 KB system and a real 33 KB .asd) that overflowed the old reader and now evaluate normally.

v0.6.0

Choose a tag to compare

@github-actions github-actions released this 27 Sep 07:08
v0.6.0
4a349d8

Ships a real Darwin executable and refines library API behavior and documentation.

Added

  • program-op is now used unconditionally on every platform, including Darwin. The Darwin build previously dumped a bare .core file wrapped by an sbcl --core launcher script because program-op was once observed not to produce a binary there; rebuilding under current SBCL produces a real, ad-hoc-signed Mach-O executable, so $out/bin/<pname> is now the executable itself on every platform, unwrapped unless native libraries require wrapper arguments.

Changed

  • Various API behavior refinements and documentation updates across the lib/ batteries and example flakes.

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 04 Aug 06:54
v0.5.0
df1e772

追加

  • asdSystemDependencies — .asd の :depends-on を defsystem ごとに読み出す。これまで各消費リポジトリが Nix 側で手作業に再構築していた依存辺を、.asd から直接読めるようにする。

    cl.asdSystemDependencies { asd = ./cl-cli.asd; features = [ "sbcl" ]; }
    # => { cl-cli = [ "uiop" "cl-host-kit" ]; ... }

    features は必須引数。#+/#- のリーダー条件と (:feature ...) をその特徴集合に対して評価する。リーダー条件の答えは対象処理系の関数であり、.asd 単体では決まらないため既定値を置いていない。

  • checks.api-index-contract — lib/default.nix の全エクスポートが docs/src/reference/api.md にリンク付きで載っていることを評価時に検証する。api.md が「これを強制する仕組みは何もない」と書いていた穴を塞ぐもの。

変更

  • docs/src/reference/versions.md を Reading a .asd に改題。ファイル名とアンカーは既存の被リンクを壊さないよう据え置き。
  • 公開関数が 29 から 30 に。

互換性

リリース済み API に変更はない。既存の消費者は無変更で上げられる。

v0.4.2

Choose a tag to compare

@github-actions github-actions released this 04 Aug 01:04
v0.4.2
bee5514

flake.nix declares aarch64-darwin again, alongside x86_64-linux. Everything
else is a routine dependency bump and the documentation catching up with it.

Changed

  • systems is [ "x86_64-linux" "aarch64-darwin" ] again. The
    2026-08-01 revision of the org package standard had dropped
    aarch64-darwin, on the grounds that a declared platform with no CI gate
    behind it is a claim nothing backs. That reasoning was reverted the next
    day: mkPackageFlake generates packages, checks, apps, and
    devShells from this one list, so dropping aarch64-darwin did not just
    remove an unverified package — it took nix build and nix develop off
    the development machine entirely. aarch64-darwin still carries no CI
    gate, and the standard now accepts that explicitly rather than pretending
    the list means "verified".
  • nixpkgs and treefmt-nix bumped via nix flake update.

Documented

  • Platform coverage
    and the README's development section described one declared system; both
    now state the two-system list, why it changed twice in three days, and why
    CI still evaluates and builds x86_64-linux alone (--all-systems would
    fail on a platform mismatch on ubuntu-latest, not widen coverage).
  • The flake input pin shown in the README, Getting started, and the release
    process page moved from v0.4.1 to v0.4.2.

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 02 Aug 07:20
v0.4.1
1ed4292

Documentation only. lib/ is unchanged from v0.4.0 — no behaviour differs,
and an existing flake input can be moved to this tag without touching
anything else.

Documented

  • mkPackageFlake has a reference entry. It was exported in v0.3.0 and
    referred to by name on three pages, but was described nowhere: what it
    generates, its arguments, the context record its ctx -> … arguments
    receive, and why extraOutputs and overrideOutputs are two channels
    rather than one. The API index had asserted an invariant — "this index and
    lib/default.nix name exactly the same 28 attributes" — that the missing
    entry made false, since lib/ exports 29. Nothing gates that invariant, so
    the index now records the gap it had and the one command that checks it.
  • A release process page. Where the version lives now that CHANGELOG.md
    is gone org-wide, why it is a VERSION file rather than flake.nix or the
    git tag, the release.yml step that refuses a tag disagreeing with it, and
    what checks.default actually builds.
  • examples/org-preset/ is in the examples catalogue, with what its
    twenty checks discriminate — including the absence assertions, the two
    escape hatches proved in both directions, and the devShell check that is
    run against a pre-fix shell to prove it would have failed.

Corrected

  • Platform coverage. The page still described two declared systems and a
    CI step that evaluates all of them with --all-systems; since v0.4.0 the
    flake declares x86_64-linux alone and the flag is forbidden by the
    package standard. Dropping aarch64-darwin did not reduce the Darwin
    branch's coverage — it stopped the declaration from implying coverage —
    and the page now makes that distinction instead of stating the old shape.
    The same --all-systems recipe is corrected in the README and the examples
    guide.
  • mkDocsSite's fileset argument was motivated by a repo-root
    CHANGELOG.md that a changelog page snippet-includes. The org abolished
    CHANGELOG.md on 2026-08-01 and the repository cited as the example
    removed the snippets extension with it. The argument's reason to exist is
    unchanged, so the example is replaced with one that still holds.
  • The flake input pin shown in the README and Getting started was still
    v0.1.0.

Note for the org

GitHub Pages was never enabled on this repository, so every docs.yml run
since the workflow was added had failed at actions/configure-pages. Pages
is now enabled with build_type: workflow, matching every sibling repo, and
https://nerima-lisp.github.io/cl-nix-forge/ is live.

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Jul 17:49
v0.4.0
53f2664

Fixed

  • mkPackageFlake builds its generated devShells.default from the
    check-enabled derivation, so a package whose sibling dependency is
    test-only can actually load it under nix develop. Two of the three first
    adopters had written the same overrideOutputs workaround, which is what
    identified this as the library's defect rather than one package's quirk;
    the third could never have caught it, being its own test framework with no
    external test dependency. It costs no extra build — mkShell's
    inputsFrom takes inputs rather than outputs and subtracts the named
    derivation, so the check-enabled derivation is never realised, while the
    check dependencies it names are already built by checks.default.
  • mkLispSource's doc comment claimed an allowlist stops a local test run
    from invalidating the build. It narrows that, it does not close it: an
    allowlist by extension excludes an artefact directory of HTML but not one
    of generated .lisp. What closes it is the flake source being Git-backed.
    The claim is narrowed to what is true.

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 29 Jul 16:41
v0.3.0
b028786

Everything here was found by APPLYING the library to a real repository for
the first time, not by reading it. This is the release that justifies the
note at the top of this file about 1.0.0.

Added

  • mkPackageFlake gains executable, which builds a delivered CLI from the
    preset's OWN resolved lispDerivation arguments. mkExecutable's args
    was documented as "the exact attrset you'd pass to lispDerivation", but the
    preset had already computed that attrset and exposed only the result — so a
    delivered binary re-spelled pname, lispSystem, meta, version and
    src in an escape hatch. Two sources of truth for the package's identity,
    inside the one function whose purpose is removing exactly that. The first
    package to deliver a CLI and carry lispDependencies would have shipped a
    binary silently missing them. The resolved attrset is also on the context
    for anything the argument does not cover; re-spelling args wholesale is
    rejected by name.
  • mkExecutable gains installSource, plus a written contract for what
    $out contains and what a delivered image may assume about its
    surroundings. A Lisp image that resolves its ASDF source root from
    *runtime-pathname* found nothing, because this function published
    $out/bin and nothing else; the binary died on its first re-load of one of
    its own systems. Both sides were individually correct and disagreed
    silently, so the missing contract was the actual defect. The dependency
    closure is installed alongside the system's own tree — sources that are
    findable while their dependencies' are not fail at the same place, one
    asdf:load-system later.

Changed

  • Breaking: mkPackageFlake's root is required. root ? self was the
    obvious default and never worked: a flake's self is an attrset carrying
    an outPath, and lib.fileset rejects it, so the failure surfaced from
    inside mkLispSource naming neither self nor the argument responsible.
    It survived the suite because examples are handed pkgs and cl directly
    and their self was already a path literal — the test suite could not
    reach the bug because it never exercises a real flake self.
  • Delivered executables carry their version in the store path again.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Jul 15:18
v0.2.0
241faff

Added

  • mkPackageFlake — the nerima-lisp flake standard as a function call
    instead of a template to copy. One call returns a package's whole output
    set (packages, checks, apps, devShells, formatter, overlays)
    from its declarations. It is the only module taking lib without pkgs:
    every other module is instantiated for one pkgs, and a preset built that
    way could only emit the single system it was instantiated for, so this one
    takes systems and obtains a pkgs — and a cl-nix-forge — per declared
    system itself. extraOutputs adds and overrideOutputs replaces, kept
    separate so an intended override stays distinguishable from an accidental
    name collision; a collision is an evaluation error.
  • Implementation table rows for ccl, abcl, clisp and clasp, joining
    sbcl and ecl. CCL is why the rows carry their reasoning: it has no
    --script, rejects a bare filename outright, and needs --batch to route
    an unhandled condition to a non-zero exit — without which a failing suite
    exits 0 and every test appears to pass.
  • This repository's own documentation site, built by its own mkDocsSite.

Changed

  • mkCheckMatrix decides availability from lib.meta.availableOn rather
    than a platform list kept in this library, so one matrix can be written
    once and used on every system — nixpkgs is the authority on where CCL
    builds, and it changes. A platform skip, a caller's skip and an
    expectedFailure remain three distinct things: conflating them would let
    a real regression hide behind an implementation that cannot run on the
    host. A package that IS available here but broken, unfree or insecure
    still throws, exactly as it would anywhere else in nixpkgs.
  • README is a 136-line entry point, under the org standard's 150-line cap,
    with the reference material moved to docs/src/.

Known gaps

  • mkExecutable's two delivery paths are never verified by the same
    machine. The branch is isDarwin && sbcl, so a Linux runner always takes
    asdf:program-op and an aarch64-darwin developer always takes the
    save-lisp-and-die fallback. CI is x86_64-linux only, which leaves the
    Darwin fallback resting on local nix flake check alone.
  • ccl, clisp and clasp rows are unverified by execution on
    aarch64-darwin, where nixpkgs reports all three unavailable. CI is the
    first machine to run them.
  • No consumer has been migrated yet. See the note at the top about 1.0.0.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 29 Jul 12:57
v0.1.0
8feb1e4

First tagged release. Everything below is new; the sections describe what the
library does rather than what changed, since there is no prior version.

Added

Core (lib/core/)

  • lispDerivation — build and test one or more ASDF systems from a source
    tree. $out is source plus compiled FASLs side by side, directly reusable
    as another package's CL_SOURCE_REGISTRY entry. Lisp dependencies enter the
    registry and never buildInputs.
  • lispMultiDerivation — several ASDF systems from one source tree, merged
    into a single derivation when they depend on each other. Systems that merge
    must agree on every non-dependency build argument; disagreement is an
    evaluation error naming the arguments and both systems, never a silent pick.
  • lispWithSystems, lispScript — a wrapped implementation, and a script
    packaged with the same dependency environment.
  • mkScriptCheck — run a check through an arbitrary Lisp entry point instead
    of asdf:test-system, defaulting to the nerima-lisp standard
    run-tests.lisp. Required for a suite that cannot be driven by an enclosing
    test-op: a framework that tests its own ASDF integration puts test-op on
    the plan twice and ASDF rejects it as a circular dependency.
  • mkLispSource — the src a Lisp build should see, as an allowlist. A
    denylist over lib.cleanSourceFilter is wrong in both directions: it keeps
    .fasl/.core and every artefact directory nothing has been taught about
    yet, so a local test run changes the derivation hash; and it cannot
    distinguish "the filter dropped t/" from "t/ was untracked".
  • mkCheckMatrix — declarative multi-implementation test matrix, replacing
    hand-maintained meta.broken predicate lists.
  • markNativeLibrary and the native-loader helpers — a native library
    declared once stays visible to consumers any number of hops away, through
    the same dependency walk as everything else.
  • fromDerivation / fromNixpkgsLisp — consume a nixpkgs or foreign-flake
    package as a dependency. fromNixpkgsLisp requires lispImplementation,
    so a consumer on another implementation fails during evaluation rather than
    attempting to compile FASLs into the immutable Nix store.
  • ancestryWalker / unionAttrsBy — the deduplication primitive the
    multi-system path is built on.

Batteries (lib/batteries/)

  • fromAsdSystem — extract a literal :version from a .asd file.
    Recognises defsystem, asdf:defsystem and asdf/defsystem:defsystem.
    One file normally defines <pkg> and <pkg>/test carrying the same
    version: that unanimity is accepted. Versions that disagree are real drift
    and fail loudly, naming each value and its system.
  • asdSystemVersions — the same extraction keyed by system name.
  • mkTestCheck — a named check for a derivation's asdf:test-system path.
  • mkCommandCheck — run a command (an argv list), assert it produced named
    artifacts, validate them, and publish the artifacts — and only the
    artifacts — as the check's $out.
  • mkCoverageReport — an sb-cover HTML report. SBCL only, and it says so
    during evaluation rather than producing an empty report at build time.
  • mkExecutable — deliver a standalone binary via asdf:program-op, with a
    fallback on Darwin/SBCL where that path was observed to produce no binary
    within five minutes.
  • mkApp, mkTestApp, mkOverlay — flake apps and overlays entries.
  • mkDocsSite, mkDevShell, collect — a mkdocs-material site, a
    nix develop shell, and sibling-package collection from flake inputs.

Known gaps

  • mkExecutable's two delivery paths are never verified by the same machine,
    and CI covers only one of them. The branch is isDarwin && sbcl, so a
    Linux runner always takes asdf:program-op and an aarch64-darwin developer
    always takes the save-lisp-and-die fallback. CI is x86_64-linux only,
    which leaves the Darwin fallback resting on local nix flake check alone.
  • Only sbcl and ecl have rows in the implementation table.
  • The library has no consumers yet. See the note above about 1.0.0.