"Patrick Ohly" <[email protected]> writes:

I am using Tramp over ssh to do remote development in Go. This works reasonably well with gopls, thanks to everyone who has made this possible! Magit tends to be slow, so I gave up trying to use it.

I think you have asked a few unrelated things here, so I'm just going to answer everything as best I can (full disclaimer: I'm not expert in some of this).

I've heard magit makes excessive calls to git because git is supposed to be cheap. I believe that cannot be understated: in my opinion working with a remote git repo is a serious abuse of git. It is designed to fetch everything from the remote to a local copy, and all operations that would be expensive done on a remote location become cheap(er) done locally. This is fundamental to git's design, and remains true even if you run the code remotely.

Just my opinion.

With the hope of improving performance, I tried out sshfs. I ran into some shortcomings (bugs?) compared to ssh. If this is not the right place to report those then please ignore. I'm not subscribed to the list, please group-reply. But I can also subscribe, it that's required or preferred.

If the bugs are with the TRAMP's sshfs method, this is the right place. If it's with sshfs itself, it's not.

I am using Emacs 30.1 with Tramp 2.8.1.3, go-mode 20250311.156, magit 20260401.2251 (all packages updated via elpa yesterday). gopls is installed in /usr/local/bin on the remote host.

When I open a Go file, *Warnings* opens and I get:
   ⛔ Warning (tramp): STDERR not supported

I don't have a workaround. Because this takes up screen space it's pretty annoying.

How are you starting the server? And do you need to run it remotely? As I said earlier a local git repo is better, but if your language server needs more than just access to the repo it becomes a slightly different matter.

When trying to start lsp, it fails:

LSP :: The following servers support current file but do not have automatic installation: semgrep-ls-tramp golangci-lint-tramp gopls-tramp You may find the installation instructions at https://emacs-lsp.github.io/lsp-mode/page/languages.
   (If you have already installed the server check *lsp-log*).

This is straying into LSP territory that might not be related to TRAMP, but FWIW, are you using lsp-mode? If so I would suggest eglot instead.

That's because it doesn't find the gopls command (visible in *lsp-log*). I found that I can work around that by creating a symlink to it in /bin. The reasons seems to be
https://emacs.stackexchange.com/questions/81829/tramp-sshfs-remote-command-execution-doesnt-respect-tramp-remote-path-or-tra
I think it should work the same as ssh and use the remote path settings.

I personally would not do remote execution with sshfs; it's a filesystem, and not a remote environment.

magit gathers some information, but then fails with:

   magit-rev-diff-count: Wrong type argument: stringp, nil

This is after some more warnings about stderr, so maybe related?

You've lost me here, sorry. Can you give an MRE? I think there might be too much going on.

All of this works with tramp over ssh.

This might come down to what I said earlier about sshfs not being an environment.

Regards,

       - Joel

Reply via email to