i'm working on a project I want to compile to an uberjar, so I have (:gen-class) in the main namespace. If I don't pre-compile this (using tools.build for example) Kaocha can't run
okay, so i just tried this again and it only crashes on osx lol
idk about windows, but on my ubuntu computer, it works just fine
okay, here we go. i wrote rm -rf classes/ ; mkdir classes and then ran clojure -M:dev:test :kaocha and it crashed
ah crap, i'm sorry I missed that you responded
i don't know what changed but you're correct that it's working now
thanks for trying it out
You're welcome!
Strange, I am able to clone the repo and run tests with clojure -A:test:kaocha
without manually running (compile ,,,)
If you're still encountering the issue, can you provide the full stacktrace file?
$ clojure -M:test
Randomized with --seed 232372349
ERROR in all (noahtheduke/splint.clj:5)
Failed loading tests:
Exception: clojure.lang.Compiler$CompilerException: Syntax error compiling at (noahtheduke/splint.clj:5:1).
#:clojure.error{:phase :compile-syntax-check, :line 5, :column 1, :source "noahtheduke/splint.clj"}
at clojure.lang.Compiler.analyze (Compiler.java:6825)
if I use the gen-class-hook as described https://github.com/plexus/gen-class-hook, then I get a different error related to the function compile being unable to find the relevant class:
$ clojure -M:test
Syntax error (ClassNotFoundException) compiling at (noahtheduke/splint.clj:5:1).
noahtheduke.splint
Full report at:
/var/folders/5w/z50rbwg546x94k8p8jzqfbl00000gn/T/clojure-1175603925556261433.edn
noah@Noahs-MacBook-Pro ~/personal/splint [main ≡ +1 ~89 -1 | +1 ~4 -0 !]
$ cat /var/folders/5w/z50rbwg546x94k8p8jzqfbl00000gn/T/clojure-1175603925556261433.edn
{:clojure.main/message
"Syntax error (ClassNotFoundException) compiling at (noahtheduke/splint.clj:5:1).\nnoahtheduke.splint\n",
:clojure.main/triage
{:clojure.error/phase :compile-syntax-check,
:clojure.error/line 5,
:clojure.error/column 1,
:clojure.error/source "splint.clj",
:clojure.error/path "noahtheduke/splint.clj",
:clojure.error/class java.lang.ClassNotFoundException,
:clojure.error/cause "noahtheduke.splint"},
...
compiling from the repl works too:
$ clj
Clojure 1.11.1
user=> (compile 'noahtheduke.splint)
noahtheduke.splint
so I'm unsure what kaocha is doing that causes this to happen, but it's cumbersome that I have to pre-compile before I can run kaocha directly
any thoughts or ideas?
here's my repo: https://github.com/NoahTheDuke/splint