This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-18
Channels
- # aleph (12)
- # beginners (31)
- # boot (67)
- # cider (17)
- # cljs-dev (14)
- # clojure (111)
- # clojure-dev (1)
- # clojure-france (4)
- # clojure-gamedev (1)
- # clojure-italy (49)
- # clojure-nl (3)
- # clojure-poland (2)
- # clojure-russia (18)
- # clojure-spec (15)
- # clojure-uk (68)
- # clojurescript (33)
- # core-typed (1)
- # datomic (15)
- # emacs (3)
- # graphql (4)
- # hoplon (36)
- # leiningen (3)
- # lumo (44)
- # mount (2)
- # off-topic (46)
- # om (21)
- # onyx (47)
- # parinfer (22)
- # pedestal (21)
- # protorepl (4)
- # quil (4)
- # re-frame (15)
- # reagent (4)
- # ring-swagger (9)
- # rum (27)
- # spacemacs (11)
- # vim (7)
- # yada (8)
(ns foo.bar
(:require-macros foo.bar))
(defrecord X [])
(defmacro cake []
`(foo.bar/X.))
you forgot to self-require macros 馃檪
@anmonteiro but I did refer-macros
:refer-macros
only works if the namespace has a self-require
it worked for me
notice how I also namespace-qualified foo.bar/X
@moxaj actually it works in Planck without the qualifying
so feel free to open a ticket
@moxaj that鈥檚 awesome!
@moxaj @anmonteiro That code doesn鈥檛 work when Planck is built against ClojureScript master, so something may have broken upstream. You can work around the issue by instead writing
(defmacro cake []
`(->X))
which is better anyways. (See https://stuartsierra.com/2015/05/17/clojure-record-constructors)My hunch is https://dev.clojure.org/jira/browse/CLJS-2109 broke it. Will find out real quick.
Actually it can鈥檛 be that ^ as that is newer than the version of Lumo that it fails in.
thanks for taking the time to investigate it! I'd do it if I was more familiar with building master / bisecting / stuff
@mfikes so it鈥檚 somewhere between 562 and 671?
looks related to defrecord
only
adding a macro that calls a function works
might actually be CLJS-2109
@moxaj Found the bad commit. If you are curious about how to bisect: https://gist.github.com/mfikes/410ed3227572dd0bec2c64fb5957d941
I have somewhat of an irrational fear of new git commands, as they might open vim and then i'm doomed
Hah. @moxaj I don鈥檛 even use command line git
. But those instructions would be done in a separate checkout, and usually take 8 cycles or less to pinpoint the bad commit. 馃檪
@anmonteiro There might be more to the above, as it fails for me in Lumo 1.5.0, which is built against ClojureScript 1.9.542.
@mfikes amazing guide for bisecting
FWIW if you use Emacs + Magit it鈥檚 even easier
Another consistent explanation would be that it was broken in 1.9.542, got fixed in 1.9.562, and then regressed again in 1.9.655 (shrug)
what about a Planck that has 1.9.542?
thanks for the minimal repro too, will make for a good test case in test-self-host