malli

Samuel Ludwig 2026-01-06T23:15:15.930389Z

Experiencing an odd error when I cider-ns-reload-all (which ought to be equivalent to (require ns :reload-all) sent to the REPL) If I do not run (m/-deregister-function-schemas! :clj) beforehand, I will get a stack-overflow exception from malli.core/register-function-schema--which I will post in-thread, but it almost looks like some kind of lookup loop, which I find a little odd because I don't do much fancy with my registry beyond one

(def reg-with-time
  (merge
    (m/default-schemas)
    (malli.time/schemas)))
I don't think I have any recursive schemas, but I do have a few long string-regex-schemas (with custom generators). I haven't been able to pin this down to a particular change in my repo yet.

Samuel Ludwig 2026-01-06T23:16:12.368469Z

opqdonut 2026-01-07T07:07:43.639659Z

could you file a github issue? possibly with a minimal reproduction if you can come up with one?

Samuel Ludwig 2026-01-08T20:44:04.386599Z

thanks for being around, and such is our life of murder-mysteries :^) I tried running clj-async-profiler on md/start! (hoping to see a massive spike of some other function calls) and it locked up my machine, so I think I'm gonna submit the issue as is for now 😅

Samuel Ludwig 2026-01-07T15:35:02.744599Z

For sure I'll give it a go, I sent that message as i signed off for the day, back now for more debugging :^)

Samuel Ludwig 2026-01-07T22:14:36.334079Z

Sorry, I haven't ended up filing an issue yet- in my debugging efforts, I ended up instrumenting the malli.core namespace with #flow-storm, and for some reason, doing this causes the error to no-longer occur, even when I un-instrument the malli.core namespace afterwards -- until I start a new REPL session. I know the instrumentation causes the malli namespace to be re-evaluated once, but otherwise I don't know what additional affect there might be... Awfully confused to be honest, quite literally a Heisenbug; maybe some kind of race condition (but I don't know what else would be swap!ing with that -function-schemas* atom at any point)?

Samuel Ludwig 2026-01-07T23:31:58.119189Z

Mmm, ok so I actually think it might be connected to dev-mode, seems like flipping it off causes the error to no longer occur, and then it occurs instantly upon md/start!-ing it back on. This, notably, does still happen when instrumented with #flow-storm, but the cause of the overflow still isn't particularly apparent when stepping through (and flow-storm's stepper kind of just "stops" at certain points). Out of curiosity, I even bumped my stack-size by 6x, in case I somehow did just have "too many specs", but the error remained. Oh, and do want to add that I've experienced the error both with and without flow-storm active, so I don't think its overall presence is responsible.

Samuel Ludwig 2026-01-08T00:09:06.782509Z

Hm, maybe closer, I experience the overflow when malli.core is not instrumented (by flow-storm), and I call (mi/instrument!) Gonna sign off for the day, I'll file an issue with the above info tomorrow if I can't find anything new.

opqdonut 2026-01-08T06:16:30.340679Z

thanks for your effort, sounds really frustrating