-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upgrade to Ruby 3.3.0 and Implement GA Ruby Version Matrix Testing #148
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks for creating this PR! In the future, can you open up an issue first? Thanks 🙂
decanter (4.0.4) | ||
actionpack (>= 4.2.10) | ||
decanter (5.0.0) | ||
actionpack (>= 7.1.3.2) |
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.
Does this change essentially restrict the usage of Decanter v5 to apps with Rails 7 and above?
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ["3.2.0", "3.2.2", "3.3.0"] |
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.
Is there a way to specify "all patch versions greater than 3.2.0"? Or better yet, "all latest stable releases greater than X"? Or will we need to update this as and when new releases have come out?
strategy: | ||
fail-fast: false | ||
matrix: | ||
ruby: ["3.2.0", "3.2.2", "3.3.0"] |
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.
raise(ArgumentError, "#{name}: Unknown log_unhandled_keys value #{mode}") unless [true, | ||
false].include? mode |
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.
handlers.keys.flatten.uniq - | ||
keys_to_ignore - | ||
handlers.values | ||
.select { |handler| handler[:type] != :input } | ||
.map { |handler| "#{handler[:name]}_attributes".to_sym } |
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.
Are these changes required in the move from Ruby 2 -> 3?
|
||
This version contains major updates including the upgrade to Ruby version 3.3.0. Ensure your environment is compatible with this Ruby version before proceeding. | ||
|
||
## Major Changes |
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.
Does this also need to include Rails 7? Or am I misunderstanding the consequences of the actionpack upgrade?
|
||
## Major Changes | ||
|
||
1. **Ruby Version Update**: Decanter now requires Ruby 3.3.0. This update brings several language improvements and performance enhancements. You must ensure that your environment is running Ruby 3.3.0 or higher. Update your Ruby version using your Ruby version manager (e.g., RVM, rbenv): |
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.
Do you have a link to the summary of improvements & performance enhancements? That'd be nice to include if you've got one handy!
2. **Deprecated Features**: Review any deprecated Ruby methods or features that may affect your project and adjust accordingly. Refer to the [official Ruby 3.3.0 release notes](https://www.ruby-lang.org/en/news/2023/02/24/ruby-3-3-0-released/) for detailed information on deprecations and changes. | ||
|
||
3. **Testing and Compatibility**: After updating Ruby, run your test suite and check for any deprecations or failures. Update your gemfile to specify the Ruby version: |
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.
TBH I don't think we need to separate these out into different steps. They're all part of upgrading to Ruby. The migration guide is how to migrate Decanter, not Ruby 3.3.0. If there's anything specific to how Decanter is used with the new language updates, that'd be good content for this guide. It's fair to call the steps to upgrade to Ruby 3.3.0 out of the scope of this guide.
## Migration Tips | ||
|
||
- Backup your current project before making significant version changes. | ||
- Test your application thoroughly after the migration. | ||
- Consider using a continuous integration (CI) environment to run your tests against multiple Ruby versions if you support them. | ||
|
||
By following this guide, you should be able to successfully migrate your project to use Decanter v5.0.0 with Ruby 3.3.0. |
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.
Again, feels out of scope of this gem migration guide.
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.
Are these all formatting / linting changes or were there changes that you needed to make that were broken after the upgrade?
Items Addressed
2.6.5
to3.3.0
> 3.2.x
'actionpack', '>= 7.1.3.2'
5.0.0
spec.required_ruby_version = '>= 3.2.0'
to acknowledge backward compatibility limit