Hi David


> A ticket exists for this. Patch welcome :)
>

Is this the ticket?
http://dev.clojure.org/jira/browse/CLJS-615
It speaks of analyzer.clj, but I don't see such a file.
I do see analyze as a function in compiler.clj which sounds promising.

closure.clj:
(defn cljs-dependencies
;...
                   (map #(let [f (ns->cp %)] (hash-map :relative-path f
:uri (io/resource f))))
                   (remove #(nil? (:uri %)))

Looks to be ignoring missing files. I suspect though that it merges with js
dependencies later, and that the trick will be recognizing requires that
are in neither...  I'll dig into it tomorrow and see what I can discover.


Not sure what difference it makes, warnings are errors but without blowing
> up the compilation process so you can get many warnings at once.
>

Some compilers report multiple errors, it may be reasonable to classify the
output however you like.  My opinion is that an error is appropriate when
you know 'it' just wont work, and refuse to produce an output... whereas a
warning is appropriate as a hint that probably 'it' will do something you
might not expect.  In the specific case of an undeclared var will it always
be a runtime error?  I can see an argument to say some js output is better
than none even if certain paths will fail.


And Jonas,

I believe that the reason the above does not trigger an error is because
> 'typomina' might be in a Javascript file somewhere. In GClosure there is
> not an 1-to-1 correspondence between namespaces and files. There is no sane
> way to find a file given a namespace symbol and a file might even define
> several namespaces.
>

Ah that makes sense and makes me think that the code I was looking at can't
be patched so easily then.
It seems I need to read up on exactly what 'require' means in GClosure.  I
was initially mistaken that JavaScript code would be imported to
distinguish from ClojureScript being required, but that is not the case.


Thanks your replies.


Regards,
Timothy

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

Reply via email to