Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop Ruby 2.5 or older versions of Ruby
README already mentions that `Ransack is supported for Rails 6.1, 6.0, 5.2 on Ruby 2.6.6 and later.` d508857
- Loading branch information
87a1697
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.
This seems odd, because ransack now depends on rails
>= 5.2.4
which, in turn, depends on ruby>= 2.2.2
, not>= 2.6
.Was there a clear reason for this constraint? I stumbled across this change via a random question on StackOverflow; it's not an issue that affected me personally.
The previous
>= 2.3
constraint had a clear justification, and was introduced when ruby2.2
reached EOL.I think perhaps it was a misunderstanding -- it looks like after this change, the project started testing only against the latest ruby version, rather than all supported versions (I'm not sure why!!), which means the final version of
travis.yml
only mentioned ruby2.6.6
, and so now the re-introduced multi-ruby-version testing only runs up to ruby2.6.6
!!I note also that ruby
2.5
has also reached EOL, but I still see no good reason why this version constraint exists on the gem.87a1697
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.
In addition, the
CONTRIBUTING.md
file still says:87a1697
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.
I don't think that's odd. We do support Rails 5.2, but only on modern rubies.
I think it's a good practice to explicitly drop support for rubies that have reached their EOL, and thus are not getting security fixes.
I admit that it might've been too much to do this support drop on a tiny patch release, but that's already done. Bundler should do the right thing anyways.
The CONTRIBUTING.md file needs to be updated, yes.
87a1697
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.
I consider it the responsibility of individual application maintainers to upgrade their ruby versions, not for third party gem authors to act as "the EOL ruby police" and force everyone to upgrade 😉
Like I said, this isn't actually affecting me personally, I just stumbled across the restriction and found it a bit surprising (especially with no clear justification). My suggestion would be to try running CI on ruby versions
2.3+
, and relax the constraint back to>= 2.3
if the test suite remains green.87a1697
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.
Specifying a minimum ruby has also many benefits for gem authors, making gems easier to test and maintain, and allowing them to take advantage of features in newer rubies.
87a1697
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.
I agree, and if there is any significant inconvenience to continue supporting ruby 2.3-2.5 with this gem then I'd have no quarrels with setting a version constraint as it is now.
But if this gem still works perfectly well with ruby 2.3-2.5, then I disagree that there's a good reason to set this constraint.
87a1697
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.
We're not forcing anyone, people can stay on old rubies as long as they also stay on their current ransack version 😉
87a1697
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.
Keeping code compatible with old rubies is painful, I really support the approach of dropping support for old rubies early, as soon as they reach their EOL, because the support load of open source maintainers is heavy enough already. And I can tell you from experience people understand it (mostly thanks to bundler doing the right thing here).
I admit it was wrong in this particular case to make this happen on a patch level version, but other than that, that's my preferred approach.
87a1697
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.
Anyways, I totally respect and understand other maintainers having different opinions here. This is just the approach that works for me and helps me keeping mental sanity.
87a1697
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.
I totally get where you're coming from. If (!!) there is actually a shred of "pain" in supporting ruby 2.3-2.5 with this gem, then I agree with the decision to set a
>= 2.6
version constraint.However as it stands, I can't see anything in the code that actually warrants this dependency constraint. I think it was added due to a misunderstanding:
.travis.ci
was configured to only run against the latest ruby version (at the time, that was2.6.6
).2.6.6
due to the above.README
was updated to claim only ruby2.6.6+
is supported, which wasn't really true.>= 2.6
due to the misleading README.As far as I can tell, this gem will still work fine with ruby
>= 2.3
.87a1697
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.
I'm not sure whether there was a misunderstanding from either @yahonda or @seanfcarroll, but speaking personally, when I accepted the PR I didn't assume there were any problems with old rubies. I was just starting to help out with maintaining this gem, just like @yahonda, and felt it would be nice to cleanup our support range and limit it to only rubies supported upstream.
87a1697
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.
So, the reason was to make my future life easier, essentially :)
87a1697
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.
I don't think it's standard practice to lock gems to the latest ruby versions, unless there's a clear benefit to doing so.
I respect your decision, but like I say, I think this was primarily done due to a misleading README / misunderstanding.
87a1697
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.
Also, note that it's not that this gem has trouble with keeping support for ruby 2.3, it has trouble with getting maintenance at all! It heavily monkeypatches internals of activerecord making it really hard to keep up to date with new rails releases, and gets really hard to maintain. Any measures intended to make the maintainers life easier have a 👍 from me.
87a1697
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.
I think we've both said our piece now, and we have to agree to disagree :)
87a1697
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.
Actually, some final thoughts. I'm not saying this is standard practice, it's just my opinion. And it's not even something I apply always. As an example, I've been refusing to drop ruby 2.3 support in bundler for almost two years now, against the opinion of other maintainers who (correctly) think it will make our lives easier. But when I start helping out in a semi-abandoned gem, I'm always positive towards dropping support for old versions of dependencies, trying to make things easier for maintainers and hopefully preventing the gem from getting semi-abandoned again.
87a1697
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.
@deivid-rodriguez I completely agree with this, and in fact we need to look to supporting the changes in Ruby 3
This is the position on the README
87a1697
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.
@tom-lord thank you for your contribution here. Ransack may work on 2.3, but it won't be supported.
What does supported mean? A bug won't be considered if it happens on an older version of Ruby only. The project is really on life-support as it is, and needs a significant effort to clear out the backlog of issues and even add some new features, like Full text search.
Does that make sense?
87a1697
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.
@tom-lord A PR to correct this would be welcome. Sorry for the misleading text.
87a1697
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.
@yahonda already added 3.0.0 to our CI matrix and everything should be fine :)
87a1697
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.
The problem for me is not dropping the support to Ruby 2.5, but to have it in a patch version: https://github.com/activerecord-hackery/ransack/blob/v2.4.2/CHANGELOG.md
If I gem rely on ransack and it doesn't want to drop the support to Ruby 2.5 (because Ruby 2.5 is still supported by Rails 6.1), it's not possible to get security fixes and maintain the support to Ruby 2.5.
At least I expect it to happen in a minor version.
87a1697
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.
If you read the conversation, I already said twice that I believe it was a mistake to drop support on a patch release.
87a1697
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.
@deivid-rodriguez Sorry, I read the conversation, but I missed that.
So for now, is there any solution for that? A re-tagging maybe? Reintroduce the support in the next patch version and bump to a minor version instead?
Or nothing at all? I see the problem of possible future security fixes, but if you are not willing to do anything about that, fine for me.
87a1697
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.
This would be the proper solution, but I don't think any of the maintainers will be handling that. At least I won't.
87a1697
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.
@afdev82 @tom-lord the basic issue here is not about support of Ruby 2.5, but rather that Ransack receives very few PRs for it's large backlog of issues and needs a lot of support.
The efforts from @deivid-rodriguez, @gregmolnar and myself mean this project is just alive. The code is in terrible shape and need a big rewrite as well as improvements in the documentation and tests. The idea of supporting older Ruby versions is unfortunately a luxury, if we had a more active community this would of course change.