Skip to content
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

Ruby 3.1 syntax has been introduced #616

Closed
cmparkinson opened this issue Nov 27, 2023 · 5 comments
Closed

Ruby 3.1 syntax has been introduced #616

cmparkinson opened this issue Nov 27, 2023 · 5 comments

Comments

@cmparkinson
Copy link

👻 Brief Description

PR #610 introduced hash literal value omission, which is a Ruby >= 3.1 syntax change and has broken the gem for all earlier Ruby versions. The gemspec still specifies Ruby >= 2.7, which no longer holds true. If this change was intended, it should probably have come with a major version bump to adhere to semver.

Version

3.17.1

Steps to Reproduce

Use the gem in a ruby version prior to 3.1.

Expected Result

The gem should work.

Actual Result

SyntaxError is raised.

@cmparkinson
Copy link
Author

@damacus Was the TargetRubyVersion bump here intentional? The autocorrections have broken the gem for earlier Ruby versions.

@damacus
Copy link
Contributor

damacus commented Nov 29, 2023

Hey @cmparkinson, yes it was intentional.

I've followed the current EOL Ruby policy. What version of Ruby are you using and how are you installing it?

@cmparkinson
Copy link
Author

cmparkinson commented Nov 29, 2023

Thanks for the quick response!

The gem is being installed by Bundler. We have a few older automated tests that are still running on Ruby versions < 3.0 (and completely EOL - I don't expect support there), however Ruby 3.0 is still supported and will continue to receive security updates until its expected EOL date of 2024-03-31. https://www.ruby-lang.org/en/downloads/branches/

This isn't a huge problem for me - I can easily pin kitchen-ec2 to 3.17.0 until we've completed our Ruby version upgrades - but if you're open to suggestions, I have a couple:

  1. The minimum required Ruby version in the gemspec should be updated to reflect reality. That will prevent Bundler/RubyGems from trying to install the gem on unsupported Ruby versions.
  2. There should be a major version bump to the gem to protect anyone that has this gem constrained to ~> 3.0; breaking changes shouldn't be introduced as minor or patch versions.

@damacus
Copy link
Contributor

damacus commented Nov 30, 2023

Thanks for spotting the lack of an upgraded version there. I bumped a few libraries over the past week and obviously forgot this one. I'll do another release shortly 👍🏼

@cmparkinson
Copy link
Author

Thanks @damacus! Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants