Fork me on GitHub
#shadow-cljs
<
2019-06-08
>
neupsh04:06:14

hi, I am trying to try geom library from here: https://github.com/thi-ng/geom I have added {:mvn/version "0.0.908"} in my deps.edn and just included [thi.ng.geom.webgl.core :as gl] in require section of one of my cljs file. I get the following compilation error:

Status
X Compilation failed.

------ ERROR -------------------------------------------------------------------
 File: jar:file:/home/user/.m2/repository/thi/ng/geom-webgl/0.0.908/geom-webgl-0.0.908.jar!/thi/ng/geom/webgl/core.cljs:628:40
--------------------------------------------------------------------------------
 625 |                      (let [ctx (.getContext canvas (first ids) attribs)]
 626 |                        (set! (.-onselectstart canvas) (constantly false))
 627 |                        (if ctx ctx (recur (next ids))))
 628 |                      (catch js/Error e (recur (next ids))))))]
----------------------------------------------^---------------------------------
Error in phase :compilation
Can't recur here at line 628 thi/ng/geom/webgl/core.cljs
--------------------------------------------------------------------------------
 629 |        (or ctx (err/unsupported! "WebGL not available")))))
 630 | (defn clear-color-buffer
 631 |   [^WebGLRenderingContext gl r g b a]
 632 |   (.clearColor gl r g b a)
--------------------------------------------------------------------------------

neupsh04:06:04

Has anyone seen this error or been able to use the geom library in your projects?

yuhan08:06:06

Strange, that definitely looks like a syntax error

yuhan08:06:55

The version you're using is a few years outdated, have you tried with the latest 1.0.0-RC3?

neupsh14:06:56

@qythium yes!! thank you very much. There are a lot of changes on the latest snapshot including refactoring of namespaces as well. I got past all the compilation errors now.

tony.kay22:06:33

@thheller I’ve run into an issue where I can’t get a macro to update. I tried adding :cache-blockers to config, but no go (it’s not a side-effecting macro, but it is split as helper functions among files)

tony.kay22:06:49

even if I turn build options caching off it still doesn’t work

tony.kay22:06:12

which is really weird to me…all I can think of is that it can’t see that the helper function in another namespace should affect the macro

tony.kay22:06:51

yeah, confirmed: If I write supporting code for a macro in a CLJ namespace, then write the top-level macro in a CLJC namespace (with conditional compile of the macro to CLJ only), then changing anything in the CLJ impl namespace is not picked up. If I move them together into the same file it works as expected.