HomePhorge

[#4496]+[#4521]+[#4522] Add structures to the AST to represent type…
4da88fb4cd57Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

[#4496]+[#4521]+[#4522] Add structures to the AST to represent type definitions (classes, definitions, and nodes).

Previously, type definitions were not represented directly in the AST.
Instead, the parser would instantiate types and insert them into
known_resource_types as soon as they were parsed. This made it
difficult to distinguish which types had come from the file that was
just parsed and which types had been loaded previously, which led to
bug 4496.

A side-effect of this change is that the user is no longer allowed to
define types inside of conditional constructs (such as if/else). This
was allowed before but had unexpected semantics (bugs 4521 and 4522).

It is still possible, however, to place an "include" statement inside
a conditional construct, and have that "include" statement trigger the
autoloading of a file that instantiates types.

Details

Provenance
Paul Berry <paul@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUcaca187dffbd: Moved perform_initial_import from Puppet::Resource::TypeCollection to Puppet…
Branches
Unknown
Tags
Unknown

Event Timeline

Paul Berry <paul@puppetlabs.com> committed rPU4da88fb4cd57: [#4496]+[#4521]+[#4522] Add structures to the AST to represent type… (authored by Paul Berry <paul@puppetlabs.com>).Aug 14 2010, 12:54 AM