We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I run a basic Kemal app I'm getting Warning: Zlib is deprecated, use Compress::Zlib error.
Warning: Zlib is deprecated, use Compress::Zlib
name: blog version: 0.1.0 authors: - xxx targets: blog: main: src/blog.cr crystal: 0.35.0 license: MIT dependencies: kemal: github: kemalcr/kemal
Expected behavior: [What you expect to happen] Kemal should start
Actual behavior: [What actually happens] An error is risen
Reproduces how often: [What percentage of the time does it reproduce?] Everytime
Crystal 0.35.0 (2020-06-09) LLVM: 10.0.0 Default target: x86_64-apple-macosx
crystal run src/blog.cr --error-trace
Warning: Zlib is deprecated, use Compress::Zlib In src/blog.cr:21:7 21 | Kemal.run do |config| ^-- Error: instantiating 'Kemal:Module#run()' In lib/kemal/src/kemal.cr:65:12 65 | server.listen unless config.env == "test" ^----- Error: instantiating 'HTTP::Server#listen()' In /usr/local/Cellar/crystal/0.35.0/src/http/server.cr:455:14 455 | @sockets.each do |socket| ^--- Error: instantiating 'Array(Socket::Server)#each()' In /usr/local/Cellar/crystal/0.35.0/src/indexable.cr:187:5 187 | each_index do |i| ^--------- Error: instantiating 'each_index()' In /usr/local/Cellar/crystal/0.35.0/src/indexable.cr:187:5 187 | each_index do |i| ^--------- Error: instantiating 'each_index()' In /usr/local/Cellar/crystal/0.35.0/src/http/server.cr:455:14 455 | @sockets.each do |socket| ^--- Error: instantiating 'Array(Socket::Server)#each()' In /usr/local/Cellar/crystal/0.35.0/src/http/server.cr:468:13 468 | spawn handle_client(_io) ^ Error: expanding macro There was a problem expanding macro 'spawn' Called macro defined in /usr/local/Cellar/crystal/0.35.0/src/concurrent.cr:99:1 99 | macro spawn(call, *, name = nil, same_thread = false, &block) Which expanded to: > 1 | > 2 | > 3 | > 4 | ->( > 5 | > 6 | __arg0 : typeof(_io), > 7 | > 8 | > 9 | ) { > 10 | spawn(name: nil, same_thread: false) do > 11 | handle_client( > 12 | > 13 | __arg0, > 14 | > 15 | > 16 | ) > 17 | end > 18 | > 19 | }.call(_io) > 20 | > 21 | Error: instantiating 'handle_client(IO+)' In /usr/local/Cellar/crystal/0.35.0/src/http/server.cr:513:16 513 | @processor.process(io, io) ^------ Error: instantiating 'HTTP::Server::RequestProcessor#process(IO+, IO+)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/request_processor.cr:50:20 50 | @handler.call(context) ^--- Error: instantiating '(HTTP::Handler | Proc(HTTP::Server::Context, Nil))#call(HTTP::Server::Context)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/handlers/compress_handler.cr:12:5 12 | {% if flag?(:without_zlib) %} ^ Error: expanding macro There was a problem expanding macro 'macro_4775098448' Called macro defined in /usr/local/Cellar/crystal/0.35.0/src/http/server/handlers/compress_handler.cr:12:5 12 | {% if flag?(:without_zlib) %} Which expanded to: > 1 | > 2 | request_headers = context.request.headers > 3 | > 4 | if request_headers.includes_word?("Accept-Encoding", "gzip") > 5 | context.response.headers["Content-Encoding"] = "gzip" > 6 | context.response.output = Compress::Gzip::Writer.new(context.response.output, sync_close: true) > 7 | elsif request_headers.includes_word?("Accept-Encoding", "deflate") > 8 | context.response.headers["Content-Encoding"] = "deflate" > 9 | context.response.output = Compress::Deflate::Writer.new(context.response.output, sync_close: true) > 10 | end > 11 | > 12 | call_next(context) > 13 | Error: instantiating 'call_next(HTTP::Server::Context)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/handler.cr:28:20 28 | next_handler.call(context) ^--- Error: instantiating '(HTTP::Handler | Proc(HTTP::Server::Context, Nil))#call(HTTP::Server::Context)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/handlers/error_handler.cr:17:7 17 | call_next(context) ^-------- Error: instantiating 'call_next(HTTP::Server::Context)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/handler.cr:28:20 28 | next_handler.call(context) ^--- Error: instantiating '(HTTP::Handler | Proc(HTTP::Server::Context, Nil))#call(HTTP::Server::Context)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/handlers/log_handler.cr:20:7 20 | call_next(context) ^-------- Error: instantiating 'call_next(HTTP::Server::Context)' In /usr/local/Cellar/crystal/0.35.0/src/http/server/handler.cr:28:20 28 | next_handler.call(context) ^--- Error: instantiating '(HTTP::Handler | Proc(HTTP::Server::Context, Nil))#call(HTTP::Server::Context)' In lib/kemal/src/kemal/static_file_handler.cr:66:9 66 | send_file(context, file_path) ^-------- Error: instantiating 'send_file(HTTP::Server::Context, String)' In lib/kemal/src/kemal/helpers/helpers.cr:135:8 135 | File.open(file_path) do |file| ^--- Error: instantiating 'File.class#open(String)' In lib/kemal/src/kemal/helpers/helpers.cr:135:8 135 | File.open(file_path) do |file| ^--- Error: instantiating 'File.class#open(String)' In lib/kemal/src/kemal/helpers/helpers.cr:143:7 143 | Gzip::Writer.open(env.response) do |deflate| ^ Error: undefined constant Gzip::Writer
The text was updated successfully, but these errors were encountered:
Duplicate of:
Fixed by #570, just waiting on a new release. Can use branch, or commit options as mentioned in #572.
branch
commit
Sorry, something went wrong.
Thanks
No branches or pull requests
Description
When I run a basic Kemal app I'm getting
Warning: Zlib is deprecated, use Compress::Zlib
error.Steps to Reproduce
Warning: Zlib is deprecated, use Compress::Zlib
is returnedExpected behavior: [What you expect to happen]
Kemal should start
Actual behavior: [What actually happens]
An error is risen
Reproduces how often: [What percentage of the time does it reproduce?]
Everytime
Versions
Additional Information
crystal run src/blog.cr --error-trace
The text was updated successfully, but these errors were encountered: