More details in metaparameter redefinition warning

Definitions which redefine metaparameters, such as the following,
generate a warning because metaparameters, unlike normal parameters,
are inherited by all resources contained in the definition:

 define contact_info($alias = undef) {
   ...
 }

To find and fix this problem in the manifests we need to know where
the parameter is defined or at least the name of the definition, which
is now part of the warning message.
(#14296) Improve template function error message.

The current template function does not provide sufficient detail for
troubleshooting. This patch uses the backtrace to provide the fully
qualified filepath and line number.

Previous error message:
Failed to parse template test/example.erb: undefined method `[]' for
nil:NilClass at /tmp/module/test/manifests/init.pp:2 on node example

New error message:
Failed to parse template test/example.erb:
  Filepath: /tmp/module/test/templates/example.erb
  Line: 10
  Detail: undefined method `[]' for nil:NilClass
 at /tmp/module/test/manifests/init.pp:2 on node example
(#13341) Add wrapped exceptions

Puppet::Error can now take an original exception as an argument. It had some
functionality for reporting errors in parsed files which I didn't think
belonged in our base error class. I moved it out into a module and created
ParserError and ResourceError for the cases that use it.
(#13341) Log nested exceptions
Merge pull request #741 from pcarlisle/ticket/master/13341-nested-exceptions

(#13341) nested exceptions
(#14391) Fix inaccurate message from Hiera data lookups

When the Hiera gem is missing the error message now reads:

"Hiera terminus not supported without hiera library"
Merge pull request #752 from kelseyhightower/master

(#14391) Fix inaccurate message from Hiera data lookups
Significantly improve compilation performance when using modules

When autoloading classes/defines, the typeloader constructs a set of
possible locations for the class, based on its name. Effectively, it
will look in the canonical locations corresponding to each namespace in
the fully-qualified name. So for each namespace, it will ask the
environment for a Puppet::Module instance for that module, to ask it
which of the module's potentially manifests match the class it's looking
for. To answer that request, the environment instantiates a
Puppet::Module.

This amounts to potentially thousands of Puppet::Module instances being
created, because it does this many times (based on nesting of the class
name) per include/autoload/import. When Puppet::Module instances are
created, they parse and load their metadata.json file, in part to
validate their use. This implies that each compilation results in
metadata.json being parsed thousands of times, which is extremely slow
(and obviously provides no actual benefit).

Fortunately, the environment object already keeps a list of
Puppet::Module instances for every module in its modulepath. The fix
applied here is simply to change the environment such that it provides
modules by looking them up in its cached list, resulting in up to an
order of magnitude improvement in compilation time.
maint: use relative paths to fixtures.

We used to return absolute paths to fixtures, rather than relative paths.

This made the test output uglier than it needed to be; we may as well do the
extra work to make them relative.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#10146) `-` is not legal in variable names.

When a bunch of refactoring went on to clean up the grammer and lexer, the `-`
character became a legal character in variable names.  This was not entirely
desired - and contravenes our existing rules for naming.

This adds testing for legal variable names, then applies that across the lexer
to ensure that legal names pass, and illegal names fail.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#14200) Telly -> 2.7.x backward compatibility for app/face class names

This is basically just a tweak of
ce1e5555a847163e6448d1442a6d626957dac798, which was mostly
some cleanup and fixes for the help face.  However, that commit
also (intentionally) broke backward compatibility for application class
names;

In 2.7.x, underscores in file names for puppet applications are expected
to translate to underscores in the class name.  So, e.g., the
application defined in "resource_type.rb" is expected to have a class
name of "Resource_type".

However, that doesn't really match up with "standard" ruby or the
expectations of ruby developers.  They expect for "resource_type.rb"
to translate to "ResourceType".  The original commit introduced that,
but did not provide backward compatibility support for the "_" class
naming.

This commit does everything that the original one did, but includes
some hacks for backward compatibility with the underscore pattern.
Fix broken man page rake task

The mass static man page generator was broken! Something changed in commit
82e5fa9561e2d4cb1d699a41c14f50953d8f2d97 which broke the way we were passing
render_as to the man action; while that bears further investigation, we were
able to get the task working again by simply removing it, since the value we
were passing to option turned out to be redundant when using the action from
the API.

We also found that I had unwisely called the argument of the save action for
indirector faces "<object>", which Ronn confuses for an HTML tag of the same
name and then barfs on. This commit fixes that, too.
Remove deprecated standalone executables

This removes the standalone filebucket, pi, puppetdoc, and ralsh commands.
Fix loading of constant_inflector

This fixes an undefined module error when loading constant_inflector
Remove the standalone puppet executables in sbin

These have all been deprecated for at least one major release.
The commands are puppetca, puppetd, puppetmasterd, puppetqd, puppetrun.
Merge pull request #758 from nfagerlund/maint/2.7.x/fix_man_pages

Fix broken man page rake task
Merge pull request #757 from daniel-pittman/bug/2.7.x/10146-don't-allow-dash-in-variables

Bug/2.7.x/10146 don't allow dash in variables
Whitespace and logic cleanups for command line tests.

There are no functional changes, just cleanups, in this change.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#14322) Make `--version` or `-V` options work globally.

The `puppet --version` invocation was broken, and only `puppet $app`
invocations of it worked.  This is undesirable - displaying the version is
very much a global activity, and this reflects that by handling it specially
in the command line parsing.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Remove manpages for legacy executables that are gone