2010/7/20 Meikel Brandmeyer <m...@kotka.de>

> Hi,
>
> On Jul 19, 11:09 pm, Laurent PETIT <laurent.pe...@gmail.com> wrote:
>
> > You got me thinking that all the stuff I and you were talking about
> > concerning namespace dependency graph, etc. for only reloading the
> > appropriate namespaces should be possible to be run from the running
> REPL,
> > and thus provided as a regular tool to be available to all environments:
> > REPL, any IDE / back-end server etc.
> >
> > In its "pure" form it could recompute the dependency graph of the
> namespaces
> > every time "on-the-fly".
> >
> > With this function, even from the REPL could you be sure that you have
> all
> > the functions depending on the macros of some modified namespace
> up-to-date.
> > It is even possible to solve the "functions should be removed if no more
> in
> > the namespace" issue, by adding temporary watchers to the namespace vars,
> > and then removing all the vars whose watchers were not triggered and are
> not
> > defonce vars (this defonce issue being the last problem I currently see:
> how
> > to know that defonce vars have been removed ? The only solution I
> > temporarily envision is to rebind the defonce macro during the reload
> with a
> > decorator which will store information about defonced vars).
> >
> > Of course, some corner cases will still exist: direct access to vars in
> > other namespaces via other-ns/the-var while not explicitly
> requiring/using
> > other-ns (maybe "oddly" relying on other-ns to be loaded preliminary, by
> > other means).
>
> I had hopes that this discussion
>
> http://groups.google.com/group/clojure-dev/browse_thread/thread/b9d15561e8a3b5aa/0541da4e70ad682d
> triggers something, but Stephen obviously didn't have the time to work
> further on this topic.
>


Oh, I hadn't noticed that the discussion also solved the "reload the
dependent parts" as well.
It's indeed a shame that it did not trigger anything in the end.

One question : if I would like to give a try to just the "create a function
which reloads the namespace as well as its dependent parts", on which
primitives should I rely ? Not theoretically, but in practice (maybe
"require" is the theoretic answer, but if "load", although lower level,
"just works" and require "works in most cases", I would go for "load") ?

Of course, if Steve could resurrect his code and finish the work this would
be /good/ ! :)

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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