leonoel / missionary

A functional effect and streaming system for Clojure/Script
Eclipse Public License 2.0
651 stars 26 forks source link

Cannot read properties of null (reading 'parallelism') #79

Open mjmeintjes opened 1 year ago

mjmeintjes commented 1 year ago

Just something I caught while try to reproduce #77

(comment
  (do
    (def input! (atom 10))
    (def task
      (ms/reduce
       (constantly nil)
       (ms/ap
        (let [n (or (ms/?< (ms/watch input!))
                    1)]
          (println
           (ms/?> (ms/seed (range n))))))))
    (when (resolve 'cancel) (cancel))
    (def cancel (task println #(js/console.error %))))

  ;; 0
  ;; 1
  ;; 2
  ;; 3
  ;; 4
  ;; 5
  ;; 6
  ;; 7
  ;; 8
  ;; VM690:7 TypeError: Cannot read properties of null (reading 'parallelism')
  ;;   at Object.missionary$impl$Ambiguous$discard [as discard] (Ambiguous.cljs:179:59)
  ;;   at Object.missionary$impl$Ambiguous$done [as done] (Ambiguous.cljs:212:8)
  ;;   at eval (Ambiguous.cljs:233:36)
  ;;   at missionary$impl$Ambiguous$transfer (Ambiguous.cljs:237:51)
  ;;   at Object.eval [as cljs$core$IDeref$_deref$arity$1] (Ambiguous.cljs:11:19)
  ;;   at Object.cljs$core$_deref [as _deref] (core.cljs:688:12)
  ;;   at Object.cljs$core$deref [as deref] (core.cljs:1477:4)
  ;;   at eval (Reduce.cljs:16:21)
  ;;   at eval (Reduce.cljs:16:21)
  ;;   at Object.missionary$impl$Reduce$transfer [as transfer] (Reduce.cljs:21:43)

  )