Age | Commit message (Collapse) | Author | Files | Lines |
|
The loaders previously assumed that any installation of puppet would be
under a directory called lib. This holds true when running puppet from
source (during development), or in some package cases, but is not
generally true. This simplifying assumption was made so that the loading
path for both puppet system extensions (built in functions) and module
extensions could be loaded in the same manner: find the root of the
extender and loading code from `lib/puppet/...`.
This changes to loading to instead only assume that there is a `puppet`
directory and not the name of the parent. This, however, forces the
loader for modules to become specialized to only be able to find ruby
extentions, because they are in the 'lib' directory, which is how the
loader must now be configured.
|
|
This allows an epp body to be empty by making grammar accept an
empty list of statements. This avoids getting a cryptic error message
about "syntax error at end of file" when using parameters, but having no
body that produces output, or when having a completely empty template.
|
|
This changes the evaluation of a LiteralUndef to nil from :undef.
As a consequence, there were minor adjustments needed to the Closure's
call_by_name support to get the correct semantics for "missing"
parameters.
Tests are also added to ensure that :undef does not sneak into arrays or
hashes in the 4x function API.
This commit contains a cheat for epp and inline_epp functions as they
need to receive their arguments without transformation. When that is
fixed (PUP-2845) the cheat in runtime3_support#call_function() should be
removed.
:undef is still used in the "puppet/pops" section of the code (mainly
for reasons of transforming to 3x, and if :undef symbols leak from 3x.)
|
|
This moves the epp function to the new function API.
The type checking is much approved as a consequence as the function
is now protected against spilling non variable name compliant
variables into the scope.
|