I'm contemplating a fix to this that would require hooks to be
declared in project.clj in order for them to be loaded. This is a good
idea for reasons other than just boot time, but it is a breaking
change.
I'd like to gauge how many people would be affected by such a change.
Auto-loading hooks is a pretty new feature, so if I can fix the
performance issues with it before its use is widespread that might be
nice. But if a lot of people are relying on implicit loading, then I
will be more cautious.
Please let me know.
thanks,
Phil
My suggestion would be make a project.clj tag like :hook-cps which holds all classpathes checked for hooks and one :implict-hooks true that would turn back old behavior - that said I'm not 'hurt' by any chance since I've no project that uses them :P
Regards,
Heinz
Just a personal opinion, but I'd urge you not to worry too much about
breaking changes just yet. The future value of doing the right thing
now outweighs the value of backwards compatibility in an application
as young as Lein.
To answer your direct question, I would not be affected by a
requirement that hooks be
declared in project.clj. Actually, I think there are advantages to
explicit declarations.
David
auto loading is simple and if performance becomes an issue, an explicit
list of hooks would solve this issue. I would however leave auto loading by
default. We have a couple of hundred jar dependencies so speed for us is
an issue but auto loading seems to me a decent default for beginners, better
than failing on a missing implementation or other "strange" behaviours.
Luc P.
Heinz N. Gies <he...@licenser.net> wrote ..
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
Sorry, auto-loading will not stay on by default in the long-term. The
question is whether it will be removed in 1.2.1 or later on. I may
allow auto-loading to be turned on in project.clj, but having stuff
happen behind your back because of what happens to be on your
classpath (even things you didn't add explicitly but were pulled in
via transitive dependencies) is a little too much magic I think.
-Phil
Luc P.
Phil Hagelberg <ph...@hagelb.org> wrote ..
This sounds eminently reasonable to me. Especially since --
fortunately! -- the hooks functionality has only just been released,
so if it's causing trouble, we're probably in a window of opportunity
to fix this before huge quantities of code become dependent on the
current behaviour. So... (inc)
Sincerely,
Michał