HomePhorge

(PUP-1597) Handle containment of relative names
90f5c314cb10Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-1597) Handle containment of relative names

The contain() function made an error when dealing with a relative name.
It assumed that the class that was actually included was always the same
as the name that it was given. In many cases this is true, but when the
name is found via a relative lookup (e.g. contain(bar) inside a class
foo, when a foo::bar exists), the assumption breaks down. The source of
the problem is that it tries to look up the included class after the
fact. Without all of the extra information about namespaces it isn't
able to find the right class.

To fix this, the include() function has been updated to return the
class resources that it included (including those that were already
present). This allows the contain() function to create the appriate
edges with the exact resources needed.

A secondary change in this was to remove the checks for include not
being able to include a class. The compiler method that is involved
already makes that check and raises an error, so the include functions
code was simply redundant.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU748564d0ff94: (PUP-1597) Fix contain functions lookup of class with leading ::
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU90f5c314cb10: (PUP-1597) Handle containment of relative names (authored by Andrew Parker <andy@puppetlabs.com>).May 9 2014, 10:57 PM