Implement researched Guix package outcome for #44: [Guix packaging] larsbrinkhoff/forth-mode #607

Closed
opened 2026-08-25 13:31:37 +00:00 by htayj · 1 comment
htayj commented 2026-08-25 13:31:37 +00:00 (Migrated from github.com)

Context

This delivery ticket was created from research issue #44 ([Guix packaging] larsbrinkhoff/forth-mode).

The host-validated research finding follows:

Canonical source and fixed revision: use https://github.com/larsbrinkhoff/forth-mode at commit 4450a3a5629b579f5d2045d0d8aec84193e9a31f. GitHub identifies that commit as the 0.3 release bump (there is no 0.3 tag), and the upstream forth-mode.el header declares Version: 0.3. The local channel already records the codeload source as larsbrinkhoff-forth-mode-source with Guix Nix-base32 hash 0w0amqi1hrmfz99h0fbyr4mypl3jy3aky8jhpiydp794j21ld71n; use its channel version 0-4450a3a and source rather than an unpinned fetch. The source is pure Elisp plus one SwiftForth .fth helper, has no native compilation, and is directly suitable for emacs-build-system. LICENSE is the standard GPL version 3 text and GitHub reports GPL-3.0; use license:gpl3 (SPDX GPL-3.0-only). No non-free or unlicensed bundled dependency was found. Equivalent coverage exists and must be accounted for: authoritative Guix defines emacs-forth-mode@0.2 in gnu/packages/emacs-xyz.scm from the same project homepage but an older NonGNU ELPA 0.2 archive with tests disabled; current NonGNU ELPA publishes forth-mode 0.3, whose installed files match the common files in this pinned commit. The workspace channel has only the larsbrinkhoff-forth-mode-source preservation package and no built mode package. Therefore add/update the emacs-forth-mode identity in tay/packages/forth-mode.scm from the pinned source, intentionally replacing/overriding the older 0.2 package when this channel package is selected rather than inventing a different upstream package identity. Import guix build-system emacs, guix gexp, guix packages, gnu packages forth, and tay packages larsbrinkhoff-a-f; set build-system to emacs-build-system, reuse package-source/package-version from larsbrinkhoff-forth-mode-source, and add (inputs (list gforth)) because run-forth starts Gforth at runtime and the ERT completion test starts the same process. cl-lib, comint, smie, url, and Gnus mm-url are Emacs libraries, so no separate Elisp input is required and Emacs is supplied automatically by emacs-build-system. The default include set installs top-level .el files but omits nested backends; extend it with ^backend/.$ so forth-mode.el, forth-block-mode.el, forth-interaction-mode.el, forth-parse.el, forth-smie.el, forth-spec.el, forth-syntax.el, all backend .el files, and backend/swiftforth.fth are installed. Exclude the build helper build.el and the test-generated autoloads.el from the installed payload while retaining Guix-generated package autoloads. In an unpack phase use emacs-substitute-variables on forth-interaction-mode.el to set the default forth-executable to search-input-file inputs /bin/gforth. This is the required runtime behavior: no shell wrapper is needed because run-forth calls make-comint-in-buffer with that absolute store path; the Gforth backend is then dynamically loaded from the installed backend directory and sends its existing ' drop is Attr! initialization probe. Adapt the obsolete Makefile test pin without changing upstream files: before check, mark only the ERT test forth-spec-parsing as skipped because it calls url-retrieve-synchronously against the live forth-standard.org/lars.nocrew.org indexes and cannot be part of an offline Guix build; retain all other ERT tests. Set HOME to the build TMPDIR and run the test command as make check FORTH=<the exact /bin/gforth input path>, which exercises build.el batch byte-compilation and ERT, including forth-completion-at-point's Gforth assertion that completion of 2c yields 2Constant. Specific acceptance proof: run guix lint -L. emacs-forth-mode and guix build -L. emacs-forth-mode; in a network-disabled temporary environment, keep the unpacked source's test/.fth fixtures as the fixture working directory while -L points to the installed output directory share/emacs/site-lisp/forth-mode-0-4450a3a, require forth-mode, forth-block-mode, and forth-interaction-mode, visit test/noblock.fth, test/block1.fth, and test/block2.fth to assert forth-mode and the expected block-mode state, require the Gforth backend through an actual run-forth process, and assert the process is killed cleanly. These checks establish the requested mode/backend installation and packaged-Gforth runtime behavior without claiming those package proofs have already run.

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-25T13:31:37Z.

