On Wed, Aug 20, 2014 at 10:46 AM, Matthew Williams <
[email protected]> wrote:
>
> Any default-hook that deviated from this pattern could find itself being
> run multiple times in succession - I wonder if that might be confusing/
> unexpected to a charm author?
>

It'll run multiple times in succession regardless, independent of switching
-- but, yes, unless it switches it'll always do the same thing :). I don't
*think* it's unexpected that we'd run default-hook once for each missing
hook, supplying the substituted hook name every time.


> Gustavo's observation about hooks that the charm might no know about yet
> means that the else clause is absolutely required, I wonder if that's
> obvious to someone who's new to charming?
>

I'm pretty much adamant that we shouldn't even run new hooks, or expose new
tools, unless the charm explicitly declares it knows about them. But I do
imagine that many implementations will want the else anyway: they don't
need to provide an implementation for every single hook anyway.

Cheers
William
-- 
Juju-dev mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/juju-dev

Reply via email to