Fork me on GitHub
#cider
<
2018-12-18
>
manuel07:12:55

hey guys. I moved a project from lein/figwheel to deps.edn/shadow-cljs (already did it successfully for a home project, this is something I'm doing for a work project). I run shadow-cljs watch my-app from the terminal, and then from CIDER: - M-x cider-connect - I pick localhost - I type 8777 And get this in the resulting REPL buffer:

WARNING: CIDER requires nREPL 0.2.12 (or newer) to work properly
         More information.
WARNING: Can't determine Clojure's version. CIDER requires Clojure 1.8.0 (or newer).
         More information.
WARNING: CIDER requires cider-nrepl to be fully functional. Many things will not work without it!
         More information.
This is the shadow-cljs.edn file, if it can help:
{:source-paths ["src/cljs"]
 :nrepl {:port 8777
         :middleware [refactor-nrepl.middleware/wrap-refactor]}
 :dependencies [[bidi "2.1.4"]
                [binaryage/devtools "0.9.10"]
                [cider/cider-nrepl "0.18.0"]
                [cljs-ajax "0.8.0"]
                [clojure-humanize "0.2.2"]
                [com.cemerick/url "0.1.1"]
                [hickory "0.7.1"]
                [day8.re-frame/http-fx "0.1.6"]
                [kibu/pushy "0.3.8"]
                [macchiato/hiccups "0.4.1"]
                [re-frame "0.10.6"]
                [reagent "0.8.1"]
                [reagent-utils "0.3.1"]
                [refactor-nrepl "2.4.0"]]
 :builds {:my-app {:target :browser
                    :output-dir "resources/public/js"
                    :asset-path "/js"
                    :modules {:main {:entries [gaypa-docs.core]}}}}}

manuel07:12:23

deps.edn is here:

{:deps
 {cheshire {:mvn/version "5.8.1"}
  clj-http {:mvn/version "3.9.1"}
  com.cemerick/url {:mvn/version "0.1.1"}
  compojure {:mvn/version "1.6.1"}
  hiccup {:mvn/version "1.0.5"}
  http-kit {:mvn/version "2.3.0"}
  org.clojure/clojure {:mvn/version "1.9.0"}
  org.clojure/core.cache {:mvn/version "0.7.1"}
  org.clojure/data.json {:mvn/version "0.2.6"}
  org.clojure/tools.reader {:mvn/version "1.3.2"}
  metosin/ring-http-response {:mvn/version "0.9.1"}
  mount {:mvn/version "0.1.15"}
  prone {:mvn/version "1.6.1"}
  ring {:mvn/version "1.7.1"}
  ring/ring-defaults {:mvn/version "0.3.2"}
  ring/ring-json {:mvn/version "0.4.0"}
  ring/ring-mock {:mvn/version "0.3.2"}
  ring-middleware-format {:mvn/version "0.7.2"}
  slingshot {:mvn/version "0.12.2"}
  tongue {:mvn/version "0.2.5"}}

 :paths ["src/clj" "resources"]

 :aliases {:run {:main-opts ["-m" "my-app.core"]}
           :test {:extra-paths ["test/clj"]}}}

manuel07:12:38

Don't know what I am missing, to be honest.

lilactown08:12:37

@manuel what version of CIDER are you using?

lilactown08:12:41

and shadow-cljs

manuel08:12:06

CIDER is latest from MELPA. And shadow-cljs: version: 2.7.9 node: v8.14.0

lilactown08:12:33

can you just cider-version to be sure?

manuel08:12:00

CIDER 0.19.0snapshot (package: 20181212.1936)

lilactown08:12:50

your shadow-cljs.edn worked for me

manuel08:12:53

I should also add that doing: (shadow/nrepl-select :my-app) in after cider-connect, gets me a working REPL.

lilactown08:12:07

I have cider 0.18.0 atm so not sure if that’s the reason

manuel08:12:57

not sure either, especially since everything works fine with no warnings on this project: https://github.com/manuel-uberti/boodle

manuel08:12:30

also, adding [cider/cider-nrepl "0.19.0-SNAPSHOT"] to shadow-cljs.edn doesn't fix the warning

manuel08:12:54

I noticed this in the output of shadow-cljs watch :my-app:

[2018-12-18 09:39:02.276 - INFO] Using tools.nrepl 0.2.* server!

manuel09:12:49

Fixed it thanks to @thheller. I have to exclude com.cemerick/austin, which is brought in by macchiato/hiccups: [macchiato/hiccups "0.4.1" :exclusions [com.cemerick/austin]]

martinklepsch11:12:37

had some idea on opening cljdoc from cider and other REPL environments, would be curious what people think of this in general: https://github.com/cljdoc/cljdoc/issues/92#issuecomment-448191639

manuel11:12:10

@martinklepsch FWIW, I welcome every new improvement on documentation, especially if integrated within CIDER

andrea.crotti14:12:40

is there a way to kill both cljs and clj processes with cider-quit?

andrea.crotti14:12:15

every time I have to do a "clean restart" I always have to - kill semi manually the processes - lein clean - and finally jack in clj and cljs

andrea.crotti14:12:43

I can automate that but I need at least an easy way to kill both clj and cljs repls in one go

escherize21:12:12

So, uh, I want to represent a string like

"\newcommand{\itab}[1]{\hspace{1em}\rlap{#1}}"
but I am getting EOF - I think it has something to do with the \n \i \h and/or the \r - How can I just have a string that is literally the string in that snippet?

dpsutton21:12:24

yeah put an extra slash for each one

jonas21:12:42

Is cider 0.18.0 having some issues with clojure 1.10.0? Maybe it’s just my setup but I’m getting NPEs from clojure.string/replace-first on some unrelated errors