Skip to content

Comments

Added support for Ruby 3.0#303

Closed
ollym wants to merge 7 commits intoque-rb:masterfrom
ventrata:ruby3
Closed

Added support for Ruby 3.0#303
ollym wants to merge 7 commits intoque-rb:masterfrom
ventrata:ruby3

Conversation

@ollym
Copy link
Contributor

@ollym ollym commented Jan 21, 2021

No description provided.

@ollym ollym marked this pull request as draft January 21, 2021 14:47
@morgoth
Copy link

morgoth commented Apr 14, 2021

@ollym Will you work on it further? @siegy22 can we have Ruby 3 support?

@siegy22
Copy link
Member

siegy22 commented Apr 15, 2021

@morgoth I've worked on it for a little bit.. There's a huge problem: Especially with compatibility for ruby 3 with existing jobs.
The job args are stored as [arg1, arg2, { kwarg1: foo, kwarg2: bar }] and then passed to the run method using *. This won't work in ruby 3 anymore because the kwargs aren't passed as actual kwargs but rather as a positional argument..

So my attempt was to split things up into args and kwargs in the jobs table, but this requires a lot of changes to still work and backwards compatibility is pretty much impossible for existing jobs in the database.. 😢

@ollym
Copy link
Contributor Author

ollym commented Apr 15, 2021

@morgoth @seigy22 I had come to the same conclusions which is why i stopped 😂

Ruby 3 support will introduce breaking changes and a schema upgrade to the table so also a que major version change. Way more work than i first thought and also given i'm not really up to speed with the internals, i didn't feel comfortable doing it.

@nearapogee
Copy link

nearapogee commented Apr 15, 2021 via email

@siegy22
Copy link
Member

siegy22 commented Apr 22, 2021

@nearapogee https://github.com/que-rb/que/blob/master/lib/que/migrations/4/up.sql#L11-L12 In 1.x it's already JSONB as far as I can tell. 😄

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

Successfully merging this pull request may close these issues.

4 participants