This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-23
Channels
- # announcements (3)
- # aws (2)
- # babashka (31)
- # beginners (14)
- # calva (14)
- # cider (4)
- # clj-kondo (1)
- # clojure (24)
- # clojure-europe (18)
- # clojure-gamedev (4)
- # clojure-nl (3)
- # clojure-norway (23)
- # clojurescript (24)
- # core-typed (23)
- # data-science (9)
- # datomic (1)
- # emacs (15)
- # events (4)
- # gratitude (3)
- # introduce-yourself (1)
- # leiningen (9)
- # lsp (65)
- # membrane (39)
- # music (1)
- # nbb (1)
- # obb (8)
- # reitit (17)
- # releases (1)
- # tree-sitter (2)
- # vim (28)
- # xtdb (3)
I have a problem with lein javac
that I don't know how to approach:
I've made a user.clj with some repl helpers, which imports my main application. This application uses a few Java classes. When the classes are already compiled, I can run lein javac
. When I remove the classes then lein javac
crashes with ClassNotFoundException when importing my main namespace. When I comment out all code in my user.clj it works again.
Is leiningen always loading the user namespace? I've assumed it's only used for the REPL, am I wrong?
assuming that user.clj resides in dev/
which is added by a :dev
profile, you could run:
lein with-profile -dev javac
...that's meant to be effectively equivalent to "commenting out user.clj" :)
Oh, that makes sense! I'll move my repl tools to another namespace, user.clj is just not the right place for them.
Thank you! I was starting to doubt my senses (the REPL would start sometimes, crash sometimes, or my favourit: Cursive would hang on something like "Calculating Classpath")