kaocha

2023-03-03T15:12:31.939189Z

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

2023-05-25T04:11:01.673139Z

okay, so i just tried this again and it only crashes on osx lol

2023-05-25T04:11:14.834499Z

idk about windows, but on my ubuntu computer, it works just fine

2023-03-31T19:33:25.755779Z

okay, here we go. i wrote rm -rf classes/ ; mkdir classes and then ran clojure -M:dev:test :kaocha and it crashed

2023-03-28T16:15:24.436419Z

ah crap, i'm sorry I missed that you responded

2023-03-28T16:23:07.471409Z

i don't know what changed but you're correct that it's working now

2023-03-28T17:35:56.810449Z

thanks for trying it out

Alys Brooks 2023-03-28T17:47:51.601049Z

You're welcome!

Alys Brooks 2023-03-09T05:33:05.405499Z

Strange, I am able to clone the repo and run tests with clojure -A:test:kaocha

Alys Brooks 2023-03-09T05:35:45.479329Z

without manually running (compile ,,,)

Alys Brooks 2023-03-09T05:37:52.116419Z

If you're still encountering the issue, can you provide the full stacktrace file?

2023-03-03T15:13:13.598369Z

$ 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)

2023-03-03T15:14:56.469349Z

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"},
...

2023-03-03T15:19:26.513309Z

compiling from the repl works too:

$ clj
Clojure 1.11.1
user=> (compile 'noahtheduke.splint)
noahtheduke.splint

2023-03-03T15:20:38.972759Z

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

2023-03-03T15:20:45.077259Z

any thoughts or ideas?

2023-03-03T15:20:54.644869Z

here's my repo: https://github.com/NoahTheDuke/splint