pandeiro / boot-http

A simple HTTP serve task for the Boot build tool
62 stars 34 forks source link

nREPL not working in snapshot #26

Closed Chris-Andrews closed 8 years ago

Chris-Andrews commented 8 years ago

I tried the nREPL functionality in the 0.7.0-SNAPSHOT release on clojars and it seems things are broken now. Here's the stack trace I get when trying to start a REPL the same way I was before:

Starting server repl:
boot-http nREPL started on port  3001  on host 127.0.0.1
clojure.lang.Compiler$CompilerException: java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core/unquote, compiling:(NO_SOURCE_FILE:0:0)
        java.lang.IllegalStateException: Attempting to call unbound fn: #'clojure.core/unquote
                                 ...
pandeiro.boot-http.impl/nrepl-server       impl.clj:  119
                                 ...
                   clojure.core/eval       core.clj: 3081
                   boot.pod/eval-in*        pod.clj:  211
                                 ...
                   boot.pod/eval-in*        pod.clj:  214
    pandeiro.boot-http/eval688/fn/fn  boot_http.clj:   51
                                 ...
                  clojure.core/deref       core.clj: 2206
 pandeiro.boot-http/eval688/fn/fn/fn  boot_http.clj:   84
boot.task.built-in/fn/fn/fn/fn/fn/fn   built_in.clj:  233
   boot.task.built-in/fn/fn/fn/fn/fn   built_in.clj:  233
      boot.task.built-in/fn/fn/fn/fn   built_in.clj:  230
                 boot.core/run-tasks       core.clj:  701
                   boot.core/boot/fn       core.clj:  711
 clojure.core/binding-conveyor-fn/fn       core.clj: 1916
                                 ...
Chris-Andrews commented 8 years ago

While messing with this I also found an issue with the original pull request I sent. I had [org.clojure/tools.nrepl "0.2.11" :scope "test"] listed as a dependency, when it actually just needs to be listed as a dependency (no "test" scope). Everything worked fine anyways on my test project because I was using that dependency while testing the nREPL, but new projects don't work unless I change it.

pandeiro commented 8 years ago

Yeah, that one I caught and refactored to work similarly to how the jetty/http-kit deps are handled, "on demand".

I'm trying to figure out the cause of the unquote exception though. :-/ On Oct 7, 2015 5:17 PM, "Chris Andrews" notifications@github.com wrote:

While messing with this I also found an issue with the original pull request I sent. I had [org.clojure/tools.nrepl "0.2.11" :scope "test"] listed as a dependency, when it actually just needs to be listed as a dependency (no "test" scope). Everything worked fine anyways on my test project because I was using that dependency while testing the nREPL, but new projects don't work unless I change it.

— Reply to this email directly or view it on GitHub https://github.com/pandeiro/boot-http/issues/26#issuecomment-146315948.

pandeiro commented 8 years ago

@Chris-Andrews Sorry for taking so long to get to this.

When I start the server like so:

$ boot serve -n "{:port 3001}"

...and then try to connect via Emacs to the nREPL server running on port 3001, I have no problem.

Could you help me reproduce this by showing the exact commands you're running?

Chris-Andrews commented 8 years ago

No problem @pandeiro, I had a stretch where I was too busy to look into this as well. I just tried the command above and all the other commands I was been trying, and I have no problems now. I wonder if I just had a bad version of the 0.7.0-SNAPSHOT installed instead of the one you pushed to Clojars. Either way, it downloaded properly and seems to work. Can confirm I was able to change a var in the ring handler via nREPL and see updates in the page served. Thanks for looking into this.

pandeiro commented 8 years ago

Sweet! Thank you. I'm gonna push 0.7.0 then later today. On Oct 27, 2015 1:14 PM, "Chris Andrews" notifications@github.com wrote:

Closed #26 https://github.com/pandeiro/boot-http/issues/26.

— Reply to this email directly or view it on GitHub https://github.com/pandeiro/boot-http/issues/26#event-446900007.