akhudek / fast-zip

fast-zip
86 stars 16 forks source link

Possible fix for the PuppetDB crash with newer zip-visit #14

Open rbrw opened 2 weeks ago

rbrw commented 2 weeks ago

As previously reported in https://github.com/akhudek/zip-visit/issues/8 PuppetDB crashes when fast-zip is upgraded to 0.7.0. In fact, the trouble actually started with the use of .next in core.cljc in 0.6.0.

That's because PuppetDB has long extended zip (via puppetlabs.puppetdb.zip) to preserve collection types in some cases, e.g. vectors remain vectors. As a result, the .next in core/down encounters a vector instead of a sequence, and crashes. If it would be acceptable, changing the three uses of .next to clojure.core/next would resolve the issue.

In any case, thanks for providing the library.

akhudek commented 2 weeks ago

Ok I’ll take a look soon. I need to reinstall clojure 😬