dry-rb / dry-view

Complete, standalone view rendering system that gives you everything you need to write well-factored view code.
https://dry-rb.org/gems/dry-view
MIT License
149 stars 19 forks source link

Deprecation warnings from dry-configurable #151

Open ZimbiX opened 2 years ago

ZimbiX commented 2 years ago

I'm seeing warnings, as it appears dry-configurable deprecated a couple of things without dry-view having been updated.

/usr/local/bundle/ruby/2.7.0/gems/dry-view-0.7.1/lib/dry/view.rb:36:in `<module:Dry>' [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

/usr/local/bundle/ruby/2.7.0/gems/dry-view-0.7.1/lib/dry/view.rb:36:in `<module:Dry>' [dry-configurable] passing a constructor as a block is deprecated and will be removed in the next major version
Provide a `constructor:` keyword argument instead

For the latter, keyword arguments are now needed instead of passing a block, e.g. here

timriley commented 2 years ago

Hey @ZimbiX! dry-view development has essentially moved over to hanami/view, but I'd be more than happy to cut a release with these dry-configurable deprecations addressed, if you're OK to submit a PR here based on https://github.com/hanami/view/pull/190 😄

ZimbiX commented 2 years ago

Hiya @timriley =) Ah ha; thanks for the heads up. The changes do look straightforward, and I did consider making them myself. But if this isn't going to keep up with future changes in dry-rb, it might be better that we switch. Hmm, I'll look into it and have a think about what would be the best approach for us.

Thanks for all your work!

olegykz commented 2 years ago

@timriley please have a look - https://github.com/dry-rb/dry-view/pull/153

fitzfoufou commented 1 month ago

Hello, how are we on that issue? It seemed it was about to be released. @olegykz Thanks in advance :)

olegykz commented 1 month ago

@fitzfoufou I guess https://github.com/hanami/view pulls all the love and attention :) In my current project, I had to use direct point to the HEAD of main branch in Gemfile

  gem 'dry-view', github: 'dry-rb/dry-view', branch: 'main'
timriley commented 1 month ago

Hi folks, I'll look to make a final dry-view release (gathering up any fixes like this) after Hanami 2.2 is done.

fitzfoufou commented 1 month ago

That would be great @timriley thanks! 🙂