Sooo may comments I have on this stuff! :-/  I'll try to keep them focused 
to just what Ken wrote.
Mostly :-)



On Wednesday, May 9, 2012 3:08:04 PM UTC-7, Ken Barber wrote:
>
>
> So the top level location of stuff is defined here: 
>
> http://docs.puppetlabs.com/puppet/2.7/reference/modules_fundamentals.html 
>

When I first came across puppet, couple years ago, I came across the term 
"module", and at the time, I thought it was just a higher level grouping of 
"class".
resource << class << module
And in fact, some some ways, that doc you just referenced, agrees with that.
"On disk, a module is simply *a directory with a specific, predictable 
structure:"*


Given that the path I took to reach the "modules" bit, had just been 
talking about pure user-side, non-puppet-back-end stuff, I still thought I 
was in pure puppet language land.

There is only a brief mention in the top half of the page, about the lib 
directory. it says,

"Contains plugins, like custom facts and custom resource types"

Umm. okay. (files that in back of brain, doesnt sound very crucial or 
different)

And with that, an assuption has just been made, "the lib directory is just 
like everything else (ie: same language), it just has a slightly different 
role to play"
Other parts of the doc support this assumption.

"To write a module, simply write classes and defined types and place them 
in properly named manifest files as described above."

Well, great! You just said it was "simple"! So it's easy!  CERTAINLY then, 
I would have to do anything COMPLICATED, like learn *two different 
languages* or anything. Clearly, it's "simple"
:-P :-P :-P~~~

Nothing on that page gives any direct indication, "beware! lib directory is 
totally different from all other directories"

There's also the problem of documentation fragmentation.
Just as the problem of code fragmentation, where any time you start 
maintaining parallel functionality in two separate source code files, they 
start to diverge... when you start maintaining parallel documentation on a 
subject it starts to diverge, and one inevitably starts falling beind, etc.

You have (at least!) two separate places for documenting what modules are 
and how to use/make them.
The stuff on forge.puppetlabs.com, and this stuff you referenced. There 
needs to be a single canonical place.

* * * Worst of all, you have different file layouts for the "same" thing.

The doc you just have the url for, above, says
( custom types go in   (MODULEDIR)/lib/(?somewhere?)  -- hey another bug, 
it doesnt say specifically where under lib it goes )

Whereas the layout you gave me previously  (hmm, and you actually repeat 
later on in the message I'm replying to) says that custom types should go in
(MODULEDIR)/type

Inconsistent!  Inconsistency== bad and confusing!!!  :(

(PS: yes I agree with your other thought, that renaming "lib" to "rubyext" 
or some such, could potentially be helpful to aid in disambiguating this 
stuff.



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-dev/-/UVYZlDPUi5MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to