Repository navigation
Spread keyword args to support Ruby 3 - #85
Conversation
|
|
|
The test failure (2.7, 5.2) appears to be a flake, but I can't see a way to re-run the check. I can reproduce the flake with the specified seed (it passes with other seeds), but I can't trace the cause 😦 |
|
Hi @ball-hayden! We're using https://github.com/ruby/setup-ruby instead of https://github.com/actions/setup-ruby as it supports more versions (including Ruby 3.0), so it should be fine! Can you try adding the version? |
| ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7] | ||
| activemodel: [3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0] | ||
| activemodel: [3.2, 4.0, 4.1, 4.2, 5.0, 5.1, 5.2, 6.0, 6.1] | ||
| include: |
There was a problem hiding this comment.
I've chosen include here rather than explicitly excluding ActiveModel 3.2 - 5.2 for Ruby 3.0
| gem 'activemodel', active_model_opts | ||
|
|
||
| platforms :rbx do | ||
| gem 'rubysl', '~> 2.0' |
There was a problem hiding this comment.
Looking through history, it looks like this was added to test against Rubinius at some stage in the past?
|
@mrcasals Thanks for your review. That's Ruby 3.0 running in CI, and a good job too - it caught a few other places 🙂. All updated now. |
|
@mrcasals would you be able to take another look at this, please? |
|
It would be great to see that patch merged and a new release of the gem. I'm running it on production, no issues so far. 👍🏻 |
|
Hi @ball-hayden I'm seeing some CI errors 😞 any idea what's going on? |
|
The error there looks to be an intermittent flake - I can reproduce on master by running e.g. I did have a quick look to see if I could trace it, but I didn't get that far. I'd guess there's state that's leaking between tests? |
|
I'll try rerunning the test suite! |
|
Hi there! any news? |
|
I'm afraid I haven't had a look into the test issues. They are reproducible as described above - if you can find what's going on that would help move this PR forwards 🙂 |
|
I'm hopeful #86 will fix the flakes we're seeing in CI. |
|
Hi @ball-hayden! I merged #86, can you rebase this one? 😄 |
Tests are now only run against MRI
|
🎉 |
|
@mrcasals would you mind having another look now this has passed CI? |
|
Thanks, @ball-hayden and sorry for the delay on this! |
|
Any chance of getting a new versioned release with this fix? |
|
Sorry to bump @mrcasals, but is there any chance of a release please? |
|
@mrcasals bump for interest |
|
@dwightwatson @ball-hayden @ccdredzik new version just released! Check 0.11.0: https://rubygems.org/gems/date_validator Thanks for your patience! |
✍️ Description
As of Rails 6.1,
ActiveRecord::Errors.addspreads keyword arguments rather than accepting an options hash (https://api.rubyonrails.org/v6.1.0/classes/ActiveModel/Errors.html#method-i-add).In Ruby 3, there is no implicit cast between a last hash argument and explicit keyword arguments, causing argument errors:
✅ QA
Before requesting a review, please make sure that: