mfikes / elbow

Use Replumb in Node
Eclipse Public License 1.0
12 stars 1 forks source link

Can't define a subnamespace of cljs.core #1

Closed mfikes closed 8 years ago

mfikes commented 8 years ago

In Planck:

cljs.user=> (js* "goog.provide('foo.bar.baz.core');")
nil
cljs.user=> js/foo.bar
#js {:baz #js {:core #js {}}}
cljs.user=> (js* "goog.provide('cljs.core.async.impl.protocols');")
nil
cljs.user=> js/cljs.core.async.impl
#js {:protocols #js {}}
cljs.user=> js/cljs.core.async
#js {:impl #js {:protocols #js {}}}

But in Elbow:

cljs.user=> (js* "goog.provide('foo.bar.baz.core');")
nil
cljs.user=> js/foo.bar
#js {:baz #js {:core #js {}}}
cljs.user=> (js* "goog.provide('cljs.core.async.impl.protocols');")
nil
cljs.user=> js/cljs.core.async.impl
ERROR - Cannot read property 'impl' of undefined
mfikes commented 8 years ago

Joel Martin's works for the above.

$ npm install -g cljs-repl
$ cljs

Perhaps this has to do with https://github.com/kanaka/cljs-bootstrap/blob/master/script/base.patch

arichiardi commented 8 years ago

Can you try replumb 0.1.2 ? If it was a replumb problem, I fixed it:

~/git/replumb (master $=)$ node dev-resources/private/node/compiled/nodejs-repl.js src/cljs
cljs.user=> (js* "goog.provide('foo.bar.baz.core');")
nil
cljs.user=> js/foo.bar
#js {:baz #js {:core #js {}}}
cljs.user=> (js* "goog.provide('cljs.core.async.impl.protocols');")
nil
cljs.user=> js/cljs.core.async.impl
#js {:protocols #js {}}
mfikes commented 8 years ago

@arichiardi Sweet! Yes, I was able to update elbow to sufficiently be like replumb, using replumb's 0.1.2 API and things work now.