-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Relax dry-types dependency version #1948
Conversation
Generated by 🚫 danger |
d752663
to
fc3e3e3
Compare
grape.gemspec
Outdated
@@ -22,7 +22,7 @@ Gem::Specification.new do |s| | |||
|
|||
s.add_runtime_dependency 'activesupport' | |||
s.add_runtime_dependency 'builder' | |||
s.add_runtime_dependency 'dry-types', '~> 1.1.1' | |||
s.add_runtime_dependency 'dry-types', '~> 1.1' |
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.
Do we need to lock it at all? I think unless there's a specific reason that version x.y.z doesn't work we should leave this blank.
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 there were cases with dry-types when it has some incompatibility issues between versions, at least it was like this before 1.0 release. As for now it must be stable enough. But if somebody has an old version - Grape just wouldn't work for it.
I tested this branch now with dry-types 1.0.0 and 3 specs failed. The same is for 1.0.1. But everything is OK starting from 1.1.0. So I think it makes sense to start from the version where everything works (or fix the code to support older versions)
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.
Should this be >= 1.1 then?
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.
Only if we don't afraid of breaking changes in future 2.0 version. If not - I'll change :)
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.
Not afraid, let's make it >= 1.1
, again I generally am of the opinion we should only be restricting for known issues. In this case you've identified that < 1.1 doesn't work, so it makes perfect sense. But we don't need to be afraid of future incompatibility and I would rather find sooner than later by a breaking build.
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.
Makes sense for me 👍
Done
b4dc442
to
3a57848
Compare
From the PR discussion: #1920 (comment)
Ruby 2.7.0 was released December 25, 2019, and has some noisy deprecation messages about keyword arguments.
Thanks to PR #1920 we migrated from Virtus to dry-types, but set too strict version for it -
~> 1.1.1
, so new versions of the dry-types gem couldn't be used with Grape (like current 1.2.2 from December 14, 2019). Also 1.1.x versions of dry-types produces a lot of deprecation warnings with Ruby 2.7 that can be too noisy.I relaxed dependency version to
>= 1.1
and tested it against latest dry-types version on rubygems.org and everything seems to be good.RSpec results with dry-types 1.2.2