Disabling the Clojure Builder in CCW

85 views
Skip to first unread message

Laurent PETIT

unread,
Dec 20, 2012, 11:09:42 AM12/20/12
to clojuredev-users
Hello,

The Clojure Builder has always been a problem for half of the Counterclockwise community for some aspects, and a problem for all the Counterclockwise community for other aspects:

- half of the community prefer to have full control over what is loaded -or not- into the running REPL. 
- the other half is happy with the fact that whenever they save a file, the whole project's source folders are scanned and that every namespace found there is optimistically recompiled (meaning 2 things: AOT compiled on disk, and reloaded into the running REPL). Most certainly, it's the "reloading" side-effect of the AOT compilation that people prefer.

In an attempt to confuse, ergh, to please both parties, I've made the choice that starting a REPL from the project's root node would please people willing auto-compile on save, while starting a REPL from a specific file would please the other part.

This is a never-ending source of confusion, and I now want to stop the insanity I contributed to create in the first place (only fools don't change their minds from time to time).


The other aspect, which is a problem, real or potential, for anybody, is that keeping reloading code automatically does not work well once you start playing more with protocols (and multimethods?), etc. in your code, due to current limitations not of counterclockwise, but of Clojure's dynamic reloading. That's something we'll have to live with for a long time, and having auto-reload just makes things worse.


SO, I decided to disable the Clojure Builder. Totally. No automatic AOT of namespaces anymore. No automatic reloading of namespaces anymore.

Then it occured to me that there's still a need for CCW to help users use AOT: when they are using gen-class and need the result of it in their project or projects that are open, and depend up a gen-classed namespace.

SO I cannot just disable the Clojure Builder. Crap.

Wait, what? for those having this problem, maybe it's just sufficient for them to do the AOT via leiningen, either on command line, either via the integrated leiningen support that will, certainly, come some day (BTW, glad I didn't promise to bring it to you as a XMas present, 'cause it is not ready yet).

yes and NO. There are still people out there, having no choice but stick with their current project builder like maven, having to create gen-classes.
I would like CCW to be a welcoming place for them, too. I was part of this crowd once (and somehow still am in part of my job), so I can feel their distress, their need for help !

SO, I think I will stick with my decision to disable the Clojure Builder, with a tweak:

tl;dr:

- From now on, there'll be no more difference in starting a project from the root node, or from a specific file
- The default behavior will be that no magic is done on your behalf by CCW: that is, no automatic reload-on-save (and no full load on start)
- There will be an option in the Global preferences for turning automatic-reload-save/automatic-load-on-start on.


Thoughts?

Softaddicts

unread,
Dec 20, 2012, 11:46:04 AM12/20/12
to clojured...@googlegroups.com
+1, we use both features so loosing one of them would be a set back :)
With this global option it will be less confusing :)

Luc
> --
> You received this message because you are subscribed to the Google Groups "counterclockwise-users" group.
> To post to this group, send email to clojured...@googlegroups.com.
> To unsubscribe from this group, send email to clojuredev-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/clojuredev-users?hl=en.
>
>
--
Softaddicts<lprefo...@softaddicts.ca> sent by ibisMail from my ipad!

Laurent PETIT

unread,
Dec 20, 2012, 11:48:36 AM12/20/12
to clojured...@googlegroups.com
2012/12/20 Softaddicts <lprefo...@softaddicts.ca>
+1, we use both features so loosing one of them would be a set back :)
With this global option it will be less confusing :)

Wow, a single person using *both* features, cool :-)

Meaning .. would a global option be sufficient? Or would you ideally have a setting per-project? (which could just be a setting per launch configuration, now that I'm thinking about it)

Softaddicts

unread,
Dec 20, 2012, 1:29:13 PM12/20/12
to clojured...@googlegroups.com
Mmmh, this could potentially indicate that I am suffering some personality
disorder :)

A global option would be enough. We have several projects with protocols
in a couple of name spaces hence the external AOT we run from time to time
but we also need this dynamic reloading to occur while debugging name spaces
without protocols.

We could not collocate all protocols in a single project or name space.
It would have killed component isolation.

We try to limit changes to protocols within each project to minimize
restarts while debugging as dynamically as possible.


Luc

Chas Emerick

unread,
Dec 20, 2012, 5:32:27 PM12/20/12
to clojured...@googlegroups.com
This is a big step forward IMO. Of course, Laurent, you've known my position in this area for some time. :-)

Thank you so very much for your hard work on CCW.

- Chas

Steve Buikhuizen

unread,
Dec 20, 2012, 10:30:46 PM12/20/12
to clojured...@googlegroups.com
I was one of those confused users but now, having read this post, I have seen the light.

I like the preference checkbox for clarity and would suggest also including a "Learn more" link next to it pointing to a page that provides the same explanation as in your post. This will save quite a few people some time when they start seeing "rebuilding" indicators.

My 10c
Reply all
Reply to author
Forward
0 new messages