Issue #14101 has been updated by Andrew Parker.
The message that was merged in will read:
Dynamic lookup of $var2 is deprecated. For more information, see
http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the change in
behavior, use the --debug flag.
And under debug you'll additionally see:
Currently $var2 is #{dynamic_value.inspect}
In the future $var2 will be #{topscope_value.inspect}
If the twoscope lookup finds no value it will instead say:
In the future $var2 will be undefined
----------------------------------------
Feature #14101: Improve dynamic scope deprecation warning
https://projects.puppetlabs.com/issues/14101#change-61083
Author: Andrew Parker
Status: Merged - Pending Release
Priority: Normal
Assignee:
Category: usability
Target version: 2.7.14
Affected Puppet version:
Keywords:
Branch: https://github.com/puppetlabs/puppet/pull/696
The deprecation warning for dynamic scope currently reads:
Dynamic lookup of $#{name}#{location} is deprecated. Support will be removed
in a later version of Puppet. Use a fully-qualified variable name (e.g.,
$classname::variable) or parameterized classes.
Where `location` is
location = (options[:file] && options[:line]) ? " at
#{options[:file]}:#{options[:line]}" : ''
This doesn't provide enough information in order to understand what the
difference actually is. Ideally we could say exactly where the values that were
found came from, but the scope doesn't keep track of that kind of information.
A good substitute would be to provide the different values that were found.
The new deprecation warning could read:
Dynamic lookup of $#{name}#{location} is deprecated. Support will be removed
in a later version of Puppet. Use a fully-qualified variable name (e.g.,
$classname::variable) or parameterized classes. Dynamic: #{dynamic_value} /
Twoscope: #{twoscope_value}
--
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.