Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

straight--build-compile: fix compile process load-path #1132

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 11 additions & 8 deletions straight.el
Original file line number Diff line number Diff line change
Expand Up @@ -5257,19 +5257,22 @@ individual package recipe."
RECIPE should be a straight.el-style plist. Note that this
function only modifies the build folder, not the original
repository."
(let* ((dir (straight--build-dir (plist-get recipe :package)))
(let* ((pkg (plist-get recipe :package))
(dir (straight--build-dir pkg))
(emacs (concat invocation-directory invocation-name))
(buffer straight-byte-compilation-buffer)
(deps
(let ((tmp nil))
(dolist (dep (straight--flatten (straight-dependencies pkg))
tmp)
(let ((build-dir (straight--build-dir dep)))
(when (file-exists-p build-dir) (push build-dir tmp))))))
(print-circle nil)
(print-length nil)
(program
(format "%S" `(let ((default-directory ,(straight--build-dir))
(lp load-path))
(setq load-path (list default-directory))
(normal-top-level-add-subdirs-to-load-path)
(setq load-path (append (cons ,dir load-path)
lp))
(byte-recompile-directory ,dir 0 'force))))
(format
"%S" `(progn (setq load-path (append '(,dir) ',deps load-path))
(byte-recompile-directory ,dir 0 'force))))
(args (list "-Q" "--batch" "--eval" program)))
(when buffer (with-current-buffer (get-buffer-create buffer)
(insert (format "\n$ %s %s \\\n %S\n" emacs
Expand Down