This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-19
Channels
- # beginners (17)
- # boot (7)
- # cider (1)
- # cljsrn (4)
- # clojure (22)
- # clojure-austin (19)
- # clojure-canada (1)
- # clojure-dusseldorf (1)
- # clojure-greece (3)
- # clojure-russia (19)
- # clojure-spec (46)
- # clojure-uk (23)
- # clojurescript (17)
- # core-async (7)
- # cursive (13)
- # dirac (66)
- # kekkonen (1)
- # lein-figwheel (2)
- # om (1)
- # onyx (2)
- # re-frame (1)
- # reagent (1)
- # specter (2)
There may be a function entry point for s/keys in the future that would allow this
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
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
many thanks @juhoteperi