Skip to content
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

Merged
merged 1 commit into from
Dec 26, 2019

Conversation

nbulaj
Copy link
Contributor

@nbulaj nbulaj commented Dec 26, 2019

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

image

@grape-bot
Copy link

1 Message
📖 We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Generated by 🚫 danger

@nbulaj nbulaj force-pushed the relax-dry-types-version branch from d752663 to fc3e3e3 Compare December 26, 2019 12:07
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'
Copy link
Member

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.

Copy link
Contributor Author

@nbulaj nbulaj Dec 26, 2019

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)

Copy link
Member

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?

Copy link
Contributor Author

@nbulaj nbulaj Dec 26, 2019

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 :)

Copy link
Member

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.

Copy link
Contributor Author

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

@nbulaj nbulaj requested a review from dblock December 26, 2019 13:28
@nbulaj nbulaj force-pushed the relax-dry-types-version branch from b4dc442 to 3a57848 Compare December 26, 2019 13:54
@dblock dblock merged commit c17d44b into ruby-grape:master Dec 26, 2019
@nbulaj nbulaj deleted the relax-dry-types-version branch December 26, 2019 21:19
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.

3 participants