Clojurians
#cljs-dev
<
2015-12-07
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

mfikes03:12:22

[Bootstrap] Arg! There is a typo in the keyword on [this line](https://github.com/clojure/clojurescript/blob/r1.7.189/src/main/cljs/cljs/js.cljs#L220) (intention was probably :macros-ns) with a few consequences. When fixed, with other stuff, the compiled form of macro namespaces is cached.

mfikes03:12:18

In this experimental commit, I rippled through the result of where that fix should have an effect, with desired result for macro namespace caching then working in the Planck client of cljs.js: https://github.com/mfikes/clojurescript/commit/51f991413ccc6807413cdc8e072b23e326da8e00

mfikes19:12:30

I’ve seen that it is indeed possible for bootstrapped to properly cache in the case of a foo.core (say, core.cljs) namespace requires the macros in a foo.core (say, core.clj) namespace. In that case, both namespaces have the same name, but you want to cache the macros namespace with a different name. Without changing cljs.js API, it can be done by peeking inside the cache data, which is less than ideal, but works. For example: https://github.com/mfikes/planck/blob/e34b62ebae24fb26cb4b17807b69506e3f860ba1/planck-cljs/src/planck/repl.cljs#L376-L378

mfikes20:12:50

Since it is difficult to discuss CLJS-1504 beyond the simple typo fix, I’ve attached a draft patch to it for comment. FWIW, this draft patch has been functioning pretty well for me.

dnolen20:12:00

@mfikes: thanks applying it

mfikes20:12:57

@dnolen: Cool. If it could use further revisions, I suppose we can make them.

dnolen20:12:12

looks fine to me

dnolen20:12:16

self host tests all pass

mfikes20:12:54

@richiardiandrea has also been active in the self-host space… perhaps he can also help with downstream testing of the patch’s consequences

mfikes20:12:52

Cool, I feel like I just summoned Andrea right out of the ether. :simple_smile:

richiardiandrea20:12:28

I will guys eventually test this as well, I am now concentrate to catch up with planck :smile:

mfikes20:12:57

@richiardiandrea: Even if you simply build Replumb and run its tests using ClojureScript master at some point, I think that is valuable downstream validation.

mfikes20:12:12

I suppose I could do that, actually. :simple_smile:

richiardiandrea20:12:17

Now replumb is targeting 1.7.170...I also have an issue that I would like to submit here, just want to be sure I am doing everything right :smile:

dnolen21:12:42

@richiardiandrea: not a bug that’s how Google Closure works

dnolen21:12:15

to get reloading you need to muck with goog/base.js data structures

dnolen21:12:28

all the current REPLs do some form of this

richiardiandrea21:12:03

oh ok, maybe then I just need planck's patch for this...will try that

richiardiandrea21:12:07

it was just odd that it is calling twice Loading dependencies for cljs.user but maybe I will have to explore more the internals of ns

richiardiandrea22:12:00

Ah beginners! Yes I knew I had a lot to learn, that's good I have good mentors :smile: Thanks Mike!