matcher-combinators

teodorlu 2026-04-02T11:07:01.369689Z

Hi! I'm only now noticing this library — and I think back on situations where I have lots of code for extracting stuff from a data structure, and only after then being able to write a test assertion. matcher-combinators looks much nicer, the test can reflect the structure of the data. As I'm getting used to the API, I found I could require [matcher-combinators.test :refer [match?]] to help static analysis along. Would it make sense to also include a docstring for those shims? The cljdoc docs look really nice, but if I can, I'd prefer to stay with my editor and REPL when looking up a function (or a something that appears to be a function inside a macro). Thanks for a great tool I didn't know I was missing!

Phillip Mates 2026-04-13T09:47:50.112949Z

glad you're enjoying and thanks for the suggestion. I think https://github.com/nubank/matcher-combinators/pull/236 should do it, right?

teodorlu 2026-04-13T12:47:23.420379Z

Yes, that looks like exactly what I had in mind! 🙏

teodorlu 2026-04-13T12:54:55.975239Z

Love that you also include information about deprecations and what to use instead! If you want to give users even more help, Kondo via LSP will help users avoid vars with :deprecated "in-version" metadata. Example:

lread 2026-04-02T14:35:49.742559Z

Welcome to the matcher-combinators fan club @teodorlu! Small tip: you do need to require matcher-combinators.test but don't need to :refer [match?]. The included https://github.com/nubank/matcher-combinators/blob/3d88fc2c2bd931e7f9dd21320e20641bb204eaa3/resources/clj-kondo.exports/nubank/matcher-combinators/config.edn#L1-L4 configures appropriately for match?.

teodorlu 2026-04-02T14:37:10.861129Z

Hi 🙂 Yeah, I noticed, I did it mostly to remind myself where the symbol is coming from.

👍 1