Hi!
I'm having a strange behavior, and I do not know if it is expected or not.
I'll try to explain the case. I have two files:
foobar/views/contact.cljs
(ns foobar.views.contact)
(defn contact-component
[state owner]
...)
foobar/views.cljs
(ns foobar.views
(:require [foobar.views.contact :refer [contact-component]]))
(defn contact
[state, owner]
...)
This generates that js:
goog.provide("foobar.views.contact");
// ...
foobar.views.contact.contact_component = function contact_component(state,
owner) {
// ...
}
goog.provide("foobar.views");
// ...
goog.require("foobar.views.contact");
// ...
foobar.views.contact = function contact(state, owner) {
console.log("test", foobar.views.contact.contact_component);
// ...
om.core.build.call(null, foobar.views.contact.contact_component,
state)], null);
// obviously here foobar.views.contact.contact_component is *null* or
*undefined*
// because foobar.views.contact is overwriten by this function.
// ...
}
This makes impossible have a function name in one namespace that matches
with nested namespace name.
I don't know if this common use case or not (maybe I'm doing it wrong...).
I'm using clojurescript 2511 (with :whitespace optimization)
Cheers.
Andrey
--
Andrey Antukh - Андрей Антух - <[email protected]> / <[email protected]
>
http://www.niwi.be <http://www.niwi.be/page/about/>
https://github.com/niwibe
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.