-
-
Notifications
You must be signed in to change notification settings - Fork 648
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
shadow-cljs repl has incorrect cider-repl-type #2305
Comments
I'm seeing the same behavior on a figwheel project.
notice that the cljs jack in returns repl-type "clj". That poisons everything. |
results in
I can prevent this behavior by using cemerick/piggieback 0.2.2. When i inhibit CIDER from injecting cider/pigggieback this problem goes away. |
@dpsutton Are you using the latest version of Figwheel, btw? |
ah good point. no this was |
its also possible that this clj status is because both cider/piggieback and cemerick/piggieback are both present now that cider unconditionally injects cider/piggieback 0.3.5 |
0.5.16 is the first Figwheel that works with cider/piggieback, so one mystery was solved.
Maybe. Having both deps around would make the decision which one to use somewhat arbitrary, as it would depend on the order in which cider-nrepl and fidwheel are checking for their presence. |
With nrepl message logging enabled I can see that we're getting back The set of relevant messages was:
|
I'm seeing this with figwheel repl too |
For the latest version?
On Sun, 3 Jun 2018 at 5:14, Anton Chikin ***@***.***> wrote:
I'm seeing this with figwheel repl too
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2305 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGVyogURa0gp0uY-uSm0bceo8F5fMYTks5t4vIvgaJpZM4UWZHf>
.
--
Best Regards,
Bozhidar Batsov
http://www.batsov.com
|
I'm using figwheel 0.5.16 with cemerick/piggieback 0.2.2 (cider/piggieback does not work in our application). I am seeing the same behavior
|
@dpsutton see the conversation here. |
@bbatsov did you forget a link? |
Basically you should just debug the middleware check and see what's going wrong there. Likely the fix is pretty simple, but I don't have time for this until next week. And we'll likely add this workaround to be able to control the REPL-type only manually just to be on the safe side. |
Would it be possible to prevent this behavior soon? I'm getting issues under both CIDER 0.1.7 (stable) and 0.1.8-SNAPSHOT. It would help if I could use a known-good setup (like com.cemerick/piggieback 0.2.2) or something very close to that. |
(message above edited, you might have received an empty-looking email) |
I'm reasonably sure the issue is something to do with the middleware check, not with piggieback itself (after all shadow doesn't even use it). |
That mostly a workaround for cases where the track-state REPL type detection is not functioning properly (seems right now it's not working properly for shadow-cljs).
I think i've figured out why but the obvious fix breaks things. So shadow-cljs was nice enough to mimic piggieback's location of the cljs compiler environment for us:
Because we check for this comiler-env in cider-nrepl to see if we are in cljs land:
but the problem is that CIDER automatically injects cider.piggieback 0.3.5 in every clojurescript project now. So ciderpiggieback is resolved and that var is nil since piggieback isn't involved at all (only the fake version provided by shadow-cljs). I am trying the simple fix of replacing But since we have injected cider/piggieback that test will always return the cider/path. |
also note that if i
(-->
id "3"
op "describe"
session "d51070db-b94a-44a6-aa52-4e3972949ecf"
time-stamp "2018-06-30 23:25:49.857913501"
)
(<--
id "3"
session "d51070db-b94a-44a6-aa52-4e3972949ecf"
time-stamp "2018-06-30 23:25:49.866874251"
aux (dict ...)
ops (dict
cljs/select (dict)
clone (dict)
close (dict)
describe (dict)
eval (dict)
interrupt (dict)
load-file (dict)
ls-sessions (dict)
stdin (dict))
status ("done")
versions (dict ...)
) and further down in the messages error messages not recognizing the ops:
|
Fixed by clojure-emacs/cider-nrepl#535 |
Expected behavior
When a shadow-cljs clojurescript repl is launched with cider-jack-in-clojurescript (selecting "shadow" as the repl type) the value of the cider-repl-type variable should be "cljs" so cider-eval and friends work.
Actual behavior
The clojurescript repl starts correctly but the value of cider-repl-type is "clj" and attempts to evaluate clojure script code give an error like
Running
(cider-repl-set-type "cljs")
with emacs in the clojurescript buffer fixes the problemSteps to reproduce the problem
cider-jack-in-clojurescript
Environment & Version information
CIDER version information
shadow-cljs version
cli version: 2.3.32 node: v6.9.2
Emacs version
GNU Emacs 25.1.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1911)) of 2016-09-21
Operating system
OSX 10.13.4 "High SIerra"
The text was updated successfully, but these errors were encountered: