Commit c37fb45
authored
Fix
* tramp-sample-project: fix Lein not finding `java` after cider-jack-in
This is a workaround that can be removed when `PATH` is picked up
correctly when jacking in on the running remote.
Circumvents:
```
Tramp: Opening connection nrepl-server for root@localhost using sshx...done
[nREPL] Starting server via lein update-in :dependencies conj \[nrepl/nrepl\ \"1.0.0\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.40.0\"\] -- repl :headless :host localhost
error in process sentinel: let: Could not start nREPL server: /usr/local/bin/lein: line 224: type: java: not found
Leiningen couldn't find 'java' executable, which is required.
Please either set JAVA_CMD or put java (>=1.6) in your $PATH (/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin).
("exited abnormally with code 1")
```
* tramp-sample-project: add `cider-jack-in` method to README
* Fix `cider-jack-in` failing with SSH remotes
Calling cider-jack-in from a tramp buffer on a ssh-remote would throw:
"error in process filter: Wrong type argument: stringp, nil"
This happens because nrepl--ssh-tunnel-connect is trying to infer the
hostname from the current filename: It string-matches
on (buffer-file-name) which returns nil in
the *cider-uninitialized-repl* buffer.
For the jack-in use-case, the local var nrepl-project-dir will
always be bound when connecting the client, so we can use
it as a fallback.
Fixes #3541cider-jack-in failing in remote ssh buffers (#3544)1 parent c374b18 commit c37fb45
File tree
5 files changed
+39
-5
lines changed- dev/tramp-sample-project
- test
5 files changed
+39
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
9 | 16 | | |
10 | 17 | | |
11 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
274 | 280 | | |
275 | 281 | | |
276 | 282 | | |
| |||
587 | 593 | | |
588 | 594 | | |
589 | 595 | | |
590 | | - | |
591 | | - | |
| 596 | + | |
592 | 597 | | |
593 | 598 | | |
594 | 599 | | |
595 | 600 | | |
596 | | - | |
597 | | - | |
| 601 | + | |
598 | 602 | | |
599 | 603 | | |
600 | 604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
161 | 182 | | |
162 | 183 | | |
163 | 184 | | |
| |||
0 commit comments