I’ve a program that dumps a resource as EDN every day and triggers some action based on the diff between the old and the new dump. It works great except for sets because the order in which their members are dumped isn’t always the same so the diff may be non-empty even if there isn’t any change.
This sort_sets boolean key fixes that issue: it sorts sets before dumping them, thus ensuring two dumps are equal if they were generated from the same input.
It’s false by default, so the current behavior is not affected if you don’t use the key.
This is similar to
sort_keys
but for sets.I’ve a program that dumps a resource as EDN every day and triggers some action based on the diff between the old and the new dump. It works great except for sets because the order in which their members are dumped isn’t always the same so the diff may be non-empty even if there isn’t any change.
This
sort_sets
boolean key fixes that issue: it sorts sets before dumping them, thus ensuring two dumps are equal if they were generated from the same input.It’s
false
by default, so the current behavior is not affected if you don’t use the key.