day8/re-frame-10x

[Bug]: "Set literal contains duplicate key" when `*print-length*` is set

Closed this issue · 2 comments

What happened?

Started in this Clojurians thread: Set literal contains duplicate key

re-frame-10x uses pr-str in many places, this one being pertinent to the thread:

(.set storage (safe-key key) (pr-str db)))))

The issue is that pr-str elides its output if *print-length* is set. And it's problematic for most usages of pr-str by re-frame-10x and not just that linked line.

A fix would be to use some other serialization approach or to extract all or most calls to pr-str into a single function that binds *print-length* to nil.

10x Version

1.7.0

Reagent Version

React Version

re-frame Version

What browsers are you seeing the problem on?

No response

Relevant console output

No response

kimo-k commented

Thanks for the report.

I think we do use *print-length* in a recent diff. I noticed elsewhere we have used zprint. Probably using zprint everywhere would solve this.

kimo-k commented

This should be fixed in 1.8.1