Fork me on GitHub
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


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


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


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


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.


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


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


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.


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


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...


I suppose I can just use cljs.test/async


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


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?)


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