Fork me on GitHub
#clojurescript
<
2022-06-23
>
jrychter09:06:31

@dnolen Thank you! I'm not sure if I know how to try the master in my leiningen config, but I'll work on it and report.

borkdude14:06:46

I discovered that my macros in this namespaces were running twice in self-hosted CLJS. Is there a way how I can prevent that? I now prevent it with this "hack": https://github.com/babashka/sci/blob/d4d64143b0d2aae22d6e7fb887a1325c2653354f/src/sci/impl/namespaces.cljc#L74 The calls look like (copy-var foo foo-ns {:name 'foo}) so the first argument should be a symbol, but is sometimes {:name 'foo} while the second and third arguments are nil when I inspect the arguments in the macro. I think I've ran into this before but I forgot how to deal with this. Thanks.

borkdude14:06:11

Maybe I should just move the macro to a .clj namespace

borkdude14:06:03

That didn't work either, the macro still gets executed in unexpected ways :/

domparry14:06:48

Is it possible there’s a thread first instead of a thread last somewhere that’s causing it?

domparry14:06:00

somewhere that’s calling the macro I mean.

borkdude14:06:07

I'm pretty sure that is not it.

winsome15:06:17

I've got a library that calls (fs.readFileSync (str "resources/" <filename>) "utf-8"), but when I use it in another project I think it's looking in the "resources" directory of that project. Is there an io/resource equivalent for node?

winsome15:06:40

Does the concept of a classpath even exist for cljs?

winsome16:06:33

It looks like you can require json files in node, but I've got edn : /

rolt16:06:22

you could put the edn data in a cljs file in the sources folder and require it

dnolen19:06:51

@jrychter I released 1.11.60 give it a try

nodename23:06:01

It appears that the &env implicit argument of defmacro in cljs is not what it is in clj, and so the spy-env example on p 252 of Emerick et al Clojure Programming does not work. Is there a workaround?