Fork me on GitHub
#cider
<
2021-05-08
>
peterdee18:05:54

When I start clojurescript from a shell with clojure -M:middleware/cider-cljs where deps.edn is {:extra-deps {org.clojure/clojurescript {:mvn/version "1.10.773"} nrepl/nrepl {:mvn/version "0.8.3"} cider/cider-nrepl {:mvn/version "0.26.0"} cider/piggieback {:mvn/version "0.5.2"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware,cider.piggieback/wrap-cljs-repl]"]} I get:

peterdee18:05:51

Error while decrypting with "/usr/local/bin/gpg": gpg: encrypted with RSA key, ID E51098C4EAF8AE71 gpg: public key decryption failed: No secret key gpg: decryption failed: No secret key Any ideas what that is about?

dpsutton19:05:38

Can you start debugging? Start removing deps to see if you can reproduce without cider?

peterdee20:05:33

Hi @U11BV7MTK. I think you have the right idea here. The gpg error was a step along the way to debugging what I intend to be a cljs-compatible library. It could be a quirk I could live with, since cider-jack-in-cljs works. The library loads okay in my client and I can check out a few things using it that way (cider-jack-in-clj-cljs). But of course that’s a slow workflow if the problem is with cljs-compatibility of the library. I think I’ll have to get the shadow-cljs.edn figured and then come back to this.

dpsutton20:05:14

i don't know what you're trying to say here

peterdee21:05:50

Sorry about that. I’m saying in essence that I need to learn shadow-cljs better and stop bothering the cider folks with this gpg error!

dpsutton21:05:18

Oh no worries. Do you have any reason to suspect this is a cider issue?

dpsutton21:05:39

That’s why I was suggesting recreating without cider to see if it was related

peterdee21:05:11

Thank you. Regarding your question about it being a cider issue: There might be a cider issue, since I get the same thing about gpg when I start (also from a shell) using :middleware/cider-clj {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"} cider/cider-nrepl {:mvn/version "0.26.0"}} :main-opts ["-m" "nrepl.cmdline" "--middleware" "[cider.nrepl/cider-middleware]"]}

peterdee21:05:34

which is, of course, not pulling in clojurescript or cider/piggyback

dpsutton22:05:27

And what if you totally exclude cider?

peterdee22:05:11

I am still trying to find a way to run shadow-cljs on a library (something without a main) without cider. I’ve just read that shadow-cljs “has its own nREPL middleware and doesn’t rely on piggyback at all”. So the deps I posted originally are wrong!

dpsutton22:05:35

Just run “shadow-cljs cljs-repl” and see what happens. That will start up a cljs repl with your project and no cider involved

peterdee22:05:46

shadow-cljs cljs-repl :main gives me a repl prompt, but when try to change to a project ns, I get No available JS runtime.

dpsutton23:05:31

did you open the app in teh browser or run the js file if its a node project?

peterdee23:05:42

It is a library, not an app. I have :target :node-library in shadow-cljs.edn, which seems to be the right thing. Keep in mind I’m doing this for the first time today! (I’ve used clj for a few years, but cljs an shadow are new.) So while we were corresponding, I’ve been able to cider-jack-in-cljs, and, in fact, things are working (with about 100 warnings!). So the remaining problems are (1) the gpg error and (2) the No available JS runtime both when I start from a shell prompt. I think I have the wrong deps.

peterdee23:05:55

I didn’t answer your question. I didn’t run anything except (in-ns ’some-ns) from the prompt I got when I started.

peterdee23:05:19

Remove ~/.authinfo.gpg and this problem goes away.