Fork me on GitHub
#emacs
<
2018-09-15
>
cmack18:09:21

I’m trying experiment with cider+nrepl+figwheel.main using “new” deps.edn method but am not having luck. Does anyone have an example emacs config or project config that is working with nrepl 0.4.5 and figwheel.main they could point me too?

dpsutton18:09:24

what are your symptoms @cmack?

dpsutton18:09:15

i used the following dir-locals to get it to use the correct alias:

((nil
  (cider-clojure-cli-global-options . "-A:fig")))
and we have the same type of project except that i'm not using nrepl 0.4.5

cmack18:09:35

On the road again after car was repaired. Will post more when home

cmack19:09:57

@dpsutton the .dir-locals looks promising…

cmack19:09:16

right now, I’m seeing

[nREPL] Starting server via /opt/local/bin/clojure -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware", "cider.piggieback/wrap-cljs-repl"])'...
error in process sentinel: nrepl-server-sentinel: Could not start nREPL server: Exception in thread "main" java.io.FileNotFoundException: Could not locate cider_nrepl/main__init.class or cider_nrepl/main.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.

cmack19:09:25

in messages buffer

dpsutton19:09:22

[nREPL] Starting server via /usr/local/bin/clojure -Sdeps '{:deps {org.clojure/tools.nrepl {:mvn/version "0.2.13"} cider/cider-nrepl {:mvn/version "0.18.0"}}}' -e '(require (quote cider-nrepl.main)) (cider-nrepl.main/init ["cider.nrepl/cider-middleware"])'
this is what mine looks like. I wonder why yours doesn't specify coordinates for cider-nrepl itself

cmack19:09:05

{:deps {org.clojure/clojure {:mvn/version "1.9.0"}}
 :aliases {:fig {:extra-deps
                  {org.clojure/clojurescript {:mvn/version "1.10.339"}
                   com.bhauman/rebel-readline-cljs {:mvn/version "0.1.4"}
                   com.bhauman/figwheel-main {:mvn/version "0.1.5"}
                   cider/cider-nrepl {:mvn/version "0.18.0"}
                   nrepl/nrepl {:mvn/version "0.4.5"}
                   reagent {:mvn/version "0.7.0"}}
                 :extra-paths ["resources" "target"]
                 :main-opts ["-m" "figwheel.main"]}
           :build {:main-opts ["-m" "figwheel.main" "-b" "dev" "-r"]}
           :min   {:main-opts ["-m" "figwheel.main" "-O" "advanced" "-bo" "dev"]}}}
is the deps.edn I’m working from… I think a good portion was generated from a reagent starter template

dpsutton19:09:32

you can take the rebel readline out. it won't place nice with emacs

dpsutton19:09:40

did you try the dir locals? I'm not seeing the alias in there

dpsutton19:09:51

try evaluating (hack-local-variables)

dpsutton19:09:21

there's some logic in CIDER about whether to look for dir locals or not and i haven't followed the logic to understand when/if it does

cmack20:09:13

hmm C-h a says the .dir-locals.el is being read… I’ll try hack-local-variables next

cmack20:09:06

… still not seeing -A:fig injected