babashka / sci

Configurable Clojure/Script interpreter suitable for scripting and Clojure DSLs
Eclipse Public License 1.0
1.22k stars 89 forks source link

SCI analysis too eager with respect to "classes" #876

Closed borkdude closed 1 year ago

borkdude commented 1 year ago

When evaluating this function:

(fn [] (when js/document (js/document.getElementById "foo")))

in SCI, SCI pre-walks js/document.getElementById for performance reasons, but when running this expression in Node.js, where js/document doesn't exist, this gives troubles and prevents one to write JS-portable code.

cc @mk