Skip to content

(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

Merged
merged 5 commits into from
Mar 27, 2018

Conversation

pmcmaw
Copy link
Contributor

@pmcmaw pmcmaw commented Mar 22, 2018

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.

  1. flatten
  2. empty
  3. join
  4. keys
  5. values
  6. length

@pmcmaw pmcmaw force-pushed the puppet_550_corrections branch 11 times, most recently from 968480c to fbe25ce Compare March 22, 2018 14:40
@pmcmaw pmcmaw changed the title (MODULES-6894) - Puppet 5.5.0 function deprecation WIP - (MODULES-6894) - Puppet 5.5.0 function deprecation Mar 22, 2018
@pmcmaw pmcmaw force-pushed the puppet_550_corrections branch from 7823ec5 to e9a31e0 Compare March 22, 2018 15:16
Copy link
Contributor

@jbondpdx jbondpdx left a 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"

@pmcmaw pmcmaw force-pushed the puppet_550_corrections branch 3 times, most recently from 93b2b95 to 3e19e09 Compare March 22, 2018 17:39
@pmcmaw
Copy link
Contributor Author

pmcmaw commented Mar 22, 2018

Thanks @jbondpdx I have made these changes. 👍

@pmcmaw pmcmaw force-pushed the puppet_550_corrections branch from 981439f to a376238 Compare March 23, 2018 14:52
@pmcmaw pmcmaw force-pushed the puppet_550_corrections branch from 8da322f to 331118f Compare March 23, 2018 16:54
@@ -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.')
Copy link
Contributor

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).**
Copy link
Contributor

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.

hunner added 2 commits March 26, 2018 15:41
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.
@hunner hunner force-pushed the puppet_550_corrections branch from 6394b3f to 67c1c2b Compare March 26, 2018 22:43
@pmcmaw pmcmaw changed the title WIP - (MODULES-6894) - Puppet 5.5.0 function deprecation (MODULES-6894) - Puppet 5.5.0 function deprecation Mar 27, 2018
@HelenCampbell HelenCampbell merged commit 6f846d2 into puppetlabs:master Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants