Fork me on GitHub
#clojurescript
<
2016-06-19
>
Alex Miller (Clojure team)02:06:54

There may be a function entry point for s/keys in the future that would allow this

Alex Miller (Clojure team)02:06:33

Many of the functions in spec that define specs are macros so they can capture the form for reporting

kauko10:06:09

I'm going to use taoensso.timbre for logging, but I'd like to set up my own projectname.logging namespace, from where I use the library, and then the rest of my namespaces would use that namespace. Can this be done, since timbre uses macros for logging? For example, debug is a macro

kauko10:06:41

So I can't just do something like (defn debug [& args] (timbre/debug args)), can I?

kauko10:06:57

The rationale for creating my own ns is that I'd like to have the clutter of requiring the library in one place only. If I can't do that I have a piece of boilerplate I'll have to include in all of my .cljc files

kauko10:06:04

Hmm actually (defn debug [& args] (timbre/debug args)) does work, but it obviously logs the arguments as a sequence, which is not really what I want.

kauko10:06:57

This works on the Clojure side, but clojurescript says I'm calling apply-macro with the wrong number of arguments

kauko10:06:13

Pretty new to macros still, is there some difference between .clj and cljs that I'm missing?

kauko10:06:53

Well, this shaped up to me quite a monologue, sorry 🙂 I realised I don't actually want to even do what I'm trying to do, since if I use timbre directly from my namespaces, it will tell me the file+line number from where the log came.

anmonteiro20:06:47

does anybody have any suggestion on how to test CLJS code that uses setTimeout?

gowder20:06:05

Just noticed something --- boot throws a warning about uuid when building in cljs 1.9.76 (with boot 2.6.0 and boot-cljs 1.7.228-1):

WARNING: uuid? already refers to: cljs.core/uuid? being replaced by: cognitect.transit/uuid? at line 342 /Users/pauliglot/.boot/cache/tmp/Users/pauliglot/github/ra-chrome-cljs/1qc6/2qitq5/main.out/cognitect/transit.cljs 
Has anyone seen this before? The warning is not thrown when the build.boot doesn't specify a direct dependency. I'm not sure if this is something that's changed in recent clojurescript, or a bug in boot-cljs, or what...

anmonteiro20:06:22

I suppose I can just use cljs.test/async

juhoteperi21:06:11

@gowder: It is caused by changes in Clojurescript and the fix is to add :refer-clojure :exclude [uuid?] to transit-cljs

gowder21:06:33

thanks @juhoteperi --hmm... I am not actually directly using transit-cljs, probably a dependency of something else I'm using. (moral dilemma: track it down and file an issue, or not worry about it?)

juhoteperi21:06:15

@gowder: Unless you need the latest Cljs, I would just use older version until this has been fixed