julia-snail icon indicating copy to clipboard operation
julia-snail copied to clipboard

Trouble with remote REPLs and straight.el because of broken symlinks

Open 9viz opened this issue 3 weeks ago • 2 comments

I am unsure if this particular problem can be mitigated by giving straight the right recipe for installing julia-snail but I don't know enough about straight to say the answer (I should be using something that I actually understand but oh well...). Because straight symlinks the Julia files from the repository to the build directory, the latter gets added to load-path, when julia-snail does the copy loop (the second cl-loop) in julia-snail--copy-snail-to-remote-host, it ends up copying the symlink to the remote machine. Obviously, this implies that the JuliaSnail.el in remote machine's /tmp/julia-snail-XXX/JuliaSnail.jl is a broken symlink that points to nowhere.

Although all of this is straight.el's fault, I am creating this issue because (1) I want to know if you will accept the following bandage in upstream:

diff --git a/julia-snail.el b/julia-snail.el
index a66eebf..8985666 100644
--- a/julia-snail.el
+++ b/julia-snail.el
@@ -591,7 +591,7 @@ (defun julia-snail--copy-snail-to-remote-host ()
         (cl-loop for f in julia-snail--julia-files do
                  (if (file-directory-p f)
                      (make-directory (concat snail-remote-dir f))
-                   (copy-file f (concat snail-remote-dir (file-name-directory f)) t)))))
+                   (copy-file (file-truename f) (concat snail-remote-dir (file-name-directory f)) t)))))
     snail-remote-dir))

 (defun julia-snail--launch-command ()

and if not, (2) ask fellow straight.el users what the bandaid should look like from straight's side.

9viz avatar Dec 04 '25 09:12 9viz

Seems totally reasonable! Feel free to open a PR, I’ll merge it. For extra points, feel free to update CHANGELOG.md too :)

gcv avatar Dec 04 '25 15:12 gcv

Great! Thanks, I will open a PR as soon as time permits.

9viz avatar Dec 05 '25 11:12 9viz