<!-- goocastle-implementation-ticket:sequential-reviewer:44:1:implementation-ready --> ## Context This delivery ticket was created from research issue #44 ([Guix packaging] larsbrinkhoff/forth-mode). The host-validated research finding follows: Canonical source and fixed revision: use https://github.com/larsbrinkhoff/forth-mode at commit 4450a3a5629b579f5d2045d0d8aec84193e9a31f. GitHub identifies that commit as the 0.3 release bump (there is no 0.3 tag), and the upstream forth-mode.el header declares Version: 0.3. The local channel already records the codeload source as larsbrinkhoff-forth-mode-source with Guix Nix-base32 hash 0w0amqi1hrmfz99h0fbyr4mypl3jy3aky8jhpiydp794j21ld71n; use its channel version 0-4450a3a and source rather than an unpinned fetch. The source is pure Elisp plus one SwiftForth .fth helper, has no native compilation, and is directly suitable for emacs-build-system. LICENSE is the standard GPL version 3 text and GitHub reports GPL-3.0; use license:gpl3 (SPDX GPL-3.0-only). No non-free or unlicensed bundled dependency was found. Equivalent coverage exists and must be accounted for: authoritative Guix defines emacs-forth-mode@0.2 in gnu/packages/emacs-xyz.scm from the same project homepage but an older NonGNU ELPA 0.2 archive with tests disabled; current NonGNU ELPA publishes forth-mode 0.3, whose installed files match the common files in this pinned commit. The workspace channel has only the larsbrinkhoff-forth-mode-source preservation package and no built mode package. Therefore add/update the emacs-forth-mode identity in tay/packages/forth-mode.scm from the pinned source, intentionally replacing/overriding the older 0.2 package when this channel package is selected rather than inventing a different upstream package identity. Import guix build-system emacs, guix gexp, guix packages, gnu packages forth, and tay packages larsbrinkhoff-a-f; set build-system to emacs-build-system, reuse package-source/package-version from larsbrinkhoff-forth-mode-source, and add (inputs (list gforth)) because run-forth starts Gforth at runtime and the ERT completion test starts the same process. cl-lib, comint, smie, url, and Gnus mm-url are Emacs libraries, so no separate Elisp input is required and Emacs is supplied automatically by emacs-build-system. The default include set installs top-level .el files but omits nested backends; extend it with ^backend/.*$ so forth-mode.el, forth-block-mode.el, forth-interaction-mode.el, forth-parse.el, forth-smie.el, forth-spec.el, forth-syntax.el, all backend .el files, and backend/swiftforth.fth are installed. Exclude the build helper build.el and the test-generated autoloads.el from the installed payload while retaining Guix-generated package autoloads. In an unpack phase use emacs-substitute-variables on forth-interaction-mode.el to set the default forth-executable to search-input-file inputs /bin/gforth. This is the required runtime behavior: no shell wrapper is needed because run-forth calls make-comint-in-buffer with that absolute store path; the Gforth backend is then dynamically loaded from the installed backend directory and sends its existing ' drop is Attr! initialization probe. Adapt the obsolete Makefile test pin without changing upstream files: before check, mark only the ERT test forth-spec-parsing as skipped because it calls url-retrieve-synchronously against the live forth-standard.org/lars.nocrew.org indexes and cannot be part of an offline Guix build; retain all other ERT tests. Set HOME to the build TMPDIR and run the test command as make check FORTH=<the exact /bin/gforth input path>, which exercises build.el batch byte-compilation and ERT, including forth-completion-at-point's Gforth assertion that completion of 2c yields 2Constant. Specific acceptance proof: run guix lint -L. emacs-forth-mode and guix build -L. emacs-forth-mode; in a network-disabled temporary environment, keep the unpacked source's test/*.fth fixtures as the fixture working directory while -L points to the installed output directory share/emacs/site-lisp/forth-mode-0-4450a3a, require forth-mode, forth-block-mode, and forth-interaction-mode, visit test/noblock.fth, test/block1.fth, and test/block2.fth to assert forth-mode and the expected block-mode state, require the Gforth backend through an actual run-forth process, and assert the process is killed cleanly. These checks establish the requested mode/backend installation and packaged-Gforth runtime behavior without claiming those package proofs have already run. ## 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/607). Originally posted by [htayj](https://github.com/htayj) on 2026-08-25T13:31:37Z.
htayj commented 2026-08-26 03:07:52 +00:00 (Migrated from github.com)

Delivered after the Gooflow package implementation, audit, and isolated safe proof passed. The two phase commits were host-signed and verified before fast-forward integration; resumed command-phase sandbox context is tracked separately in htayj/goocastle#301.


Imported from GitHub comment. Originally posted by htayj on 2026-08-26T03:07:52Z.

Delivered after the Gooflow package implementation, audit, and isolated safe proof passed. The two phase commits were host-signed and verified before fast-forward integration; resumed command-phase sandbox context is tracked separately in htayj/goocastle#301. --- Imported from [GitHub comment](https://github.com/htayj/guix-channel/issues/607#issuecomment-5420015402). Originally posted by [htayj](https://github.com/htayj) on 2026-08-26T03:07:52Z.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#607
No description provided.