FStarLang / fstar-mode.el

Emacs support for F*
Apache License 2.0
67 stars 17 forks source link

Using F* remotely, over TRAMP #98

Closed jaybosamiya closed 5 years ago

jaybosamiya commented 5 years ago

I recently tried to use F* remotely over TRAMP, and most of it works beautifully! Thus I thought I should document a few small issues that I faced when trying to do so (and workarounds where I could find them).

cpitclaudel commented 5 years ago

Thanks! Do you have a machine that I could test this on? I used to use Kenji's machine at INRIA, but I don't have access to that one anymore.

fstar-executable path doesn't work correctly, if you use an absolute path

I think I need to test that to understand what the issue is.

"fstar.exe" not found

We could (should?) add a link to the relevant docs to the README.

Code jumping via fstar-jump-to-definition (M-.) and fstar-jump-to-related-error (C-c C-') tries to jump to local files instead of remote files

Just pushed a fix. Please give it a try? :)

jaybosamiya commented 5 years ago

The fix works perfectly (updated checklist above). Thanks for fixing it so quickly! :)

BTW, I had to manually update fstar-mode.el on my machine to pull this. Does it require a manual push on your side to go over to elpa?

As for the testing, I unfortunately do not have the permissions required to grant you access.

The error that comes when using an absolute path is this (copying relevant stuff from *Messages* buffer):

Tramp: Inserting ‘/sshx:jayb@XXXXXX:/home/jayb/lowstar-dlist-trials/ind/DListLowInd.fst’...done
if: Failed to check F*’s version: “/bin/sh: 168: /sshx:jayb@XXXXXX:/home/jayb/everest/FStar/bin/fstar.exe: not found
”

For the remote-path thing, the relevant link (from TRAMP documentation) is: https://www.gnu.org/software/emacs/draft/manual/html_mono/tramp.html#Remote-programs

cpitclaudel commented 5 years ago

BTW, I had to manually update fstar-mode.el on my machine to pull this. Does it require a manual push on your side to go over to elpa?

Updates usually takes a few hours to propagate

The error that comes when using an absolute path is this

Thanks, I tried a blind fix. Please give it a try.

jaybosamiya commented 5 years ago

Updates usually takes a few hours to propagate

Ah, good to know.

Thanks, I tried a blind fix. Please give it a try.

Worked perfectly! Thanks a lot! Updated checklist above.

PS: One of my friends recommended using TRAMP to ssh to localhost to test the effect of having TRAMP in the middle (might be useful for diagnosing things in the future).

cpitclaudel commented 5 years ago

Thanks for testing. I've updated the README. Let me know if you run into further issues!