HomePhorge

(PUP-2344) Fix issue with inter-module calls (visibility error)
625d14e9c5a0Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-2344) Fix issue with inter-module calls (visibility error)

This fixes the problem where inter-module function calls could
not be made. The main problem was that a function when loaded
was given the public loader and thus had no visibility into its
containing module's dependencies.

The design is that module resolution should be on-demand, only
when something actually needs the proviate loader should it be resolved.
The resolution is triggered by asking for the private loader, but no
such call was made on the call-path when a function was loaded.

This commit adds the notion of private_loader to the loaders (those that
do not have one respond with self). Those that do either provide the
private loader explicitly (environment loader), or on demand (by
obtaining the private loader from loaders).

This change required tests to be modified since the logic now depends
on :loaders being bound in the Puppet context
logic that made this happen on demand was not implemented

Details

Provenance
Henrik Lindberg <henrik.lindberg@cloudsmith.com>Authored on
Andrew Parker <andy@puppetlabs.com>Committed on Apr 26 2014, 2:56 AM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUda4ecf4f5a2e: Merge branch 'pr/2584'
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU625d14e9c5a0: (PUP-2344) Fix issue with inter-module calls (visibility error) (authored by Henrik Lindberg <henrik.lindberg@cloudsmith.com>).Apr 26 2014, 2:56 AM