I tried this, but it didn't seem to work :
; a/b/c.clj
(ns a.b.c)
(defn f [] :f)
(load "c1")

;a/b/c1.clj
(in-ns 'a.b.c)
(defn g [] :g)

;in REPL
user=>(let [real-load clojure.core/load]
  (binding [clojure.core/load (fn [f] (println "file loaded: " f) (real-load
f))] (compile 'a.b.c)))
file loaded:  a.b.c
a.b.c
user=>

??

2009/1/28 Christophe Grand <christo...@cgrand.net>

>
> Laurent PETIT a écrit :
> >
> >     Hi Laurent,
> >
> >     Can't you rebind clojure.core/load to record all resources laoded
> >     during
> >     a namespace compilation?
> >
> >
> > Well yes, that seems indeed a good solution to another problem I'll
> > have to solve (dependency graph of files) -> thanks for anticipation
> > my next question :-)
> > But does it solve the problem I exposed ?
> >
> > Let's rephrase it : to force the recompilation of a lib, is there
> > another way than "touching" the lib's declaring file (so that if I
> > just make changes in a file loaded by the lib's declaring file, I'm
> > sure the lib is really recompiled) ?
> >
> Well, I answered your next question because, here, clojure.core/compile
> doesn't try to be smart and recompile the whole lib each time it is
> called. :-( (or :-) I don't know)
>
> Christophe
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to