Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
Arne Brasseur
Anyone seen behavior where clj-refactor causes namespaces to load automatically on repl start?
I had to disable it because it's really messing up my workflow, but I didn't find an issue related to this so maybe it's something particular to my setup. Any idea what could be causing this?
Benedek Fazekas
yup, this is know behaviour. the analyzer we use (tools.analyzer.jvm) evals the code in order to be able to analyze it
there are a few config options to opt out if you prefer
opting out also means tho that certain (the more interesting) features won't work
Mikey Reilly
I'm using clojure-maven-plugin. When I do a cider-connect I get this "WARNING: clj-refactor and refactor-nrepl are out of sync. Their versions are 2.4.0-SNAPSHOT (package: 20171117.317) and n/a, respectively." Is there anything I can do to my pom.xml to make this warning go away? I've tried adding refactor-nrepl 2.4.0-SNAPSHOT as a dependency.
Lars Andersen
@mikeyreilly0_twitter the middleware for clj-refactor isn't being started, so there's no reply when clj-refactor sends messages that way
Short of using lein or boot there isn't much to be done about that
Well, you could leave clj-refactor off. Almost all the stuff that works without a middleware has been moved over to clojure-mode, so you won't lose much functionality of you do that
My recommendation would be to use something other than clojure-maven-plugin. It looks like abandonware to me.
Mikey Reilly
@expez Thanks for your help. I know I wouldn't have this problem with lein or boot. The reason I'm stuck with maven is that I've started a new job in a java house and I'm trying to sneak a little clojure through the back door. Adding some clojure stuff while continuing to use maven is not as disruptive as getting folks to agree to using new build tools would be. In fairness to clojure-maven-plugin, I've managed to get it to do everything I need. It's just that this warning is irksome. Your advice encourages me to put up with it and not waste more time trying to discover a remedy.
Lars Andersen
@mikeyreilly0_twitter You can try this branch: clojure-emacs/clj-refactor.el#392
Just remembered that someone else had the same problem
Jeaye Wilkerson
I'm looking to just run the refactoring logic available from my repl. I'm not using emacs, the one vim plugin for refactor-nrepl doesn't work (and is >1 year stale), and editor integration doesn't matter to me. I've tried following the readme and using something like (with-open [conn (repl/connect :port 36607)] (-> (repl/client conn 1000) (repl/message {:op :version}) repl/response-values)) but that doesn't seem to be the complete picture. Any help would be great.
Lars Andersen
@jeaye Just call the refactoring functions directly
You can see how that is done in the middleware namespace
There is some lazy-loading extras in that namespace, but it should be pretty clear how it works
Jeaye Wilkerson
@expez I'll give that a shot. Thank you.
Chris Sims
looks like one of the builds for my PR failed due to a 503 from Clojars: https://travis-ci.org/clojure-emacs/refactor-nrepl/builds/327930338
what's the best way to kick off a new build?
hmm looks like I can close and re-open the PR to trigger a build? I'll try that...
hey, that works!
Does anyone here use ejc-sqlby any chance?
Jon Pither
Hi, all trying to clean up a ns declaration using 2.5.0-SNAPSHOT, on a project with checkout deps... I get: => nil cljr--get-error-value: Error in nrepl-refactor: java.lang.NullPointerException: null at refactor_nrepl.core$cljc_file_QMARK_.invokeStatic (core.clj:129) refactor_nrepl.core$cljc_file_QMARK_.invoke (core.clj:127) clojure.core$some_fn$sp3__8653.invoke (core.clj:7461) refactor_nrepl.core$source_file_QMARK_.invokeStatic (core.clj:152) refactor_nrepl.core$source_file_QMARK_.invoke (core.clj:146) refactor_nrepl.ns.clean_ns$clean_ns.invokeStatic (clean_ns.clj:44) refactor_nrepl.ns.clean_ns$clean_ns.invoke (clean_ns.clj:39) clojure.lang.Var.invoke (Var.java:384)