duct-framework / duct

Server-side application framework for Clojure
MIT License
1.13k stars 51 forks source link

(test) available only after (reset) #16

Closed viesti closed 9 years ago

viesti commented 9 years ago

Here's the thing that I'm experiencing:

0% lein repl
2015-10-16 11:10:28.766:INFO::main: Logging initialized @4255ms
nREPL server started on port 51850 on host 127.0.0.1 - nrepl://127.0.0.1:51850
REPL-y 0.3.7, nREPL 0.2.10
Clojure 1.7.0
Java HotSpot(TM) 64-Bit Server VM 1.8.0-b132
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)
 Results: Stored in vars *1, *2, *3, an exception in *e

user=> test
#object[clojure.core$test 0x7df084c6 "clojure.core$test@7df084c6"]
user=> (test)

ArityException Wrong number of args (0) passed to: core/test  clojure.lang.AFn.throwArity (AFn.java:429)
user=> (reset)
:reloading (.... stuff... moar stuff..... user)
:resumed
user=> (test)

2/2   100% [==================================================]  ETA: 00:00

Ran 2 tests in 0.010 seconds
2 assertions, 0 failures, 0 errors.
nil
user=>

So it seems that after the initial load, test get's shadowed by clojure.core/test, even though it is unmapped in user.clj

Anyway, awesome that there is (test) in the reloaded workflow now :)

weavejester commented 9 years ago

I can't reproduce this error, I'm afraid. For me, (test) works even on a new REPL.

Do you happen to have a user.clj file anywhere else, such as in your ~/.lein directory? Or do you have any plugins or dependencies in your profiles.clj file?

Your Leiningen version might also affect things, so could you please supply the output of lein version?

Also, which arguments did you use with Duct when creating a new project? It's possible that might affect things as well.

viesti commented 9 years ago

Hum, removing ~/.lein/profiles.clj helped, so something there is causing this. Closing this now. Might ping back if I find out what causes this :) Thanks for the help!

kendagriff commented 9 years ago

Heads up, I'm also seeing this behavior. I'll chime in if I stumble upon any clues...