HomePhorge

(PUP-2176) Propagate non-autoloaded function to loader
c241f42c4569Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2176) Propagate non-autoloaded function to loader

This makes it possible to write functions in site.pp, or directly
in apply -e. When encountered, the PopsBridge will define them in
the appropriate loader.

A new SimpleEnvironmentLoader was introduced (it is basically a loader
that does not find anything, but can be given entries from an external
source). The functionality to instantiate from a model was added to the
PuppetFunctionInstantiator. The ability to produce a URI with the source
location was added to SourcePosAdapter.

The compiler initialization sequence is altered in this commit because
the very early loading and parsing of site.pp (or equivalent), and the
compilers context overrides (environment, injector, global_scope, etc)
was done too late. Now, the overrides are constructed once, but used
twice (in the initvars method, and in the compile method).

Details

Event Timeline

Henrik Lindberg <henrik.lindberg@cloudsmith.com> committed rPUc241f42c4569: (PUP-2176) Propagate non-autoloaded function to loader (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Apr 17 2014, 1:14 AM