Fork me on GitHub
#clojurescript
<
2020-11-24
>
leif01:11:28

Okay, in the meantime, is there anyway to use figwheel-main with 1.10.741?

leif01:11:45

(It seems to jump from 1.10.339 to 1.10.773)

leif01:11:25

figwheel-main 0.2.9 being cljs 1.10.339 and figwheel-main 0.2.10 being cljs 1.10.773

p-himik07:11:11

Seems to work in 758 and to break in 764. Probably commit be792c95 in CLJS. But given that your code explicitly uses target bundle, I don't think it was supposed to work in the first place.

leif16:11:52

I think that that error is supposed to be related to the :target passed into the opts parameter: http://cljs.github.io/api/cljs.js/#eval-str

leif16:11:06

(Although I'm not entirely sure.)

leif17:11:03

When I try to require both figwheel-main and cljs in my deps.edn file, the repl never actually appears.

leif17:11:23

Although the page does load and operate normally.

Emil12:11:26

Possible question for the #beginners channel, but I'm trying to figure out how one would go about executing cljs builds using clojure tools/deps.edn without shadow, lein etc. Something like this (I'm aware of the fact that you can run cljs.main with :main-opts set)

{:paths ["src"]
 
 :deps 
 {org.clojure/clojurescript {:mvn/version "1.10.758"}}


 :aliases
 {:build/release 
  {:exec-fn cljs.build.api/build
   :exec-args {:src "src" :opts {:optimizations :advanced} } }}}

udit14:11:23

I am trying to build a browser based cljs evaluator against which tests assertions could be run. So essentially I want to run tests against the functions that user just typed in the evaluator. For instance:

(cljs.js/eval-str
  (cljs.env/default-compiler-env)
  "(ns something)
   (defn foo [] 9)"
  nil
  {:eval cljs.js/js-eval}
  prn)

(deftest test-something
  (is (= 9 (something/foo))))

udit14:11:37

One obvious problem is that in my test I do not have access to the something namespace.

udit14:11:51

So instead I tried populating the initial env with my test’s namespace, so that it has the dynamic code and the static tests together. This works if the test ns is not dependent on anything else. I can call the fns defined in the test ns from the dynamic code.

udit14:11:55

But not the other way round.

udit15:11:09

So I tried flipping the problem on itself. I am now using the compile-str function to evaluate the dynamic code and put it in the compile-state

;; this works. I can see my-state getting updated
(cljs.js/compile-str my-state "(defn bar [] 18)" "foo" {:ns 'foo} prn)


;; this doesn't work and complains about foo not being defined.
(cljs.js/eval-str my-state "(bar)" "foo" {:ns 'foo} prn)

Jazzer19:11:53

Is there a particular space/channel for re-frame? Or is this the best place to ask re-frame questions?

lilactown19:11:14

#re-frame

👍 1
Jazzer19:11:17

Almost like I don’t know how to use Slack with the channel search feature 🥺

lilactown19:11:47

😄 no worries

Rina21:11:06

Hi, I'm looking for a simple clojurescript tests coverage tool. I found this https://github.com/cloverage/cloverage/ but it does not support clojuresciprt files. Are there any other tools?