Hello all! To keep this short, I use emacs to build and maintain my blog in github pages. To do that, I have a file `build-site.el`, which gets called by a simple bash script like this:
emacs -Q --script build-site.el
It used to work properly, yet greedy as I am I decided to implement a couple of new *features*, and to achieve that functionality I decided to install `straight.el`:
(setq straight-vc-git-default-clone-depth 1)
(setq straight-recipes-gnu-elpa-use-mirror t)
;; Default installation function, as found in straight.el repo
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 6))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)
;; This was added for debugging purposes, unnecessarily
(message "Install.el has been properly evaluated")))
;; In any case load the bootstrap file
;; This is where the error is caused:
;; I changed the line a little bit hoping for a clearer debug message
(load bootstrap-file)) ;nil))
Simply using the functions I have in my *main conf*, however, was not enough since the process exited with code 255 (error). This I could not reproduce locally (since the functions themselves worked for me) and the error occured only in the github actions machine as seen [here](https://github.com/chatziiola/chatziiola.github.io/actions/runs/3800324766/jobs/6463691228). I suspected that this has something to do with the limited environment in which emacs must run in the target VM.
To gain a better understanding I modified the 'package installer' (the preceding lisp snippet) section by adding the following lines at the beginning:
;; Changing these directories is what let me (hopefully) reproduce the error from github pages locally
(setq user-emacs-directory (expand-file-name "./.emacs.d"))
(setq package-user-dir user-emacs-directory)
(setq straight-base-dir user-emacs-directory)
And this gave me the error you see here:
Debugger entered--Lisp error: (error "straight-ert-print-hack.el:0:0: error: file-missin...")
signal(error ("straight-ert-print-hack.el:0:0: error: file-missin..."))
error("%s:0:0: error: %s: %s" "straight-ert-print-hack.el" file-missing ("Opening input file" "No such file or directory" "/Users/maclampis/Github/chatziiola.github.io/.emac..."))
autoload-generate-file-autoloads("straight-ert-print-hack.el" nil "/Users/maclampis/Github/chatziiola.github.io/.emac...")
make-directory-autoloads("/Users/maclampis/Github/chatziiola.github.io/.emac..." "/Users/maclampis/Github/chatziiola.github.io/.emac...")
straight--build-autoloads((:type git :host github :repo "radian-software/straight.el" :files ("straight*.el") :branch "master" :package "straight" :local-repo "straight.el"))
run-hook-with-args(straight--build-autoloads (:type git :host github :repo "radian-software/straight.el" :files ("straight*.el") :branch "master" :package "straight" :local-repo "straight.el"))
straight--build-package((:type git :host github :repo "radian-software/straight.el" :files ("straight*.el") :branch "master" :package "straight" :local-repo "straight.el") nil)
#f(compiled-function () #<bytecode -0x532d0d99a925356>)()
straight--transaction-exec(use-package-\"c809124e9c5270ea1c72e2c3507331d1\"-nil-nil :now #f(compiled-function () #<bytecode -0x532d0d99a925356>))
straight-use-package((straight :type git :host github :repo "radian-software/straight.el" :files ("straight*.el") :branch "master"))
eval-buffer(#<buffer *load*-853969> nil "/Users/maclampis/Github/chatziiola.github.io/.emac..." nil t) ; Reading at buffer position 5397
load-with-code-conversion("/Users/maclampis/Github/chatziiola.github.io/.emac..." "/Users/maclampis/Github/chatziiola.github.io/.emac..." nil nil)
load("/Users/maclampis/Github/chatziiola.github.io/.emac...")
(let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 6)) (if (file-exists-p bootstrap-file) nil (save-current-buffer (set-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/radian-software/..." 'silent 'inhibit-cookies)) (goto-char (point-max)) (eval-print-last-sexp) (message "Install.el has been properly evaluated"))) (load bootstrap-file))
eval-buffer(#<buffer *load*> nil "/Users/maclampis/Github/chatziiola.github.io/build..." nil t) ; Reading at buffer position 3520
load-with-code-conversion("/Users/maclampis/Github/chatziiola.github.io/build..." "/Users/maclampis/Github/chatziiola.github.io/build..." nil t)
load("/Users/maclampis/Github/chatziiola.github.io/build..." nil t t)
command-line-1(("-scriptload" "build-site.el"))
command-line()
normal-top-level()
which I then traced back to this section of straight's `bootstrap.el`:
(straight-use-package `(straight :type git :host github
:repo ,(format "%s/straight.el"
straight-repository-user)
:files ("straight*.el")
:branch ,straight-repository-branch))
It obviously is the *build* of straight.el, yet I hoped that someone here understands a little bit more than that, allowing me to overcome this problem.
I searched for the solution online and could not find another user with the same question. I would gladly appreciate any tips on where to look ...