HomePhorge

Removing Resource::Reference classes
7089446697adUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Removing Resource::Reference classes

This commit is hopefully less messy than it
first appears, but it's certainly cross-cutting.

The reason for all of this is that we previously only
looked up builtin resource types from outside the parser,
but now that the defined resource types are available globally
via environments, we can push that lookup code to Resource.

Once we do that, however, we have to have environment and
namespace information in every resource.

Here I remove the Resource::Reference classes (except
the AST class), and use Resource instances instead. I
did this because the shared code between the two classes
got incredibly complicated, such that they should have had
a hierarchical relationship disallowed by their constants.
This complexity convinced me just to get rid of References
entirely.

I also make Puppet::Parser::Resource a subclass
of Puppet::Resource.

There are still broken tests in test/, but this was a big
enough commit I wanted to get it in.

Signed-off-by: Luke Kanies <luke@reductivelabs.com>

Details

Provenance
Luke Kanies <luke@reductivelabs.com>Authored on
test branch <puppet-dev@googlegroups.com>Committed on Feb 17 2010, 3:50 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU4871c909cd28: Adding support for class parameters
Branches
Unknown
Tags
Unknown

Event Timeline

test branch <puppet-dev@googlegroups.com> committed rPU7089446697ad: Removing Resource::Reference classes (authored by Luke Kanies <luke@reductivelabs.com>).Feb 17 2010, 3:50 PM