polylith 2026-08-03

@jeroenvandijk I am occasionally seeing Comparison method violates its general contract! errors now from the external test runner. I suspect the sort-by call so I'm going to do some digging, just FYI.

Found a failure case pretty quickly:

(take 10 (sort-by-seed 447005435 #_(rand-int Integer/MAX_VALUE)
                         (repeatedly 1000 #(rand-int 100))))

I suspect that the key-fn can be called multiple times and it is non-deterministic (i.e., two calls with the same argument can yield different "key" values). I'm going to add logic that does the key-gen just once and produces a lookup map.

Ah that's my bad indeed. I should have added a proper test for the deterministic sorting. Thanks for fixing!

No worries. It was only failing very occasionally—and always seemed to fail on the same project, but that was a red herring.