Closed valerauko closed 2 years ago
Great callout! Thank you!
Our focus for this gem has been to shift it towards using ActiveJob as the primary end-developer API, and ActiveJob performables already fully support Ruby 3.0 kwargs.
That said, we have not removed or reworked the existing Delayed::MessageSending
APIs. Therefore, we should consider these APIs fully supported (at least, as long as we don't officially say they aren't), and so it would only make sense to fix these Ruby 3 compatibility issues. I put together a proposed code change (#7) to address this.
Longer term, we may choose to extract all of the Delayed::MessageSending
behaviors into an optional gem, or remove them entirely in favor of something else (to be determined - maybe an ActiveJob-based equivalent of .delay
). For now, though, hopefully these Ruby 3.0 fixes will tide us over!
Oh if the ActiveJob (perform_later?) API works with Ruby 3 this issue is moot. .delay
is a pretty dangerous construct so if you say it's not supported I don't think that's an issue.
Ruby 3 changed the way it handles keyword arguments, and is a roadblock with delayed_job. I checked the relevant bits in the source of this gem (at least the bits that used to be relevant in delayed_job) and didn't see any changes or fixes for Ruby 3 keyword argument handling.
https://github.com/Betterment/delayed/blob/2d296b9f49c24c99b91d8bf78690a20436811bae/lib/delayed/message_sending.rb#L11-L13 https://github.com/Betterment/delayed/blob/2d296b9f49c24c99b91d8bf78690a20436811bae/lib/delayed/performable_method.rb#L25-L27
While the gemspec suggests Ruby 3 should work, does it really?