Unfriendly Java cast expection when *compile-path* is set incorrectly
When compile-path is not set to a String but to a java.io.File (that's what boot-clj does at the moment). You get a Cast exception in the compiler when trying to use it from the boot repl. Common wisdom seems to be to not compile from the repl, people say don't use gen-class. I find this unfortunate for when you do want to use gen-class and iterate quickly.
I haven't tested all older versions for this issue, but git blame shows that the code that should help here wasn't changed for 10 years:
My workaround now is:
I suggest to put the type check in the 'clojure.core/compile function.
Mac OS, boot-clj
I've tried to make the example as simple as possible. You are right that the ClassCastException is perfectly accurate, but you realise this only after you have figured out it's about compile-path. This bug report is mostly about managing expectations (of the clojure user).
Can you provide a reproducible example?
Seems like ClassCastException is pretty accurate for having a class of the wrong type.