vvvvalvalval / scope-capture

Project your Clojure(Script) REPL into the same context as your code when it ran
MIT License
573 stars 14 forks source link

Working with shadow-cljs? #30

Closed jefffriesen closed 5 years ago

jefffriesen commented 5 years ago

I am running shadow-cljs and as soon as I require sc.api I get this error:

------ WARNING #1 --------------------------------------------------------------
 File: sc/impl.cljc:52:25
--------------------------------------------------------------------------------
  49 |                "ep-id should be either a positive number or a [(positive-number) (negative-number)] tuple, got: "
  50 |                (try
  51 |                  (pr-str ep-id)
  52 |                  (catch Throwable err
-------------------------------^------------------------------------------------
 Use of undeclared Var sc.impl/Throwable
--------------------------------------------------------------------------------
  53 |                    "(failed to print)")))
  54 |              {:sc.api.error/error-type
  55 |               :sc.api.error-types/invalid-ep-id
  56 |               :ep-id ep-id}))))
--------------------------------------------------------------------------------

My require statement looks like this:

(ns permits.classify
  (:require
   [clojure.string :as string]
   [sc.api]))

My shadow-cljs.edn dependencies are:

 :dependencies [[reagent "0.7.0"]
                [re-frame "0.10.5"]
                [binaryage/devtools "0.9.10"]
                [day8.re-frame/re-frame-10x "0.3.2-react16"]
                [day8.re-frame/tracing "0.5.1"]
                [vvvvalvalval/scope-capture "0.3.1"]
                [bidi "2.1.3"]
                [kibu/pushy "0.3.8"]
                [cider/cider-nrepl "0.17.0"]
                [soda-ash "0.81.1"]]

I get the error before even trying to use spy in the code. I know it's hard to make this work with all repl's. Has anyone successfully made this library work with shadow-cljs? It's possible it has nothing to do with shadow-cljs, but then what could it be?

Thanks

vvvvalvalval commented 5 years ago

@jefffriesen Thanks for reporting, I reproduced successfully. Fixed in 0.3.2.

jefffriesen commented 5 years ago

Yep - it's working. Thank you