kaocha-cljs icon indicating copy to clipboard operation
kaocha-cljs copied to clipboard

Dynamic classpath handling does not work

Open plexus opened this issue 6 years ago • 4 comments

Kaocha adds any :test-paths to the classpath, so you don't have to, and so that only suites that are being run get added. However ClojureScript does not seem to pick up on this, so you need to add your test directories to the classpath yourself (e.g. in tools.deps with :paths or leiningen :test-paths).

Would be good to figure out what ClojureScript needs to make this work.

plexus avatar Jan 31 '19 03:01 plexus

Related: #4

plexus avatar Jan 31 '19 03:01 plexus

/cc @urzds

urzae avatar May 06 '19 10:05 urzae

@plexus: We ran into this issue when taking our first steps at writing tests for our UI. Would it be possible to document this behaviour? Especially since this is not necessary for Clojure tests it took us a while to figure out what is wrong.

ghost avatar May 06 '19 13:05 ghost

Sure, a PR for the README would be most welcome!

plexus avatar May 06 '19 13:05 plexus

@plexus Isn't the readme already up to date on this issue?

[...]
## Known issues
- The :test-paths do not get automatically added to the classpath (at least not in a way that makes the sources visible to ClojureScript), so you need to also have any :test-paths in your project.clj/deps.edn/build.boot.
[...]

fdserr avatar Jan 30 '23 15:01 fdserr

Right, makes sense that this was already documented. The original ticket was about figuring out if we can make it work on ClojureScript too. This could in theory still be investigated, but it's not something I want us to spend time on. Why? Because hacking the classpath like this is always hacky, and easily introduces new issues, or lead to suprising behavior. Let the tools that are designed to manage the classpath manage the classpath.

I think we have many other things to spend our time on that will have a greater positive impact for users.

So, until further notice I'm going to close this as "wontfix".

plexus avatar Feb 06 '23 10:02 plexus