kaocha

Official support channel: https://clojureverse.org/c/projects/kaocha
reefersleep 2021-02-27T22:14:37.005100Z

Hey @plexus. I finally built my kaocha plugin for git blame-ish functionality. It’s here: https://github.com/Reefersleep/gitcha

Alys Brooks 2021-03-01T16:56:48.008500Z

Neat idea! Looking at our plugin kaocha-cljs, it doesn't look like we do anything special dependencywise. (And I can confirm it works fine on projects using different versions—I've used kaocha-cljs on projects using newer versions lately.) What specific dependency conflicts are you seeing?

reefersleep 2021-03-02T10:06:49.009Z

Well, the ones above 🙂 I can do a :deps tree when I have an available timeslot.

reefersleep 2021-03-02T10:07:05.009200Z

Maybe the project I was testing it on had a particularly old version of Kaocha.

reefersleep 2021-03-02T10:07:06.009400Z

Thanks!

reefersleep 2021-03-02T10:08:04.009600Z

The projects I’m working with have generally have :pedantic? :abort in their project.clj, so any conflict, even benign, becomes obvious immediately.

Alys Brooks 2021-03-02T20:59:35.009800Z

Ahh, I tried pendantic? :abort and it did turn up a kaocha and kaocha-cljs conflict (expound). I'm not sure it's actually a problem but it might be worth harmonizing dependency versions across kaocha and its plugins. Maybe you're already familiar, but it looks like :managed-deps is the primary tool lein offers to fix these kinds of problems: https://github.com/technomancy/leiningen/blob/830d19d5b9f9e2b0e3411428d83422791ca2f814/doc/MANAGED_DEPS.md#managed-dependencies

reefersleep 2021-03-03T08:23:55.010100Z

@actuallyalys_slack that seems related, but not an exact solution to what I’m talking about. With managed dependencies, there won’t be a conflict, so that part is taken care of, but I also have no guarantee that the runtime Kaocha version harmonizes with my plugin. Thanks a lot for the heads up, though, didn’t know about that!

Alys Brooks 2021-03-03T17:53:09.023400Z

@reefersleep You're welcome! We can't make compatibility guarantees, but is there something we could do, maybe in our test matrix, to give you more confidence as a plugin author? Are there particular conflicts you're afraid of?

reefersleep 2021-03-03T20:04:42.023800Z

@actuallyalys_slack nothing in particular - I haven’t kept up to date with the Kaocha changelog 🙂 And don’t know the roadpath. @javahippie suggested recording the Kaocha version(s) that I’ve tested the plugin with, use Kaocha as a :provided dependency, and look up the dependency in the classpath on intialization, then give the user a warning if it’s not in the list of tested versions. Seems like a decent tradeoff. @ordnungswidrig suggested using MrAnderson to pull in the “correct” Kaocha version under a different name in my plugin, essentially having it twice on the classpath. A good alternative to know of, but too bloaty for my use case, I think.

Alys Brooks 2021-03-03T22:47:15.024Z

@reefersleep Yeah, I'd discourage using MrAnderson because it seems way too heavyweight unless you actually know of incompatibilities. I generally wouldn't expect plugins to be version dependent, unless they rely on new functionality. Warning about potentially incompatible versions makes more sense, although you might want to give users the option of silencing it or providing additional tested versions--I'd expect most versions to work and the warning could become noise.

Alys Brooks 2021-03-03T23:53:02.024200Z

@reefersleep As for the roadmap, we perhaps should have one, but I'm not aware of any plans to make changes that would break backwards compatability. (If we made such a change, we'd definitely note it in the changelog.)

reefersleep 2021-03-04T08:53:03.024400Z

Good point on the silencing option.

reefersleep 2021-03-04T09:28:58.024600Z

I never suspected anything to break in the face of a conflict, I figure Kaocha is pretty stable already (and has got some stable maintainers 😉 that take care of such things), but why not consider the possibility.

reefersleep 2021-03-05T08:24:42.026300Z

@actuallyalys_slack I added a suppressing option which can be activated through tests.edn. Do you know how I would activate it through the command line? It’s just a boolean.

reefersleep 2021-03-05T08:44:49.026500Z

I’ve described the tests.edn usage here: https://github.com/Reefersleep/gitcha

reefersleep 2021-02-27T22:14:46.005400Z

Let me know what you think!

reefersleep 2021-02-27T23:28:05.005500Z

Hmmm… get a lot of dependency conflicts in projects that include kaocha, which they naturally will. Do you know of a good way to fix this? I don’t know if :provided is a solid solution, won’t I either require the plugin user to use my version of kaocha, or risk subtle incongruencies if somebody uses another version than I assume? (I know the gist of :provided, but not the nitty gritty)

reefersleep 2021-02-27T23:52:18.005700Z

e.g., this is the dependency after fixing all conflicts in a random project. I don’t want to force this on users if I can avoid it.

[gitcha "0.1.0-SNAPSHOT"
 :exclusions [lambdaisland/kaocha
 org.clojure/spec.alpha 
 expound
 org.clojure/tools.cli
 aero
 lambdaisland/tools.namespace
 orchestra
 org.tcrawley/dynapath]]