-
Notifications
You must be signed in to change notification settings - Fork 583
Deprecated Ruby 3.2 method exists? is still used #1354
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
Comments
Hey @smoeding, we have investigated this issue and the possibility of |
I believe this issue can be closed. However, if you do experience any failures related to this, feel free to reopen it with additional information about the issue. |
@LukasAud I think that's not quite true. The example you linked implements a Puppet API, but the real problems are here:
They're disabled in RuboCop but I'm very certain that (as @smoeding reported) will break on Ruby 3.2. It may appear to work because in the tests the methods are mocked. |
@ekohl My conclusion came as a result of the failure messages I noticed while attempting to implement changes similar to the ones in #1357. The entire logic of the classes that were being 'fixed' started to fail on me and thus, I figured out it probably had something to do with the defined API method. Perhaps my conclusion and/or approach was wrong but I assumed the code was working (despite the usage of Again, I might have taken the wrong approach so I will re-investigate this issue a bit later. |
#1357 should address this issue. As for the Puppet side, https://github.com/puppetlabs/puppet/blob/ad7d75b08dfff5e308fde199407d84308d74e538/lib/puppet/property/ensure.rb#L82-L85 is the relevant bit where it changes behavior if a provider implements |
Describe the Bug
Ruby 3.2 (used by Puppet-Agent 8) has removed the deprecated methods
{File,Dir}.exists?
: https://github.com/puppetlabs/puppet/wiki/Puppet-8-CompatibilityCurrently
File.exists?
is still used by three parser functions:loadyaml
,loadjson
andload_module_metadata
.Using one of these functions with Puppet 8 will probably not work as expected.
Expected Behavior
The functions should work when Puppet 8 is installed.
Environment
The text was updated successfully, but these errors were encountered: