Fork me on GitHub
#specter
<
2018-07-10
>
jsa-aerial00:07:12

Adventures in CLJS now... I require [com.rpl.specter :as sp] and require-macros [com.rpl.specter.macros :refer [select-one transform setval]]. When trying to compile, the following is issued: 'Invalid :refer, macro com.rpl.specter.macros/setval does not exist'.

jsa-aerial00:07:28

I am using figwheel

jsa-aerial00:07:57

Anyone using Specter in CLJS land have any ideas?

jsa-aerial00:07:24

OK, it looking further in the doc, I see the CLJS incantation. Let me try that and see if it makes this go away.

jsa-aerial00:07:17

Yes, that fixes it. Sorry for the noise.

souenzzo11:07:16

Require from com.rpl.specter. this namespace .macros is not used anymore

Bravi12:07:35

@jsa-aerial I always use sp/select-one, sp/ALL and etc

jsa-aerial14:07:50

@bravilogy That's what I do in CLJ - always namspace qualified for everything. But I thought you needed to explicitly name the macros in a require-macros or :refer-macros them for them to be available in CLJS land. Since macros are expanded and such in the JVM (well unless you are using self hosted) I admit I don't really understand the implementation details of how they are made available in CLJS.

Bravi14:07:44

yeah I was just implying the fact that specter works differently in cljs, hence I don’t investigate any further than that 😄 haha. i just namespace them all

jsa-aerial14:07:46

Well, other than pulling in the macro stuff (which is anything in cljs land) all the specter code I am using works exactly as in clojure. Very cool!

jsa-aerial14:07:06

No 'porting' at all - just use!