type function is reserved word in puppet 3.7
hdeadman opened this issue · comments
I am trying out puppet 3.7 and it doesn't like this module's use of the "type" function. It's a reserved word (reserved for future use) in 3.7 and it looks like they added an "assert_type" function. (I am using the future parser and I was using the "current" evaluator but they got rid of that option so I am seeing what that broke.) I looked for references to type function in the old documentation but I didn't see any. I assume it is using the function defined in the stdlib. Is there a way to fully qualify the function call?
https://docs.puppetlabs.com/puppet/latest/reference/lang_reserved.html
https://docs.puppetlabs.com/references/latest/function.html#asserttype
==> mail: Error: Illegal expression. A Reserved Word 'type' is unacceptable as f
unction name in a Function Call at /etc/puppet/modules/hosts/manifests/init.pp:2
3:23
==> mail: Error: Use of reserved word: type, must be quoted if intended to be a
String value at /etc/puppet/modules/hosts/manifests/init.pp:23:23
==> mail: Error: Illegal expression. A Reserved Word 'type' is unacceptable as f
unction name in a Function Call at /etc/puppet/modules/hosts/manifests/init.pp:3
1:33
==> mail: Error: Use of reserved word: type, must be quoted if intended to be a
String value at /etc/puppet/modules/hosts/manifests/init.pp:31:33
FYI, This error still happens for me in Puppet 3.7.1. This seems to be the only module I am using that has this problem.
Do you have stdlib in your modulepath? What version?
We are using this https://github.com/puppetlabs/puppetlabs-stdlib#type
I'm not at my desk but I think I have the latest stdlib (4.3.1? or 4.3.2) in my path. It's seems odd to me that this isn't a bigger problem if a stdlib function name is now a reserved word. There must be something different about my setup if this is working for you in 3.7.x.
Hmm.. type() is definitely supported by Puppet Labs. Do you mind opening a ticket with them and pasting it here for anyone to follow?
OK, I created a ticket: https://tickets.puppetlabs.com/browse/PUP-3358