This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-17
Channels
- # announcements (4)
- # beginners (82)
- # boot (1)
- # calva (26)
- # cider (13)
- # clj-kondo (41)
- # cljs-dev (25)
- # cljsrn (7)
- # clojure (82)
- # clojure-berlin (1)
- # clojure-brasil (1)
- # clojure-dev (13)
- # clojure-europe (11)
- # clojure-italy (27)
- # clojure-nl (8)
- # clojure-russia (6)
- # clojure-spec (32)
- # clojure-uk (15)
- # clojurescript (61)
- # core-async (1)
- # cursive (9)
- # data-science (1)
- # datomic (18)
- # duct (1)
- # emacs (2)
- # events (7)
- # fulcro (13)
- # graalvm (5)
- # immutant (1)
- # jobs-discuss (63)
- # leiningen (3)
- # off-topic (48)
- # om (3)
- # pathom (13)
- # planck (20)
- # prelude (3)
- # re-frame (55)
- # reagent (13)
- # reitit (5)
- # rewrite-clj (12)
- # shadow-cljs (67)
- # spacemacs (14)
- # sql (5)
- # tools-deps (4)
- # vim (23)
- # yada (2)
Hi. I’m having some trouble getting my workflow going with a project I started using CLI and deps.edn. I can’t eval from vim for some reason. When I try to eval the (ns) function in any of my source files I get an error:
Execution error (FileNotFoundException) at user/eval31498 (REPL:1).
Could not locate alexandria/templates__init.class, alexandria/templates.clj or alexandria/templates.cljc on classpath.
My deps.edn looks like
{:aliases { :run {:main-opts [ "-m" "alexandria.core" ] } }
:paths ["src/clj" "resources" ]
:deps {
... various dependencies
}
}
I have a source file src/clj/user.clj
… within that file I can eval the (ns) function as well as any random thing I write, e.g. (+ 1 2)
But when I go to src/clj/alexandria/templates.clj
as in the example above, I get a classpath error.
From the actual repl window, I can (require 'alexandria.templates)
without any problem, so the kind folks in #beginners suggested I ask here as it seems to have to do with fireplace.
I think the issue there is probably that the "clj" CLI tool doesn't start an nREPL out of the box
I think you have to do something like this: https://stackoverflow.com/a/54066339
Thanks for the pointer… but if that’s the case, why can I eval code from the src/clj/user.clj
file with no problem?
Nonetheless… when I run clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.5.3"}}}' -m nrepl.cmdline
from the command line as suggested in your link, everything works
I think maybe the problem is a mismatch between the filename and the namespace name in the ns form
In the original case, typing (require 'alexandria.templates)
at the repl worked though.. so I don’t think it’s a filename mismatch
Yes, user.clj does start with (ns user), and it works fine… I can evaluate in the editor through fireplace