Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-22 Thread David Nolen
Interop with Google Closure libraries creates some issues as they don't really follow Clojure namespace conventions at all. I don't really see how to disallow things like that without causing more trouble than it's worth. Open to any good ideas others may have. David On Sun, Jun 22, 2014 at 2:59

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-22 Thread Colin Fleming
I guess js/goog.net.EventType and js/goog.net.XhrIo would have worked in those cases? My issue in Cursive is that resolving any symbol to its JS equivalent (which would fix a lot of these cases I've asked about) caused a bunch of spurious resolutions. For example, in one of my tests I had a

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-22 Thread David Nolen
On Sun, Jun 22, 2014 at 6:44 PM, Colin Fleming colin.mailingl...@gmail.com wrote: I guess js/goog.net.EventType and js/goog.net.XhrIo would have worked in those cases? js/foo.bar.baz will always works. David -- Note that posts from new members are moderated - please be patient with your

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-14 Thread Colin Fleming
One more question, I've seen things like this a couple of times: (instance? cljs.core.Delay x) and (set! cljs.core.ExceptionInfo.prototype (js/Error.)) Here the JS FQN doesn't use the js/ alias. Is that because instance? and set! are considered interop forms, or can fully qualified JS objects

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-14 Thread David Nolen
Those should be cljs.core/Foo David On Sat, Jun 14, 2014 at 6:27 AM, Colin Fleming colin.mailingl...@gmail.com wrote: One more question, I've seen things like this a couple of times: (instance? cljs.core.Delay x) and (set! cljs.core.ExceptionInfo.prototype (js/Error.)) Here the JS FQN

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-14 Thread Colin Fleming
Ah, of course, that's automatically aliased - thanks! On 15 June 2014 00:58, David Nolen dnolen.li...@gmail.com wrote: Those should be cljs.core/Foo David On Sat, Jun 14, 2014 at 6:27 AM, Colin Fleming colin.mailingl...@gmail.com wrote: One more question, I've seen things like this a

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-09 Thread David Nolen
On Sun, Jun 8, 2014 at 5:55 AM, Colin Fleming colin.mailingl...@gmail.com wrote: Hi all, I'm working on CLJS symbol resolution for Cursive. There are a lot of corners where it's hard to figure out from the doc how they should work - I've looked through the code but I'm not sure I've got it

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-09 Thread Colin Fleming
Thanks David. I think I'll implement this the way it should work then, and users will see an unresolved symbol warning if they use the incorrect forms. As things get fancier I can provide some explanation and an intention to migrate the incorrect forms to the correct ones. Hopefully this should

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-09 Thread Colin Fleming
Oh, one other question - does :refer-clojure in CLJS refer both macros and functions in the same declaration? i.e. I could do something like: (ns foo (:refer-clojure :only [defn reduce])) On 10 June 2014 01:27, Colin Fleming colin.mailingl...@gmail.com wrote: Thanks David. I think I'll

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-09 Thread David Nolen
That is correct. On Mon, Jun 9, 2014 at 9:31 AM, Colin Fleming colin.mailingl...@gmail.com wrote: Oh, one other question - does :refer-clojure in CLJS refer both macros and functions in the same declaration? i.e. I could do something like: (ns foo (:refer-clojure :only [defn reduce]))

Re: [ClojureScript] Clarification of symbol resolution rules

2014-06-09 Thread Colin Fleming
Great, thanks. On 10 June 2014 01:33, David Nolen dnolen.li...@gmail.com wrote: That is correct. On Mon, Jun 9, 2014 at 9:31 AM, Colin Fleming colin.mailingl...@gmail.com wrote: Oh, one other question - does :refer-clojure in CLJS refer both macros and functions in the same

[ClojureScript] Clarification of symbol resolution rules

2014-06-08 Thread Colin Fleming
Hi all, I'm working on CLJS symbol resolution for Cursive. There are a lot of corners where it's hard to figure out from the doc how they should work - I've looked through the code but I'm not sure I've got it all right. 1. I've seen several times in the group here that / should only be used