(MODULES-3393) Deprecation - Use puppet stacktrace if available#693
(MODULES-3393) Deprecation - Use puppet stacktrace if available#693DavidS merged 2 commits intopuppetlabs:masterfrom
Conversation
|
A previous PR (#685) was raised on this issue, however once it was merged it was discovered that Puppet 3 with future parser enabled was calling the Puppet 4 version of the deprecation function. The Puppet stacktrace is not available until Puppet 4.6, so this was breaking existing setups. The solution was to check is the stacktrace was defined, and if it was to use it as part of the message output. |
|
Please put the info into the commit message, so it is also available offline. |
| line = stacktrace[1] | ||
| output_message = "#{message} at #{file}:#{line}" | ||
| else | ||
| output_message = message |
There was a problem hiding this comment.
Don't you need to use output_message in the failure msg and deprecation warning msg below?
There was a problem hiding this comment.
true. as I said on the original PR, re-using the message var would obviate the need to modify the code below, and - in this case - also remove the need fo the else.
5ca7207 to
be54a4f
Compare
A previous PR (puppetlabs#685) was raised on this issue, however once it was merged it was discovered that Puppet 3 with future parser enabled was calling the Puppet 4 version of the deprecation function. The Puppet stacktrace is not available until Puppet 4.6, so this was breaking existing setups. The solution was to check is the stacktrace was defined, and if it was to use it as part of the message output.
be54a4f to
746c1f8
Compare
DavidS
left a comment
There was a problem hiding this comment.
As discussed offline, this needs more work.
7295423 to
75e59d3
Compare
75e59d3 to
e501cb1
Compare
No description provided.