This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (2)
- # beginners (93)
- # boot (9)
- # cider (1)
- # cljs-dev (50)
- # cljsrn (4)
- # clojure (32)
- # clojure-russia (58)
- # clojure-spec (23)
- # clojurescript (146)
- # clojurewerkz (2)
- # component (1)
- # cursive (2)
- # hoplon (163)
- # off-topic (4)
- # om (117)
- # onyx (8)
- # pedestal (1)
- # re-frame (13)
- # reagent (34)
- # spacemacs (17)
- # test-check (1)
- # untangled (3)
I'm starting to look http://dev.clojure.org/jira/browse/CLJS-1622, but I'm starting to ask myself if the ticket makes sense
for the same reason of: http://dev.clojure.org/jira/browse/CLJS-1623
I'll add a comment in JIRA
this is a fun one: http://dev.clojure.org/jira/browse/CLJS-1830
(def a (sorted-map-by > 1 :a 2 :b)) (get a "a")
this fails because it ends up using the function version of
<, which returns
false for both
(< "a" 1) and
(< 1 "a")
so the comparator returns 0
I'm not sure what the right fix is. Something that comes to mind is a runtime check that all the arguments passed to
< are numbers
@juhoteperi just attached a patch to http://dev.clojure.org/jira/browse/CLJS-1822 pretty diff here: https://github.com/anmonteiro/clojurescript/commit/e4ab8089321aca7ee576c0d8ab16aed85e7091ed
appreciate your feedback
since 1.9.293, I see that
(my.ns$macros/xx) evaluates to
Is it on purpose?
It causes me a problem with the port of
there's probably a solution you're not seeing 🙂
can you point me to the specific line in the code?
As a temporary workaround I referred the
cljs.core.match$macros namespace explicitely https://github.com/viebel/core.match/blob/master/src/main/clojure/cljs/core/match.cljc#L81-L91
backtrack-sym are injected into the code
Therefore they are needed at run time
The clean solution would be to ensure
cljs.core.match is loaded when one requires the
and to define
Actually, I think this is the case already
in core.match README, the advised way to load core.match is
(ns foo.bar (:require [cljs.core.match :refer-macros [match]]))
It cause both
cljs.core.match$macros to be loaded
In my test code, I used
(ns my.match· (:require-macros [cljs.core.match :refer [match]]))
So the bug is in my test code 🙂
@viebel it seems to me that you just need to
(:require-macros [cljs.core.match]) in your
I don't see you doing that anywhere?
in what file?
it's the use case that 1.9.293 allows
but then all the functions defined inside the code will pollute
all of them !!!
all of the functions defined in
match.cljc are needed by the macro namespace
sorry I don't understand what you're saying
I mean that for the purpose of macro expansion
there are a lot of functions defined
have you tried doing what I said?
those functions are not needed at “run-time"
What you said will probably work
My concern is: is it the proper solution?
so what is the problem? adding size to the build?
it is the proper solution for it to work in regular ClojureScript as well
ok let me try it
It works like a charm !