-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Description
:tag
metadata should denote classes or primitives - not arbitrary objects.
However some of the :tag
s that byte-streams emits can denote byte_streams.graph.Type
objects:
(in-ns 'byte-streams)
;; inspect the def-transfer defined at https://github.com/clj-commons/byte-streams/blob/4066d637300c144d37e888c23de1a9c3ae19829a/src/byte_streams.clj#L610 :
(-> '(def-transfer [ReadableByteChannel File]
[channel file {:keys [chunk-size] :or {chunk-size (int 1e7)} :as options}]
(let [^FileChannel fc (convert file WritableByteChannel options)]
(try
(loop [idx 0]
(let [n (.transferFrom fc channel idx chunk-size)]
(when (pos? n)
(recur (+ idx n)))))
(finally
(.force fc true)
(.close fc)))))
macroexpand-1
last
second
second
meta
println)
;; {:tag #object[byte_streams.graph.Type 0x62e58f04 java.io.File]}
...this is accurately reported by running lein eastwood
.
Fixing this might also solve other tag-related issues that I can see in the tracker.
Hope it helps!
-V
Metadata
Metadata
Assignees
Labels
No labels