socketry / falcon

A high-performance web server for Ruby, supporting HTTP/1, HTTP/2 and TLS.
https://socketry.github.io/falcon/
MIT License
2.54k stars 79 forks source link

warning: 'Rack::Handler is deprecated and replaced by Rackup::Handler' on Rack 3 #200

Closed fmqa closed 1 year ago

fmqa commented 1 year ago

Environment

Steps to reproduce

Start any application e.g. examples/hello using rackup -s falcon. The following warning will appear on the console:

Rack::Handler is deprecated and replaced by Rackup::Handler

Expected result

Applications can be started without any warnings.

Hint/Suggestion to Fix the Issue

https://github.com/socketry/falcon/blob/15d7e836c7c736fd30bf21d214711d5d26c1971a/lib/rack/handler/falcon.rb#L3 could be changed to

begin
  require 'rackup/handler'
rescue LoadError
  require 'rack/handler'
end

Or some other conditional loading mechanism could be used.

ioquatix commented 1 year ago

Yeah, I'm working to fix this, but it's not quite done yet.