Do we need charm "snippets"?
james.westby at canonical.com
Wed Nov 23 04:00:47 UTC 2011
On Tue, 22 Nov 2011 13:49:41 -0800, Clint Byrum <clint at ubuntu.com> wrote:
> I think the best way to get this done is to add a bit of "Should" policy
> that states that code should not be copied from one charm to another,
> but instead should be added to charm-helper and removed from both charms.
I see this as somewhat similar to maintainer scripts in packaging
(e.g. http://wiki.debian.org/DpkgConffileHandling,) which has shown that
nothing < documentation of patterns < copied snippets < shared helper
library < built in
It's pretty easy to start moving up this chain and getting some
benefit. In fact it's the path that patterns/snippets take if they
remain useful and get adopted.
So +1 on doing something here, and +1 for doing it incrementally as
Also, keep an eye out for where something should move up a level, as
if the mass at one leve grows too large there will start to be problems
(e.g. having too many copied snippets can lead to it being hard to
change something in core juju as it would break too many charms.)
More information about the Juju