Issue #8669 has been updated by Dustin Mitchell.

I don't think it makes sense to not document something because it's not needed 
for one particular set of best practices.  Puppet is a programming language, 
and it needs to be completely specified.  I realize that there are regrettable 
parts of the puppet language that you're trying to get rid of (variable scoping 
comes to mind), and that documenting those parts feels like locking-in support 
for them.  But even there not documenting them is the wrong decision, as it 
just leaves your users searching for answers you've deliberately hidden from 
them.  If the language acts a certain way, write that down, and if necessary 
say "this will change, so do not depend on it."

I'm also not sure what you mean - isn't "include master" the way puppet::master 
should declare its dependency on the "master" module?

----------------------------------------
Bug #8669: document relative module includes
https://projects.puppetlabs.com/issues/8669

Author: Dustin Mitchell
Status: Needs Decision
Priority: Normal
Assignee: Nick Fagerlund
Category: 
Target version: 
Affected Puppet version: 2.6.4
Keywords: 
Branch: 
Affected URL: 


This page
 http://docs.puppetlabs.com/learning/modules1.html

should mention that 'include foo' in module bar will first look for foo::bar 
before looking for bar itself.  As an example, this will succeed:

<pre>
modules/puppet/manifests/master.pp:
 class puppet::master {
   include master
 }

modules/master/manifests/init.pp:
 class master {
   fail("hello")
 }

And

node "foo" {
  include puppet::master
}
</pre>

where you would think from reading the docs that <tt>include master</tt> would 
find <tt>modules/master/manifests/init.pp</tt>, it actually finds 
<tt>modules/puppet/manifests/master.pp</tt> and the <tt>puppet::master</tt> 
class.

This behavior is verified in 0.25.2 and (by jblaine) in 2.6.4.  It's not so bad 
if you know to look for it!


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
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-bugs?hl=en.

Reply via email to