Fork me on GitHub
#beginners
<
2021-11-20
>
Dmitrii Pisarenko16:11:26

Hello! How can I import Google Closure into a Leiningen project? I am trying to use it in this https://github.com/mentiflectax/hello-figwheel/blob/master/src/hello_figwheel/core.cljs. I guess that in order to be able to use it, I need it to add it dependencies in

:dependencies [[org.clojure/clojure "1.10.0"]
                 [org.clojure/clojurescript "1.10.773"]
                 [org.clojure/core.async  "0.4.500"]
                 [reagent "1.1.0"]

                 ]
in https://github.com/mentiflectax/hello-figwheel/blob/master/project.clj.

delaguardo17:11:55

Closure library should already be there because it is one of clojurescript dependency. You can check it yourself via lein deps :tree

sheluchin19:11:44

I created a multimethod, then put #p in it for debugging (https://github.com/weavejester/hashp). All worked well, the extra debug statements got printed. Then I redefined the multimethod and its defmethods, removing the #p debug macros, and evaluated the new code in my REPL. The debug statements are still getting printed, like the new definitions didn't take. Is there any obvious reason this might be happening? Edit: I see that refreshing with tools-ns/refresh does update the definitions as I wanted. Does re-evaluating the code in my REPL not update definitions the same way?

hiredman19:11:54

defmulti acts like defonce

👍 1
sheluchin20:11:21

Ah, you gotta use ns-unmap to redefine.. I see.

seancorfield20:11:38

Or you can (def multi-name nil) above (defmulti multi-name ..) to force a redefinition.

🚀 1