jimpil / duratom

A durable atom type for Clojure
Eclipse Public License 1.0
213 stars 14 forks source link

pr-str is affected by *print-length* #5

Closed AdamClements closed 6 years ago

AdamClements commented 6 years ago

If the user has print-length set then any lengthy lists etc will get cut off with [1 2 3 ...] which not only loses the data but isn't valid edn and won't read back in. Need to wrap calls to pr-str with (binding [*print-length* nil] (pr-str whatever))

harold commented 6 years ago

This is an interesting point. Did you have *print-length* set in a context where a duratom was written?

AdamClements commented 6 years ago

I was evaluating the code in Emacs, where my repl defaults limit the print length to stop accidentally spewing too much out at the repl. I think that's a fairly common set up

harold commented 6 years ago

Yup. Makes sense. Good catch.

jimpil commented 6 years ago

Good catch indeed and thanks for reporting it - I will address it in the next release which should be this weekend.

Kind regards

jimpil commented 6 years ago

duratom 0.3.8 has been released and fixes this. Thanks again for reporting it...:)