Issue #10539 has been updated by Daniel Pittman.

Subject changed from require metaparameter default does not raise an error to 
Referencing a class does not validate until it is consume in a `require` like 
metaparameter
Description updated
Category set to language
Status changed from Unreviewed to Needs Decision
Assignee set to Randall Hansen

Randall, this is assigned to you because the key priority decision is around 
the UX failure here, I think.  Can you work out what priority this has, and 
what it targets, please?
----------------------------------------
Bug #10539: Referencing a class does not validate until it is consume in a 
`require` like metaparameter
https://projects.puppetlabs.com/issues/10539

Author: John Eikenberry
Status: Needs Decision
Priority: Normal
Assignee: Randall Hansen
Category: language
Target version: 
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.

Reply via email to