I found that using (:gen-class) when defining namespace solves the issue,
my functions become accessible.
But I don't really fully understand how it relates to lein repl in any way.
I should probably try to run clojure in CLI, without lein, to better
understand the process. It feels like lein masks a lot of behaviour,
understanding which is quite important for efficiency.
On Saturday, November 22, 2014 1:10:01 PM UTC+1, Aleksandr wrote:
>
> I have defined in my project following repl configuration:
> :repl-options { :init-ns myproj.core }
>
> From my understanding, any repl session started should end up in
> myproj.core
>
> Starting nrepl session (using cider-jack-in) in emacs does indeed show
> myproj.core prompt
> myproj.core=> ...
>
> However, none of functions defined in the namespace are resolved.
>
> myproj.core=> (server-start)
>
> CompilerException java.lang.RuntimeException: Unable to resolve symbol:
> server-start in this context,
> compiling:(/tmp/form-init4491116913200816459.clj:1:1)
>
> Once I do
> (use 'myproj.core :reload)
>
> I can successfully use functions defined in NS:
>
> myproj.core=> (server-start)
> <... expected output>
>
> Why is my default namespace not evaluated when REPL session is started?
> Couldn't find any answer in leiningen man or clojure namespace docs.
>
> Thanks for any insight!
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.