-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Fix running checkers on remote hosts via TRAMP. #1842
base: master
Are you sure you want to change the base?
Conversation
(command (mapconcat #'shell-quote-argument | ||
(cons abs-prog (cdr wrapped)) " "))) | ||
(cons program (cdr wrapped)) " "))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be obsolete. flycheck-find-checker-executable
calls flycheck-executable-find
which calls executable-find
which returns an absolute path.
I'll do something about the Travis CI errors |
04804e9
to
647f11e
Compare
👍 This is very exciting stuff. I'm swamped with work right now, but I should have time to look at this later this month. Hope that's OK! |
Absolutely. I still have to get the tests to pass. I get different results locally 🤔 |
0c28c12
to
ee9f4bc
Compare
First of all, this only works with Emacs 27.1, the first version to include the second, optional Please see my comment about I don't know what's up with the tests. These https://gist.github.com/carrete/8ab881bc3ff1a9c20285f9edf6ce8ac6 are my local test results for Emacs 26.3 and 27.1 which both behave the same. I couldn't get Emacs 25.3 to work. I have no idea why I've been using this version in my day job the past week and haven't noticed any problems. At this point I'm not sure what I should try next. Any ideas would be greatly appreciated, @cpitclaudel. No rush. Thanks! |
f5225e3
to
686424a
Compare
I pushed up an additional change that updates the built-in checkers. Sorry, I shouldn't have submitted the pull-request without this. I was distracted by the odd test failures and forgot about it. I still don't get the same results as on Travis CI. The tests behave better there than they do on my laptop. As for the remaining test failures on Travis CI, I believe these are because |
Hey, why not replace all |
@Blade6570 Do you mean tests passed? Provided I understand the issue correctly, the file name of the buffer must also be localized. |
d4258f4
to
64b57bc
Compare
Based on this pull request, I made further changes so that remote check works on my environment. |
886c2c0
to
f0c70e5
Compare
I needed this recently so I took the opportunity to rebase this on top of the latest upstream, plus add the changes by @yfyyfy to fix the stylelint tests. With these and the move to GitHub Actions the tests now pass. |
Can this be merged? Or #1922 ? It would help me significantly. Thank you |
@jcs090218 I added the flycheck- prefix as requested. Please let me know if you'd like me to make any other changes. Thanks for taking the time to look this over |
Thank you @carrete and @jcs090218 |
Any chance this can be merged? |
This patch does three things: * Update `flycheck-default-executable-find` to search remote hosts when `default-directory` is a remote directory. See also the documentation for [executable-find](https://www.gnu.org/software/emacs/manual/html_node/elisp/Locating-Files.html). * Change uses of `call-process` and `start-process` to `start-file-process` which is the same as these two functions, but starts the process on a remote host when `default-directory` is a remote directory. See also the documentation for [start-file-process](https://www.gnu.org/software/emacs/manual/html_node/elisp/Asynchronous-Processes.html). * Passes the local part of `buffer-file-name` to the compile command, e.g. strips `/ssh:10.0.0.42`, since the checker is run on the remote machine where the file name must be local. See also the documentation for [file-local-name](https://www.gnu.org/software/emacs/manual/html_node/elisp/Magic-File-Names.html).
@marsam , any chance this can be merged? Thank you |
It would be great if this could be merged... |
In response to #1816
This patch does three things:
Update
flycheck-default-executable-find
to search remote hosts whendefault-directory
is a remote directory. See also the documentation forexecutable-find.
Change uses of
call-process
andstart-process
tostart-file-process
which is the same as these two functions, but starts the process on a remote
host when
default-directory
is a remote directory. See also thedocumentation for
start-file-process.
Passes the local part of
buffer-file-name
to the compile command,e.g. strips
/ssh:10.0.0.42
, since the checker is run on the remote machinewhere the file name must be local. See also the documentation for
file-local-name.