Open scturtle opened 11 months ago
I think you're right. Furthermore I think the reason the subdirectory is (incorrectly) added to load-path
is this:
It seems that as a convenience we add all subdirectories in ~/.emacs.d/straight/build
to load-path
, which isn't right. We should only be adding the packages that are dependencies of the one being built; furthermore, even amongst those, we shouldn't be adding subdirectories recursively, only the top level ones.
I think you're right. Furthermore I think the reason the subdirectory is (incorrectly) added to
load-path
is this:It seems that as a convenience we add all subdirectories in
~/.emacs.d/straight/build
toload-path
, which isn't right.
This was a compromise added in #812. Notes from 01eb849125afca684ebefd4a62793df7484685c2:
Previous method involved looking up each package's dependencies. It did not account for local-repo names and transitive dependencies.
I can't recall why the :local-repo
keyword was causing issues (if it was at all).
It looks like straight--symlink-package
uses (straight--build-dir package)
, so I don't think it should be a problem.
We should only be adding the packages that are dependencies of the one being built; furthermore, even amongst those, we shouldn't be adding subdirectories recursively, only the top level ones.
Agreed. Now that we have straight-dependencies
we can easily get the transitive dependencies (it looks like my initial attempt relied on straight--get-dependencies
, which did not return transitive dependencies, leading to the compromise).
2023-11-17 23:34:40
gnu/linux
prerelease (HEAD -> fix/compile, fork/fix/compile) 058bcdd 2023-11-17
GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38, cairo version 1.18.0) of 2023-11-16
Excellent, thank you so much! I was not looking forward to that refactor.
What's wrong
Tree-sitter
tsc
module will be re-built instead of being downloaded withstraight-rebuild-package
.Directions to reproduce.
.emacs.d/init.el
:Run
emacs --init-directory /tmp/.emacs.d
the first time, thetsc
module should be downloaded correctly.In Emacs, run
C-u M-x straight-rebuild-package
and entertree-sitter
to rebuildtree-sitter
andtsc
. Thetsc
module will be built from source this time.details
*straight-byte-compilation*
:it seems that
.emacs.d/straight/build/tree-sitter-langs/bin
is included inload-path
while doingstraight-rebuild-package
. Then during downloadingtsc
module withurl-copy-file
, not knowing why, Emacs will try to load the tree-sitter language files*.dylib
/*.so
as Emacs module and fail. Then tree-sitter will turn to compiletsc
from source.Version information