boot-clj / boot

Build tooling for Clojure.
https://boot-clj.github.io/
Eclipse Public License 1.0
1.75k stars 180 forks source link

[question] refactor with cider writes changed to boot cache #632

Closed kurt-o-sys closed 6 years ago

kurt-o-sys commented 7 years ago

Description

I'm trying to refactor a boot project using spacemacs/cider, but changes seem to be written to .boot/cache/..., not to the actual project file(s).

Steps to reproduce

  1. SPC m r r s (spacemacs command to rename a symbol)
  2. \<symbol to replace>
  3. RET
  4. \<new name of the symbol>
  5. I get a message that there were 5 occurences found

Expected behavior

The project files are updated

Actual behavior

Cached files (such as.boot/cache/..../718/-jnm801/<my-project>/core.clj) are updated, the actual project files (such as <project-home>/src/clj/core.clj are unchanged).

Question

How to make changes permanent when refactoring using boot+cider and spacemacs?

Additional info

$ boot -V
#http://boot-clj.com
#Thu Jul 20 13:11:13 CEST 2017
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=RELEASE
BOOT_VERSION=2.7.1
$ cat ~/.boot/profile.boot   
(deftask cider "CIDER profile"
  []
  (require 'boot.repl)
  (swap! @(resolve 'boot.repl/*default-dependencies*)
         concat '[[org.clojure/tools.nrepl "0.2.12"]
                  [cider/cider-nrepl "0.14.0"]
                  [refactor-nrepl "2.3.1"]])
  (swap! @(resolve 'boot.repl/*default-middleware*)
         concat '[cider.nrepl/cider-middleware
                  refactor-nrepl.middleware/wrap-refactor])
  identity)
SevereOverfl0w commented 6 years ago

Supposedly this may have been fixed just after being opened: https://github.com/clojure-emacs/refactor-nrepl/commit/59c377fad9fcfc30cf9d7a2c0064dfb69624bf21

martinklepsch commented 6 years ago

Alright so this seems to be addressed by refactor-nrepl using the fake.class.path property. If someone is still running into this issue, please reopen.