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 2.7 Deprecations #1590

Closed
dillonwelch opened this issue Jan 24, 2020 · 7 comments
Closed

Ruby 2.7 Deprecations #1590

dillonwelch opened this issue Jan 24, 2020 · 7 comments

Comments

@dillonwelch
Copy link

Related to #1587

/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.0.7/lib/sinatra/base.rb:1641: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.0.7/lib/sinatra/base.rb:1604: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/app/vendor/bundle/ruby/2.7.0/gems/sinatra-2.0.7/lib/sinatra/base.rb:1621: warning: The called method `compile!' is defined here
@dentarg
Copy link
Member

dentarg commented Jan 24, 2020

Looks like you are using and old Sinatra version, please try with the latest one (2.0.8.1) as the warnings have been addressed, which can been seen by reading CHANGELOG.md

@DannyBen
Copy link

DannyBen commented May 6, 2020

Why is this closed? The errors occur in Sinatra 2.0.8.1 as well, in multiple scenarios:

  1. When using the most minimal, out of the box Sinatra app (which uses thin apparently):
require 'sinatra'
get('/') { "hello" }

You get:

/gems/ruby-2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1526: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/gems/ruby-2.7.0/gems/rack-2.2.2/lib/rack/handler/thin.rb:11: warning: The called method `run' is defined here
== Sinatra (v2.0.8.1) has taken the stage on (...snip...)
  1. When including reloader:
require 'sinatra'
require 'sinatra/reloader'
set :server, :puma
get('/') { "hello" }

You get:

/gems/ruby-2.7.0/gems/sinatra-contrib-2.0.8.1/lib/sinatra/reloader.rb:308: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/gems/ruby-2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1360: warning: The called method `add_filter' is defined here
/gems/ruby-2.7.0/gems/sinatra-contrib-2.0.8.1/lib/sinatra/reloader.rb:275: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/gems/ruby-2.7.0/gems/sinatra-2.0.8.1/lib/sinatra/base.rb:1622: warning: The called method `compile!' is defined here
== Sinatra (v2.0.8.1) has taken the stage (...snip...)

Ruby version installed with RVM.

$ ruby -v
ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux]

@dentarg
Copy link
Member

dentarg commented May 6, 2020

@DannyBen I think they have been fixed in master, do you mind checking?

@dentarg
Copy link
Member

dentarg commented May 6, 2020

See #1586

@DannyBen
Copy link

DannyBen commented May 6, 2020

Yes. Seems to be working when using this Gemfile (after cloning to ./sinatra):

source "https://rubygems.org"
gem "sinatra", path: './sinatra'
gem "sinatra-contrib", path: './sinatra/sinatra-contrib'
gem "puma"  # or thin

Can this issue be opened until there is a release that closes it for real?
Any ETA on that release?

@dentarg
Copy link
Member

dentarg commented May 6, 2020

I think it is fine that the issue is closed as it has been fixed in master (regardless, I can not change this, I have no access)

Not sure if this is still the plan? https://github.com/sinatra/sinatra/milestone/22

Maybe @jkowens knows more, I'm also not sure who can release a new Sinatra version besides @namusyaka (that hasn't been around for a while)

@DannyBen
Copy link

DannyBen commented May 6, 2020

Well, this is really disappointing...

no_disrespect_intended do

Ruby 2.7 is out for a while now - even longer if we consider the RC releases designed to let developers of key gems prepare - and the pace of Sinatra releases gives the feeling of an almost abandoned gem.

end

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

No branches or pull requests

3 participants