amperity / sparkplug

Clojure API bindings for Apache Spark
Other
28 stars 1 forks source link

Missed namespace references in collections #16

Closed brandonvin closed 3 years ago

brandonvin commented 4 years ago

Sparkplug may miss namespace references when those namespace references occur inside a collection. For example, a vector containing a function:

user=> (sparkplug.function/namespace-references [(fn [] ,,,)])
#{}

This is a somewhat unusual usage, but when it happens, it causes errors related to unbound vars/fns and other insidious bugs.

greglook commented 4 years ago

Ah, seems like we need to extend this to account for non-map collections: https://github.com/amperity/sparkplug/blob/0f6124d7fc8f0e3f8869f8dce66b26370af34942/sparkplug-core/src/clojure/sparkplug/function.clj#L51-L55