Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by

There is a bug in ChunkedCons. In Clojure ChunkedCons (correctly) always calls {{seq}} in chunked-next. In CLJS it's not done. But since ChunkedCons has to be lazy it pretty much always gets an (empty) lazy seq as the "more" part.

Bug:

`
(-> (map inc (vec (range 64)))

seq
chunk-next
seq
chunk-next)

`

Returns and empty sequence instead of nil. This hasn't surfaced yet since nothing calls chunk-next on a ChunkedCons (yet).

7 Answers

0 votes
by

Comment made by: aralo

Found another bug that surfaced: Current implementation calls {{-seq}} on {{more}} which could be nil and this would blow up. So the patch also make a tiny change to {{-next}} also just calling {{seq}} on {{more}}. Pretty straight forward.

0 votes
by

Comment made by: dnolen

This patch needs a test.

0 votes
by

Comment made by: aralo

Test's added.

0 votes
by

Comment made by: mfikes

patch does not apply

0 votes
by

Comment made by: aralo

Patch rebased

0 votes
by

Comment made by: mfikes

Patch no longer applies.

0 votes
by
Reference: https://clojure.atlassian.net/browse/CLJS-2469 (reported by aralo)
...