Issue #10539 has been updated by Matthaus Litteken. Target version changed from 2.7.11 to 2.7.x
---------------------------------------- Bug #10539: Referencing a class does not validate until it is consume in a `require` like metaparameter https://projects.puppetlabs.com/issues/10539#change-61898 Author: John Eikenberry Status: Accepted Priority: High Assignee: Daniel Pittman Category: language Target version: 2.7.x Affected Puppet version: 2.7.6 Keywords: Branch: >From the original report: > I had a typo in my require default line which didn't raise any sort of error > until I added to a specific resource. > That is I had `$require = Class["apps::postgres::multi"]` when there was no > such class (the class was named `apps::postgresql::multi`) and this did not > raise an error. > > I found the typo when I had an ordering issue and tried adding the `require > => Class["apps::postgres::multi"]` to a specific resource and this generated > the error "err: Failed to apply catalog: Could not find dependency Class ...". > > It should generate the 'could not find dependency' error for the default. I have verified this: assigning a reference to a type does absolutely not validation in Puppet 2.7, including when the content is consumed in some cases: $foo = Class["foo"] $bar = Banana["bar"] # note: no such type! notice("hello, $foo, from your little $bar") Instead, the referenced type and entity should be validated during compilation, so that a clear error occurs when you reference a non-existent anything - not just when that value would be consumed in a way that dereferences the dependency. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
