Fork me on GitHub
#clojurescript
<
2019-06-19
>
snurppa12:06:48

Uncaught Error: no conversion to symbol
    at Function.$cljs$core$symbol$$.$cljs$core$IFn$_invoke$arity$1$ (core.cljs:1111)
    at $schema$core$pred$cljs$0core$0IFn$0_invoke$0arity$01$$ (core.cljs:312)
    at core.cljs:371
    at init.cljs:6
I turned on :pseudo-names true to compilation and got this error. It seems to be coming from schema.cores definition of (def Str (pred string?)). And schema.core/pred one arity version seems to be ([p?] (pred p? (symbol (utils/fn-name p?)))) So looking at the code of cljs.core/symbol it seems parameter is not symbol,string,var nor keyword. Anyone can explain why turning :pseudo-names on causes this behaviour? :thinking_face: Has something happened to cljs.core/string? when “pseudo-naming”?

snurppa12:06:56

Or maybe it’s about schema.utils/fn-name? https://github.com/plumatic/schema/blob/master/src/cljx/schema/utils.cljx#L62-L66 Any hints where I should be looking more to educate myself more on this? 😄 Thanks.

tavistock12:06:04

it might be choking on .cljx

idiomancy15:06:29

anyone have any decent gists for deep copying a js object?

idiomancy15:06:53

I'm trying to hack a ref of sorts by cloning and object and then freezing it

Andres16:06:32

Stringifying to json and then converting it back... makes me hate js all the more.

😆 4
idiomancy17:06:40

hrm, yeah I should have specified the ref statement was meant to imply I'm using a live object --- a NamedNodeMap in particular. https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap stringifying it does no good. just returns "{}"

lxsameer21:06:50

hey folks, is it possible to get the current namespace via a macro in compiletime ?

thheller21:06:27

*ns* or (-> &env :ns :name) both work

👍 4
lxsameer21:06:20

hmmm i tried *ns* it didn't work

lxsameer21:06:39

because it doesn't exist in cljs

aisamu01:06:09

> via a macro in compiletime It should be available for clj files and the clj part of cljc files!

lxsameer21:06:47

i'll give the second one a try

lxsameer21:06:23

@thheller thanks it worked 😉

Michael Mackenzie21:06:27

Hey guys, I've got a problem and I can't deploy my application. lein ubjerjar works for me locally when i build my clojure/clojurescript app, but when I deploy to Heroku, my javascript dependencies declared in :npm-deps are installed without their dependencies

dviramontes03:06:05

Interesting are you also tracking your package.json in your repo ?

Michael Mackenzie16:06:23

No. It is in my .gitignore

Michael Mackenzie18:06:48

@U0791FRBN any idea what this could be?

dviramontes18:06:18

i think you need to track package.json for npm to download dependencies, what you want to gitignore is the actual directory node_modules

dviramontes18:06:32

im not too familiar on how shadow.cljs uses npm deps

dviramontes18:06:44

I would start there

Michael Mackenzie18:06:24

ok i'll investigate further. thanks

Michael Mackenzie21:06:43

any help would be greatly appreciated 🙏