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

Ruby 3.1 dry-configurable warning #110

Closed
skliask opened this issue Jun 17, 2022 · 5 comments
Closed

Ruby 3.1 dry-configurable warning #110

skliask opened this issue Jun 17, 2022 · 5 comments
Labels

Comments

@skliask
Copy link

skliask commented Jun 17, 2022

There is a warning popping up when the gem is used with ruby 3.1.2.
<module:ApiStruct>' [dry-configurable] default value as positional argument to settings is deprecated and will be removed in the next major version Provide a default: keyword argument instead

Looks like an update issue to the dry configurable gem used as a dependency

@skliask skliask added the bug label Jun 17, 2022
@scottsherwood
Copy link

Are there any plans to update the gem so that dry-configurable is no longer needed?

@rsedykh
Copy link
Member

rsedykh commented Jan 19, 2023

Hi. Indeed, we're looking for a Ruby dev who can fix this dry-configurable dependency.

There is an issue with Ruby versions and dry-configurable gem, which the bundler can't resolve. Ruby >=3 requires dry-configurable 0.13.0. We have a dirty fix for this case, but we aren't happy with it. If your app requires another version of dry-configurable, there will be a compatibility issue.

We've currently failed to set up the correct dry-configurable version depending on the Ruby version that will work when installing gem from RubyGems (it worked if you install gems from its repo). When pushed to RubyGems it analyzes gemspec file and fixates dependencies without giving us a chance to set different options. So we've withdrawn Ruby and Rails gems from RubyGems for now and called them Release Candidates.

We see three possible solutions:

  1. For apps that require Ruby >=3, install gem from Github: gem 'uploadcare-rails', git: 'https://github.com/uploadcare/uploadcare-rails.git'. (First, we have to change add_development_dependency to add_dependency here). But it won't work if your app requires a later version of dry-configurable'. This is equal to the current solution published in the readme.

  2. Create a separate gem for Ruby >=3. We don't like it either.

  3. The best solution is to understand those syntax issues and make a monkey patch or an adapter.

Can somebody help us with the last one?

@abhishekgupta5
Copy link

Would be happy to help on this.

@rsedykh
Copy link
Member

rsedykh commented Mar 8, 2023

Would be happy to help on this.

I'm all ears. You can email me on [email protected]

@kraft001
Copy link
Collaborator

@skliask Fixed in the new version (3.3). Please, try it

@scottsherwood Yes, the gem was updated. It still depends on dry-configurable, but now it uses the most recent versions and runs without issues. Please, check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants