This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-12-08
Channels
- # adventofcode (60)
- # announcements (3)
- # babashka (31)
- # beginners (5)
- # boot (1)
- # calva (13)
- # cider (9)
- # clj-kondo (1)
- # clojure (135)
- # clojure-italy (18)
- # clojure-nl (18)
- # clojure-spec (21)
- # clojure-uk (11)
- # clojuredesign-podcast (1)
- # clojurescript (47)
- # core-async (14)
- # emacs (7)
- # euroclojure (4)
- # fulcro (3)
- # graalvm (19)
- # off-topic (22)
- # reagent (29)
- # shadow-cljs (25)
- # vim (3)
Hi, can I use clj-refactor with shadow-cljs projects? I'm trying to enable it in a project created with the default re-frame template, but the repl complains that refactor-nrepl is missing WARNING: clj-refactor and refactor-nrepl are out of sync. Their versions are 2.5.0-SNAPSHOT (package: 20190618.716) and n/a, respectively. Already tried to add it as a dependency, on both project.clj and shadow-cljs.edn
Yes, you can!
It looks like you're not loading the refactor-nrepl
dependency (i.e. refactor-nrepl {:mvn/version "2.5.0-SNAPSHOT"}
)
Hi @alsamu, I already added refactor-nrepl as a dependency in project.clj and shadow-cljs.edn
When the repl starts, it shows up in the startup command:
;; Connected to nREPL server -
;; CIDER 0.24.0snapshot (package: 20191129.901), nREPL 0.6.0
;; Clojure 1.10.1, Java 11.0.4
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
;; Startup: /usr/bin/npx shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.2 -d refactor-nrepl:2.5.0-SNAPSHOT -d cider/cider-nrepl:0.23.0-SNAPSHOT server
;;
;; ClojureScript REPL type: shadow
;; ClojureScript REPL init form: (do (require '[shadow.cljs.devtools.api :as shadow]) (shadow/watch :app) (shadow/nrepl-select :app))
;;
[:app] Configuring build.
WARNING: clj-refactor and refactor-nrepl are out of sync.
Their versions are 2.5.0-SNAPSHOT (package: 20190618.716) and n/a, respectively.
You can mute this warning by changing cljr-suppress-middleware-warnings.[:app] Compiling ...
[:app] Build completed. (519 files, 1 compiled, 0 warnings, 11,39s)
But when I try to invoke a clj-refactor command, like C-c C-m a m
. It complains that refactor-nrepl is not available:
user-error: The refactor-nrepl middleware isn't available! Did you remember to install it?