clojure-emacs / refactor-nrepl

nREPL middleware to support refactorings in an editor agnostic way
Eclipse Public License 1.0
257 stars 69 forks source link

error iError in nrepl-refactor: java.lang.AssertionError: Assert failed: (instance? java.io.PushbackReader rdr) #258

Closed j0ni closed 5 years ago

j0ni commented 5 years ago

Expected behavior

REPL starts without errors.

Actual behavior

REPL starts, but a thread throws an exception.

The full trace can be found here

Steps to reproduce the problem

  1. Open a leiningen project.clj
  2. Start CIDER with clj-refactor configured
  3. After the user> prompt appears, an error occurs
  4. See *Messages* for the trace.

I tried this in 2 projects, I have not tried a mnimal project. LMK if you cannot reproduce, I will spend some time on it later.

Environment & Version information

clj-refactor.el and refactor-nrepl version information

clj-refactor 2.5.0-SNAPSHOT (package: 20190618.716), refactor-nrepl 2.5.0-SNAPSHOT

CIDER version information

;; CIDER 0.22.0snapshot (package: 20190618.1025), nREPL 0.6.0
;; Clojure 1.10.0, Java 1.8.0_222

Leiningen or Boot version

Leiningen 2.9.0 on Java 1.8.0_222 OpenJDK 64-Bit Server VM

Emacs version

26.2.90 (config log here)

Operating system

Current Arch Linux.

bbatsov commented 5 years ago

Looking at recent commits it's likely a regression introduced here https://github.com/clojure-emacs/refactor-nrepl/commit/916b55445d2a700c85bb57efb73b6fd98a2d653a Haven't had time to look more closely into it, though. //cc @plexus

plexus commented 5 years ago

@bbatsov that change only affects clean-ns, the error reported here already shows up when booting the REPL, so I don't think they are related.

bbatsov commented 5 years ago

Good point. After a second look at the commits now I'm betting on https://github.com/clojure-emacs/refactor-nrepl/commit/2bae83eeacd209823d9075efb2c41856de400655 :-)

pustovit commented 5 years ago

Is there any sort of workaround for this issue? clj-refactor throws this type of exception on any kind of operation.

benedekfazekas commented 5 years ago

the snapshot jar in question looked fishy. on clojars it listed all the dependencies of the project -- that should not happen if the deps are properly inlined and shadowed by MrAnderson before added to the jar. Also when I looked at the contents of the jar it seemed to be a simple skinny jar with only the project namespaces in it.

I redeployed the latest master as a 2.5.0-SNAPSHOT. the result looks good both on clojars (only nrepl listed as depedency) and content wise. jacking in does not yield any errors.

please retest and let me know if you have further problems.

jonpither commented 5 years ago

Thanks @benedekfazekas works for me now.