-
Notifications
You must be signed in to change notification settings - Fork 86
Minimum Ruby version is incompatible with current code #301
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
I updated this to better reflect reality. I’m not sure what the implications of updating the minimum version would be. I can prep a PR to fix all the errors with Ruby 2.3.0, but it involves specifying a bunch of additional dependencies with version information. It will eventually break as dependencies stop supporting 2.3.0, which will require additional constraints to be added, but that’s unavoidable with any Ruby version (perhaps unless Gemfile.lock gets added, though I don’t think that’s supported by bundler with Ruby 2.3.0). |
To give you an idea of the number of dependencies that need to be modified: main...danielparks:puppet-strings:fix_ruby_2.3.0 I only made very minimal effort to specify them in the correct section; it’s not ready to be a PR. |
In 08936f9 ("(MAINT) Rubocop: Fix Performance/RegexpMatch"), a few Regexp matches were switched from `=~` to `.match?`. Unfortuantely, `.match?` [wasn’t introduced until Ruby 2.4.6][match?], so that broke Ruby 2.3.0 compatibility. This reverts that commit and disables the relevant rubocop check. [match?]: https://apidock.com/ruby/String/match%3F
In 08936f9 ("(MAINT) Rubocop: Fix Performance/RegexpMatch"), a few Regexp matches were switched from `=~` to `.match?`. Unfortuantely, `.match?` [wasn’t introduced until Ruby 2.4.6][match?], so that broke Ruby 2.3.0 compatibility. This reverts that commit and disables the relevant rubocop check. [match?]: https://apidock.com/ruby/String/match%3F
@danielparks I think it's reasonable to bump the minimum version. I'll discuss internally too just incase anyone can see an issue with it. |
Cool! That seems a lot cleaner to me, but I since Puppet comes packaged with Ruby there might be implications I haven’t thought of. |
Yeah agree. I just had a quick chat with @david22swan about this. It looks like 2.5 is the current minimum version so it would be nice to align here. I can test this out shortly. |
Tested with This appears to work so think this might be a nice compromise given that it brings it inline with the rest of the ecosystem. |
Does that mean that the minimum Puppet version should be bumped to 7? |
Previously, the minimum Ruby version was 2.3.0, but it was dificult to get it working and some of the code had been updated to use features as new as 2.4.6. This clears out code that checked for old Ruby versions, and removes some version constraints in Gemfile that were needed to work with Ruby 2.3.0.
PR #313. Hopefully we weren’t both working on this; feel free to delete, etc. |
It does slightly overlap. I am currently battling with some rubocop/spec issues that have occurred. I will merge your changes and integrate in to my branch. Thanks! With regards to the puppet version. I think it's OK to leave at 6 for now. |
(#301) Update minimum Ruby version to 2.5.0
Your changes are now in my branch |
Hurrah! |
Describe the Bug
puppet-strings.gemspec reports that the minimum version of Ruby supported is 2.3.0, but there is unsupported code (
match?
) since at least 08936f9.There are also a bunch of unsupported dependency problems, but that can be solved with the brute force addition of a lot of version constraints.
Switching to ruby 2.6.0p0 makes the code work fine without problems.
Expected Behavior
You should be able to install dependencies and run unit tests with the minimum ruby version.
Steps to Reproduce
Steps to reproduce the behavior:
rbenv install 2.3.0 && rbenv local 2.3.0
gem install bundler:1.13.7
(later versions may work)bundle install --path .bundle/gems
(this will fail)bundle install --path .bundle/gems
bundle exec rake spec
Environment
The text was updated successfully, but these errors were encountered: