Implement researched Guix package outcome for #42: [Guix packaging] larsbrinkhoff/emacs-cl #606

Closed
opened 2026-08-25 12:49:56 +00:00 by htayj · 2 comments
htayj commented 2026-08-25 12:49:56 +00:00 (Migrated from github.com)

Context

This delivery ticket was created from research issue #42 ([Guix packaging] larsbrinkhoff/emacs-cl).

The host-validated research finding follows:

Research evidence: the authoritative upstream is https://github.com/larsbrinkhoff/emacs-cl at fixed commit 19e950e73a336aad476b0d051819a682863a2eff, the 2016-03-11 master tip (no release tags); use Guix version 0-19e950e. The upstream README.md describes Common Lisp implemented in Emacs Lisp, and the pinned tree has 36 implementation .el files under src/, load-cl.el as the loader, batch.el and interaction.el for batch/interactive use, src/tests.el plus src/tests.lisp as the local test harness, and no network or generated foreign-language dependency. COPYING is the complete GNU General Public License version 2 text, so the package license is GPL-2.0-only. The existing tay/packages/larsbrinkhoff-a-f.scm entry larsbrinkhoff-emacs-cl-source already records this exact codeload source, commit, GPL-2.0-only-equivalent Guix license:gpl2, and base32 hash 1jp5zwdjdgkxl7ghyzk3xxm7dsr9k8q3pcdp4446qdyx3ca233p7; reuse that immutable source rather than adding another fetch. This is source-buildable with Guix emacs-build-system, but the upstream src/Makefile only names obsolete emacs20/emacs21/XEmacs executables and must not be used as the Guix test/build driver. No equivalent package with the same upstream origin exists in the inspected local channel or the searched Guix package set: the channel has only the non-buildable larsbrinkhoff-emacs-cl-source snapshot, while Guix emacs-slime/emacs-sly are front ends for an external Common Lisp and clisp is a separate Common Lisp implementation. Delivery brief: add a new module tay/packages/emacs-cl.scm exporting emacs-cl, import guix build-system emacs, guix gexp, guix packages, guix licenses, and tay packages larsbrinkhoff-a-f, set version/source from larsbrinkhoff-emacs-cl-source, use emacs-build-system with #:lisp-directory "src", and declare no propagated or external Common Lisp inputs; emacs-minimal is the build-system byte-compilation input and the source itself supplies the runtime. Because the source directory has no root cl.el matching emacs-build-system’s package-description inference and has no autoload declarations, delete or bypass ensure-package-description, make-autoloads, and validate-compiled-autoloads phases; retain the normal install/build phases so all src/*.el files are installed and byte-compiled, with the default test-file exclusion keeping tests.el out of the runtime output. Add the standard leave-lisp-directory phase before install-license-files (or an equivalent explicit copy) so ../COPYING is installed with the output. Do not install src/emacs-cl unchanged: it hard-codes /home/lars/src/emacs-cl and is not a valid store runtime. The requested Emacs extension needs no command wrapper; load-cl.el must remain co-located with the installed implementation files because it prepends file-name-directory load-file-name and loads the fixed sibling list. If a batch CLI is later included, it must be a generated store-aware wrapper that invokes a declared Emacs runtime with the installed load-cl.el and batch.el, never the upstream script. Isolated smoke-proof plan for implementation: set an explicit emacs-build-system #:test-command that runs from src with emacs --batch -Q -L . -l load-cl.el -l tests.el -f test-cl, capture its summary, and fail unless PASS is nonzero and FAIL evaluation, FAIL compilation, and FAIL execution are all zero; then let the build-system byte-compile the installed .el files. In a fresh batch Emacs, add the built output’s site-lisp/cl-0-19e950e directory to -L, load load-cl.el once, and assert that the loader succeeds and the emacs-cl interactive function and emacs-cl-eval-interactively are bound; also verify the output contains the expected implementation .el files and COPYING while omitting tests.lisp and the broken launcher. Finally run the requested acceptance commands guix lint -L. emacs-cl and guix build -L. emacs-cl on the completed definition. No package proof is claimed by this research; the current result is implementation-ready because the canonical source, fixed revision, legal status, source-build path, package shape, runtime behavior, equivalent-package disposition, and an isolated compatibility smoke plan are all concrete.

Acceptance criteria

  • Implement the viable package change identified in the host-validated research finding.
  • Preserve Guix source provenance, licensing, and deterministic build requirements recorded in the finding.
  • Add and pass a package-specific safe smoke proof using isolated HOME/XDG state before closure.

Imported from GitHub issue/PR. Originally posted by htayj on 2026-08-25T12:49:56Z.

<!-- goocastle-implementation-ticket:sequential-reviewer:42:1:implementation-ready --> ## Context This delivery ticket was created from research issue #42 ([Guix packaging] larsbrinkhoff/emacs-cl). The host-validated research finding follows: Research evidence: the authoritative upstream is https://github.com/larsbrinkhoff/emacs-cl at fixed commit 19e950e73a336aad476b0d051819a682863a2eff, the 2016-03-11 master tip (no release tags); use Guix version 0-19e950e. The upstream README.md describes Common Lisp implemented in Emacs Lisp, and the pinned tree has 36 implementation .el files under src/, load-cl.el as the loader, batch.el and interaction.el for batch/interactive use, src/tests.el plus src/tests.lisp as the local test harness, and no network or generated foreign-language dependency. COPYING is the complete GNU General Public License version 2 text, so the package license is GPL-2.0-only. The existing tay/packages/larsbrinkhoff-a-f.scm entry larsbrinkhoff-emacs-cl-source already records this exact codeload source, commit, GPL-2.0-only-equivalent Guix license:gpl2, and base32 hash 1jp5zwdjdgkxl7ghyzk3xxm7dsr9k8q3pcdp4446qdyx3ca233p7; reuse that immutable source rather than adding another fetch. This is source-buildable with Guix emacs-build-system, but the upstream src/Makefile only names obsolete emacs20/emacs21/XEmacs executables and must not be used as the Guix test/build driver. No equivalent package with the same upstream origin exists in the inspected local channel or the searched Guix package set: the channel has only the non-buildable larsbrinkhoff-emacs-cl-source snapshot, while Guix emacs-slime/emacs-sly are front ends for an external Common Lisp and clisp is a separate Common Lisp implementation. Delivery brief: add a new module tay/packages/emacs-cl.scm exporting emacs-cl, import guix build-system emacs, guix gexp, guix packages, guix licenses, and tay packages larsbrinkhoff-a-f, set version/source from larsbrinkhoff-emacs-cl-source, use emacs-build-system with #:lisp-directory "src", and declare no propagated or external Common Lisp inputs; emacs-minimal is the build-system byte-compilation input and the source itself supplies the runtime. Because the source directory has no root cl.el matching emacs-build-system’s package-description inference and has no autoload declarations, delete or bypass ensure-package-description, make-autoloads, and validate-compiled-autoloads phases; retain the normal install/build phases so all src/*.el files are installed and byte-compiled, with the default test-file exclusion keeping tests.el out of the runtime output. Add the standard leave-lisp-directory phase before install-license-files (or an equivalent explicit copy) so ../COPYING is installed with the output. Do not install src/emacs-cl unchanged: it hard-codes /home/lars/src/emacs-cl and is not a valid store runtime. The requested Emacs extension needs no command wrapper; load-cl.el must remain co-located with the installed implementation files because it prepends file-name-directory load-file-name and loads the fixed sibling list. If a batch CLI is later included, it must be a generated store-aware wrapper that invokes a declared Emacs runtime with the installed load-cl.el and batch.el, never the upstream script. Isolated smoke-proof plan for implementation: set an explicit emacs-build-system #:test-command that runs from src with emacs --batch -Q -L . -l load-cl.el -l tests.el -f test-cl, capture its summary, and fail unless PASS is nonzero and FAIL evaluation, FAIL compilation, and FAIL execution are all zero; then let the build-system byte-compile the installed .el files. In a fresh batch Emacs, add the built output’s site-lisp/cl-0-19e950e directory to -L, load load-cl.el once, and assert that the loader succeeds and the emacs-cl interactive function and emacs-cl-eval-interactively are bound; also verify the output contains the expected implementation .el files and COPYING while omitting tests.lisp and the broken launcher. Finally run the requested acceptance commands guix lint -L. emacs-cl and guix build -L. emacs-cl on the completed definition. No package proof is claimed by this research; the current result is implementation-ready because the canonical source, fixed revision, legal status, source-build path, package shape, runtime behavior, equivalent-package disposition, and an isolated compatibility smoke plan are all concrete. ## Acceptance criteria - Implement the viable package change identified in the host-validated research finding. - Preserve Guix source provenance, licensing, and deterministic build requirements recorded in the finding. - Add and pass a package-specific safe smoke proof using isolated HOME/XDG state before closure. --- Imported from [GitHub issue/PR](https://github.com/htayj/guix-channel/issues/606). Originally posted by [htayj](https://github.com/htayj) on 2026-08-25T12:49:56Z.
htayj commented 2026-08-25 21:29:01 +00:00 (Migrated from github.com)

Goocastle implementation and independent audit found this delivery is blocked on the channel's supported Emacs 30.2, not merely missing package metadata.

The implementation commit 8c4a761 added emacs-cl, an upstream test command, and an isolated loader smoke proof. guix build -L . --no-grafts --no-substitutes emacs-cl repeatedly failed in the upstream suite after loading the 2004 source: the initial cl-mapcar-many symbol was absent; subsequent compatibility shims exposed old global API assumptions (function-information, SYMBOL-FUNCTION, keyword argument handling), and ultimately Emacs 30 compiler-macro collisions (cl--block-wrapper, wrong-number-of-arguments / invalid-function).

An audit attempt to override modern Emacs macro-expansion internals was intentionally stopped: that would not be a bounded, trustworthy package adaptation. No package commit was merged or pushed, and the required isolated smoke proof never passed.

This requires an upstream-compatible Emacs port or an explicitly supported older Emacs package before delivery can safely resume. The Goocastle runner improvement for bounded agent phases and structured escalation is tracked as htayj/goocastle#299.


Imported from GitHub comment. Originally posted by htayj on 2026-08-25T21:29:01Z.

Goocastle implementation and independent audit found this delivery is blocked on the channel's supported Emacs 30.2, not merely missing package metadata. The implementation commit `8c4a761` added `emacs-cl`, an upstream test command, and an isolated loader smoke proof. `guix build -L . --no-grafts --no-substitutes emacs-cl` repeatedly failed in the upstream suite after loading the 2004 source: the initial `cl-mapcar-many` symbol was absent; subsequent compatibility shims exposed old global API assumptions (`function-information`, `SYMBOL-FUNCTION`, keyword argument handling), and ultimately Emacs 30 compiler-macro collisions (`cl--block-wrapper`, wrong-number-of-arguments / invalid-function). An audit attempt to override modern Emacs macro-expansion internals was intentionally stopped: that would not be a bounded, trustworthy package adaptation. No package commit was merged or pushed, and the required isolated smoke proof never passed. This requires an upstream-compatible Emacs port or an explicitly supported older Emacs package before delivery can safely resume. The Goocastle runner improvement for bounded agent phases and structured escalation is tracked as htayj/goocastle#299. --- Imported from [GitHub comment](https://github.com/htayj/guix-channel/issues/606#issuecomment-5417054711). Originally posted by [htayj](https://github.com/htayj) on 2026-08-25T21:29:01Z.
Owner

Delivered in signed, Guix-authenticated commit 145a1535a14643b4d65e50e0589085d7e41da2a6, resolving the previously recorded Emacs30 incompatibility.

Pinned GPL2-only source 19e950e73a336aad476b0d051819a682863a2eff, emacs-cl0-19e950e. Compatibility uses local symbol renames/representation adaptation, not overriding Emacs compiler or macroexpansion globals. Full upstream suite retained and fail-closed.

Main OMP proof: local daemon build and --check reproducibility, offline lint, source inventory and make check-emacs-cl passed. Output /gnu/store/rwywwif2v5fsdip622i0fdvxhdq9a0iz-emacs-cl-0-19e950e. Upstream180 passes,0 evaluation/compilation/execution failures. Relative patch-path lint warnings and obsolete Emacs alias warnings remain disclosed.

Installed offline fresh HOME/XDG smoke passed arithmetic, DEFUN, keyword argument order, LOOP, PARSE-INTEGER, FORMAT, bignums, compilation, closures, mixed nested backquotes, condition handling and bounded batch-debugger EOF exit. Store fingerprint/modes unchanged. Independent reviewer retracted a speculative nested-backquote finding after CLHS derivation; original proven implementation retained and the added mixed-case test passed with the correct multiple-value envelope.

__omp_shell("Actual Common Lisp result")

PNG SHA256 c1c356bd59567fdf78db45cbdd498b6b43296dbc3f7b065d782c6e321b91eb3a: actual installed evaluator defines DOUBLE and calls it on21, returning (42) (list of Common Lisp values). Stderr deprecation warnings were retained separately, not suppressed in normal proof. OMP execution only; no profile or live editor changed.

Delivered in signed, Guix-authenticated commit `145a1535a14643b4d65e50e0589085d7e41da2a6`, resolving the previously recorded Emacs30 incompatibility. Pinned GPL2-only source `19e950e73a336aad476b0d051819a682863a2eff`, emacs-cl0-19e950e. Compatibility uses local symbol renames/representation adaptation, not overriding Emacs compiler or macroexpansion globals. Full upstream suite retained and fail-closed. Main OMP proof: local daemon build and --check reproducibility, offline lint, source inventory and make check-emacs-cl passed. Output `/gnu/store/rwywwif2v5fsdip622i0fdvxhdq9a0iz-emacs-cl-0-19e950e`. Upstream180 passes,0 evaluation/compilation/execution failures. Relative patch-path lint warnings and obsolete Emacs alias warnings remain disclosed. Installed offline fresh HOME/XDG smoke passed arithmetic, DEFUN, keyword argument order, LOOP, PARSE-INTEGER, FORMAT, bignums, compilation, closures, mixed nested backquotes, condition handling and bounded batch-debugger EOF exit. Store fingerprint/modes unchanged. Independent reviewer retracted a speculative nested-backquote finding after CLHS derivation; original proven implementation retained and the added mixed-case test passed with the correct multiple-value envelope. __omp_shell("[Actual Common Lisp result](https://192.168.7.121/tay/guix-channel/raw/commit/145a1535a14643b4d65e50e0589085d7e41da2a6/.goocastle/evidence/issue-606.png)") PNG SHA256 `c1c356bd59567fdf78db45cbdd498b6b43296dbc3f7b065d782c6e321b91eb3a`: actual installed evaluator defines DOUBLE and calls it on21, returning `(42)` (list of Common Lisp values). Stderr deprecation warnings were retained separately, not suppressed in normal proof. OMP execution only; no profile or live editor changed.
tay closed this issue 2026-09-30 00:31:33 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tay/guix-channel#606
No description provided.