-
Notifications
You must be signed in to change notification settings - Fork 582
(MODULES-6894) - Puppet 5.5.0 function deprecation #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(MODULES-6894) - Puppet 5.5.0 function deprecation #896
Conversation
968480c
to
fbe25ce
Compare
7823ec5
to
e9a31e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nit, but in
"an inbuilt empty
function, that will"
change "that" to "which"
93b2b95
to
3e19e09
Compare
Thanks @jbondpdx I have made these changes. 👍 |
981439f
to
a376238
Compare
8da322f
to
331118f
Compare
lib/puppet/functions/length.rb
Outdated
@@ -11,4 +11,5 @@ def length(value) | |||
end | |||
result | |||
end | |||
Puppet.deprecation_warning('The length function is deprecated. This function is now shipped with Puppet in versions 5.5.0 and later. For more information please see Puppet 5.5.0 Release Notes.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These functions should only be deprecated for users using puppet >=5.5.0, not for users running puppet <5.5.0. So it shouldn't print the deprecation warnings on puppet <5.5.0.
Users running >=5.5.0 will not be able to call these functions without specially trying, so I don't think printing a deprecating warning for >=5.5.0 will actually be helpful.
So we probably don't need to print them at all, and thus don't need to test for them.
README.md
Outdated
@@ -1163,6 +1163,8 @@ Converts the case of a string or of all strings in an array to lowercase. | |||
|
|||
#### `empty` | |||
|
|||
**Deprecated. Puppet 5.5.0 has introduced a built in `empty` function, which will take precedence over the stdlib function. See [Puppet 5.5.0 Release Notes](https://puppet.com/docs/puppet/5.5/release_notes.html#new-features).** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions should only be deprecated for users of puppet >=5.5.0, but not for users of puppet <5.5.0. We can remove them from stdlib entirely when we drop compatibility for puppet <6.0.0 from stdlib in 2050 or whatever :P.
Sometimes the word "deprecated" was all caps, sometimes just capitalized. Sometimes followed by a period, sometimes a colon. Sometimes just the word was bold, sometimes the whole line. Updated to be capitalized, colonized, and only bolding the word.
The dig() deprecation message is clear and applies to these functions as well. Also linked to the documentation instead of the release notes.
6394b3f
to
67c1c2b
Compare
https://puppet.com/docs/puppet/5.5/release_notes.html#new-features
The following functions have been implemented in puppet 5.5.0. As these functions in puppet take precedence over stdlib functions. We are deprecating these functions and addressing additional failures introduced with the release.
flatten
empty
join
keys
values
length