Separation of positional and keyword arguments in Ruby 3.0

Hello,

in Ruby 3.0, positional arguments and keyword arguments will be separated. Ruby 2.7 will warn for behaviors that will change in Ruby 3.0. For more info head over to the Ruby blog.

We expect some of changes to be made, not necessary in our own (Foreman) codebase but rather in dependencies. There are concerns that we might run into issues, particularly for dependencies which are not longer maintained. It can take a little time until we send patches, get them reviewed and released or in the worst cases fork and fix those libraries. This is an attempt to start tracking this attempt in advance (before Ruby 3.0 releases this year).

If you spot a warning that is not covered here, please add it. Ideally, go and fix it. The original list was gathered from running Foreman core tests, there are definitely some code paths not covered and also Foreman plugins.

I was hoping that Rubocop, or some other code analysis too, would help us to fix or at least identify those places. It looks like there was an attempt for Rubocop, but the cop was removed because it was causing too many false positives.

Copoment Version Comments
Foreman Develop About a dozen of occurances
Ruby on Rails 6.0
GraphQL 1.8.18
AsDeprecationTracker 1.5.0
ScopedSearch 4.1.9
2 Likes

Thanks for this. Note that we should have CI enabled for Ruby 2.7, but I’m not sure everyone checks it that closely. If you maintain a plugin (or anything), please check it. Ruby 2.7 should be in your CI matrix and it shouldn’t print any deprecations.

If we split up the effort so everyone at least checks their own code, it will be easier.

1 Like

I am looking into GraphQL, looks like most of the warnings are gone for the master branch if I run its tests. There is one or two leftovers which I will send a PR for. I assume bumping version for any of our deps should not be any problem.

Just for the record, some other priorities came up and I am cleaning my opened tabs. Feel free to start working on these :slight_smile: