lumo

:lumo: Standalone ClojureScript environment. Currently at version 1.9.0
moxaj 2017-07-18T19:01:28.627902Z

not sure why this happens, seems to work in jvm cljs

anmonteiro 2017-07-18T19:08:20.872516Z

@moxaj

(ns foo.bar
  (:require-macros foo.bar))

(defrecord X [])

(defmacro cake []
  `(foo.bar/X.))

anmonteiro 2017-07-18T19:08:28.877285Z

you forgot to self-require macros 🙂

moxaj 2017-07-18T19:13:22.044142Z

@anmonteiro but I did refer-macros

moxaj 2017-07-18T19:13:35.051310Z

my first approach was actually self-require, but that does not work either

anmonteiro 2017-07-18T19:13:41.054645Z

:refer-macros only works if the namespace has a self-require

anmonteiro 2017-07-18T19:13:44.056061Z

it worked for me

anmonteiro 2017-07-18T19:14:05.067484Z

notice how I also namespace-qualified foo.bar/X

moxaj 2017-07-18T19:14:19.075773Z

well that's the thing, why do I have to do that

moxaj 2017-07-18T19:17:04.167563Z

and I thought :refer-macros works w/o self-require? certainly does in jvm cljs

moxaj 2017-07-18T19:20:17.275395Z

also works in lumo, so that's not the issue

anmonteiro 2017-07-18T19:22:02.333045Z

@moxaj actually it works in Planck without the qualifying

anmonteiro 2017-07-18T19:22:08.336189Z

so feel free to open a ticket

moxaj 2017-07-18T19:22:28.346896Z

alrighty

moxaj 2017-07-18T19:22:50.358460Z

pr for the closure libs support coming soon, gonna need reviews for sure

anmonteiro 2017-07-18T19:23:23.376595Z

@moxaj that’s awesome!

mfikes 2017-07-18T19:33:43.720720Z

@moxaj @anmonteiro That code doesn’t 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)

mfikes 2017-07-18T19:34:10.735777Z

It is still probably worth filing a Jira against ClojureScript.

moxaj 2017-07-18T19:34:33.748641Z

@mfikes that's really helpful, thanks!

mfikes 2017-07-18T19:34:50.758085Z

I bet it was a result of the desire to properly handle symbols with dots in it.

mfikes 2017-07-18T19:34:55.760579Z

Let me dig up that change.

moxaj 2017-07-18T19:34:55.760960Z

considering the fact that you have to namespace qualify differently in clj and cljs

moxaj 2017-07-18T19:35:08.768084Z

the records at least

mfikes 2017-07-18T19:38:46.889741Z

My hunch is https://dev.clojure.org/jira/browse/CLJS-2109 broke it. Will find out real quick.

mfikes 2017-07-18T19:41:27.978083Z

Actually it can’t be that ^ as that is newer than the version of Lumo that it fails in.

mfikes 2017-07-18T19:41:58.994844Z

I’ll do a git bisect

moxaj 2017-07-18T19:44:58.093105Z

thanks for taking the time to investigate it! I'd do it if I was more familiar with building master / bisecting / stuff

anmonteiro 2017-07-18T20:04:21.757159Z

@mfikes so it’s somewhere between 562 and 671?

anmonteiro 2017-07-18T20:07:27.861624Z

looks related to defrecord only

anmonteiro 2017-07-18T20:07:41.870224Z

adding a macro that calls a function works

anmonteiro 2017-07-18T20:09:32.931699Z

might actually be CLJS-2109

mfikes 2017-07-18T20:26:50.508912Z

Yes, it is. Logging a JIRA

mfikes 2017-07-18T20:30:27.631172Z

https://dev.clojure.org/jira/browse/CLJS-2261

mfikes 2017-07-18T20:31:32.669031Z

@moxaj Found the bad commit. If you are curious about how to bisect: https://gist.github.com/mfikes/410ed3227572dd0bec2c64fb5957d941

moxaj 2017-07-18T20:33:10.724874Z

@mfikes wow, thanks!

moxaj 2017-07-18T20:33:42.742631Z

I have somewhat of an irrational fear of new git commands, as they might open vim and then i'm doomed

mfikes 2017-07-18T20:44:45.113973Z

Hah. @moxaj I don’t 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. 🙂

mfikes 2017-07-18T20:46:58.188558Z

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

anmonteiro 2017-07-18T20:48:27.237612Z

@mfikes amazing guide for bisecting

anmonteiro 2017-07-18T20:48:30.239171Z

FWIW if you use Emacs + Magit it’s even easier

mfikes 2017-07-18T20:49:05.258789Z

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)

anmonteiro 2017-07-18T20:49:25.269510Z

well

anmonteiro 2017-07-18T20:49:36.275759Z

what about a Planck that has 1.9.542?

anmonteiro 2017-07-18T20:50:01.289555Z

thanks for the minimal repro too, will make for a good test case in test-self-host