clojure-dev

2023-02-01T15:09:51.742899Z

In Rust, they use a tool called https://github.com/rust-lang/crater which allows them to detect regressions across the rust/cargo ecosystem by downloading, building, and running the test suites of "a large number of crates" (rust libraries) in two versions of the Rust compiler. Does the Clojure dev team have anything like that? Would there be any interest in such a tool?

Alex Miller (Clojure team) 2023-02-01T15:21:22.476409Z

no, and yes

2023-02-01T15:38:05.802249Z

Cool, good to know. Thanks

seancorfield 2023-02-01T17:47:58.134479Z

Given how easy it is to run tests against multiple versions of Clojure, I'm surprised library maintainers don't do this as a matter of course anyway: https://github.com/seancorfield/next-jdbc/blob/develop/build.clj#L24-L36 I used it to do via the shell in a lot of my projects like this https://github.com/clojure-expectations/clojure-test/blob/develop/run-tests.sh (but now I use tools.build so I can write logic in Clojure instead of bash!).

2023-02-01T19:17:58.643819Z

Well, I was thinking the other way around. Someone develops a feature or bug fix or the core team wants to release a new version of Clojure, so they run "clojure-canary" on 80% of the projects on clojars and see what differences there are in the output

2023-02-01T19:19:52.673699Z

I think you're right that there's a lot of value in library authors maintaining backwards compatibility by testing against multiple released Clojure versions. My thought here was about the desire to change existing core code without affecting the whole ecosystem

Alex Miller (Clojure team) 2023-02-01T19:22:48.163569Z

yes, that is something I'm interested in - we sometimes do more targeted versions of this informally, but would be interested in doing it more broadly, automatically (esp for things like the var intern changes in 1.12.0-alpha1 where it's hard to predict unusual situations that have unexpected consequences)

๐Ÿ‘ 1
2023-02-01T20:18:37.205079Z

Mike Fikes developed a test suite called canary for ClojureScript (I think it was Mike Fikes). You can ask him if they are still using it for ClojureScript development.

๐Ÿ‘ 1
borkdude 2023-02-01T15:10:54.772879Z

Related discussion in #cljs-dev: https://clojurians.slack.com/archives/C07UQ678E/p1671210051263259

2023-02-01T15:13:03.379379Z

Excellent find, thank you

borkdude 2023-02-01T15:13:46.294469Z

I'm doing a similar thing with babashka in CI: I run the test suites of a couple of dozen libraries

borkdude 2023-02-01T15:14:33.334549Z

ClojureScript has a similar thing, I forgot the name but you can find it via the above link

dpsutton 2023-02-01T15:14:54.379689Z

https://github.com/cljs-oss/canary

dpsutton 2023-02-01T15:15:28.039579Z

borkdudeโ€™s link opened up slack in a browser tab so not exactly sure what it was linking to. But canary is largely what you were talking about noah

borkdude 2023-02-01T15:16:06.117149Z

Here's the link again: https://clojurians.slack.com/archives/C07UQ678E/p1671210051263259

borkdude 2023-02-01T15:16:33.308119Z

I guess the link turns into something different if I open it in another tab myself

2023-02-01T15:18:51.173299Z

thanks, i found the original message. and yes, canary looks right. Without the backing of a big corp I guess it's hard to run all of the tests locally/within something like canary directly, instead relying on the kindness/opt-in of library devs

borkdude 2023-02-01T15:19:58.245659Z

why would that be?

borkdude 2023-02-01T15:20:13.523389Z

I haven't asked any kindness of library devs to run those libs for bb

2023-02-01T15:21:24.439259Z

Github doesn't give unlimited CI minutes, so you're either limiting the number of libraries you check or you have to pay out of pocket

borkdude 2023-02-01T15:22:17.954399Z

I've never hit the limitation with my own public projects, have you?

borkdude 2023-02-01T15:22:32.679649Z

I'm not saying it doesn't exist, but I've never hit it

borkdude 2023-02-01T15:23:07.590059Z

I think Cirrus CI doesn't limit minutes at all, instead they cap you to 1 CPU or so

2023-02-01T15:29:42.874959Z

sure, that's probably true. I'm coming from the crater perspective that checks almost every single crate and a very large number of rust github repos, going for a "blacklist faulty projects" approach instead of hand-selecting specific projects

lread 2023-02-01T16:47:48.870179Z

Fwiw, I also do canary testing for rewrite-clj. Any project I find that directly uses rewrite-clj that also has a test suite and tagged releases gets its test suite run against rewrite-clj HEAD on GitHub Actions.

๐Ÿ‘ 1