This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aatree (1)
- # admin-announcements (5)
- # beginners (5)
- # braid-chat (2)
- # cbus (2)
- # cljs-dev (8)
- # cljsrn (13)
- # clojure (101)
- # clojure-chicago (1)
- # clojure-greece (11)
- # clojure-russia (77)
- # clojure-taiwan (1)
- # clojure-uk (5)
- # clojurescript (73)
- # core-async (5)
- # core-matrix (1)
- # cursive (5)
- # datomic (10)
- # devcards (44)
- # emacs (16)
- # hoplon (207)
- # keechma (5)
- # lein-figwheel (1)
- # leiningen (5)
- # liberator (3)
- # melbourne (1)
- # om (171)
- # onyx (25)
- # parinfer (1)
- # proton (2)
- # re-frame (28)
- # reagent (50)
- # untangled (7)
- # yada (4)
hi guys, is there any good way to find which function triggers current function in clojure ?
not really, you can get a stack trace, which contains jvm level method information, which is sort of a superset of clojure function stack, but it is all in terms of methods
@nxqd: well, a dynamic variable is one that is bound to the stack, not to the lexical context. thus, if you bind a dynamic variable with identifying information in the caller, the callee can look at its value to determine who the caller was.
@nxqd: in general, though, using dynamic variables in clojure can be difficult if you're also using lazy sequences and/or threads, so maybe you want to look at a solution where you pass the context as parameter instead.
good point, I have problem regarding routing in (clojurescript), I find that my app is being routed unexpectedly, I'm trying to find which function has triggered the routing.
actually, I can see that the problem would be close. Since I can change printStacktrace to (.log js/console), I mean it would be the same in term of language
@nxqd: why not put a
debugger statement into the handler and use the debugger to find out where you're coming from?
I have a “migrate” fn in user which I would like to fire off from a shell script. Is there a way to do something like "lein repl migrate”?
@kardan: not sure if you've looked at it, but ragtime is good for running/defining migrations
@danielcompton: I am using ragtime & agree it’s handy. I have a uncommon setup with multiple db’s per “tenant”/customers so need to do handle a lot of migrations...
@danielcompton im using migratus and migratus-lein on the projects I'm working... is ragtime better? if it is, why?
does anybody want to fix some fundamental problems in the scala build tool for me so that I can write some clojure for fun today instead? /sigh/
Hi, clojurians. I've got a problem with
java.lang.ClassNotFoundException potemkin.LazyMapEntry elastish -> clj-http -> potemkin (clj 1.8.0)
@nicola - check version of
potemkin that gets on your classpath. Does that version have the
probably worth doing a lein pedantic thingy / boot show -p to see if there are conflicts
same with 0.4.3
java.lang.NoClassDefFoundError: potemkin/LazyMapEntry at clj_http.headers.HeaderMap$fn__8770.invoke(headers.clj:90)
@nicola: You need to figure out what else is depending on potemkin. Leiningen has a command for this.
The resolved version of potemkin, is going to vary based on your dependencies. Adding
:pedantic? :warn should tell you what is being resolved, and give you clear information on what is actually being resolved.
~/bin/mvn/bin/mvn dependency:tree -Dverbose | grep clj-http [INFO] +- clj-http:clj-http:jar:2.1.0:compile [INFO] | +- (clj-http:clj-http:jar:2.0.0:compile - omitted for conflict with 2.1.0) [INFO] | +- (clj-http:clj-http:jar:1.1.2:compile - omitted for conflict with 2.1.0) [INFO] | | +- (clj-http:clj-http:jar:0.9.1:compile - omitted for conflict with 2.1.0) [INFO] | +- (clj-http:clj-http:jar:0.9.1:compile - omitted for conflict with 2.1.0)
`2. Unhandled clojure.lang.Compiler$CompilerException Error compiling clj_http/headers.clj at (91:10) 1. Caused by java.lang.ClassNotFoundException potemkin.LazyMapEntry
Unhandled clojure.lang.Compiler$CompilerException Error compiling /root/.m2/repository/clj-http/clj-http/2.0.0/clj-http-2.0.0.jar:clj_http/headers.clj at (91:10) 1. Caused by java.lang.ClassNotFoundException potemkin.LazyMapEntry
potemkin/def-map-type , which is macro producing =>
(deftype+ ~name ~params ~'potemkin.collections/AbstractMap
the reason is a reference to
potemkin.LazyMapEntry is present when compiling
i've cloned riemann and executed this code inside riemann - it works 😞 Looks like problem with riemann jar.
syntax-quote isn’t available within clojure core as regular macro, right? I’m generating some lists that want auto-gensymd stuff
I don't know that there is one, they certainly exist, but I doubt usage of any of them is above any kind of reasonable threshold you might want before considering something for de facto status
@7h3kk1d: there’s cloverage, which is ok, but I wouldn’t break the build over it’s coverage results
if that doesn't work, then something sitting between you and the clojure reader is messing with you
if your question is actually about regexes and not strings, the answer is you keep adding \ characters until the read stops yelling at you