Clojure namespace change watcher, separate from test framework?

113 views
Skip to first unread message

Stuart Halloway

unread,
May 12, 2012, 10:52:02 AM5/12/12
to cloju...@googlegroups.com
Does this exist? If not, what is the closest jumping off point for making it?

Stu

James Reeves

unread,
May 12, 2012, 11:32:25 AM5/12/12
to cloju...@googlegroups.com
On 12 May 2012 15:52, Stuart Halloway <stuart....@gmail.com> wrote:
> Does this exist? If not, what is the closest jumping off point for making it?

I wrote ns-tracker, based off Stuart Sierra's Lazytest code:

https://github.com/weavejester/ns-tracker

Is that the sort of thing you were looking for?

- James

Kevin Downey

unread,
May 12, 2012, 9:16:15 PM5/12/12
to cloju...@googlegroups.com
watching the filesystem for changes and loading saved code is one
interpretation, in other cases you might want to listen for changes to
the namespace object (possibly triggered by a filesystem watcher). I'd
suggest extending add-watch support to namespaces, but the semantics
don't match (all things that can currently be watched are mutable
references to immutable data, namespaces are mutable). Maybe Namespace
could implement some of the change listener java bean stuff.

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



--
And what is good, Phaedrus,
And what is not good—
Need we ask anyone to tell us these things?

James Reeves

unread,
May 12, 2012, 10:33:46 PM5/12/12
to cloju...@googlegroups.com
On 13 May 2012 02:16, Kevin Downey <red...@gmail.com> wrote:
> watching the filesystem for changes and loading saved code is one
> interpretation, in other cases you might want to listen for changes to
> the namespace object (possibly triggered by a filesystem watcher). I'd
> suggest extending add-watch support to namespaces, but the semantics
> don't match (all things that can currently be watched are mutable
> references to immutable data, namespaces are mutable). Maybe Namespace
> could implement some of the change listener java bean stuff.

Ah, I see. I briefly wondered why this was posted in clojure-dev, but
I didn't make the connection. We're talking about a more general
namespace watching mechanism for a future version of Clojure?

- James

Stuart Halloway

unread,
May 13, 2012, 8:26:36 AM5/13/12
to cloju...@googlegroups.com
Hi James,

Exactly the sort of thing I am looking for, thanks.

Stu


Stuart Sierra

unread,
May 14, 2012, 5:29:25 PM5/14/12
to cloju...@googlegroups.com
Brenton Ashworth started work on refactoring the ns-monitoring in Lazytest as a future contrib library. I don't think he finished.
-S

Reply all
Reply to author
Forward
0 new messages