You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With Bridgetown v2.0, we added the rackup gem instead of instantiating Puma directly. This paved the way for the user to swap web server.
There are still a couple of issues to resolve before we can claim to be fully Rack compliant and support all Rack web servers. This issue tracks the remaining work.
Motivation
There's no reason not to. We inherited a dependency on WEBrick from Jekyll, and replaced it with Puma. A step in the right direction, but we should go all the way. Roda is Rack-compliant. There's no technical reason for Bridgetown not to be.
Checklist
Ensure Bridgetown can be started with bundle exec puma and bundle exec falcon serve.
A user should be able to setup Falcon easily. We should offer an out of the box setup in the future, but one step at a time.
Remove the require "puma" dependency in the console command:
The error with the live dev reload code when using Falcon:
# | Task may have ended with unhandled exception.
# | Errno::EPIPE: Broken pipe
# | → <internal:io> 121:in `write_nonblock'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/io-stream-0.6.1/lib/io/stream/buffered.rb:93 in `syswrite'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/io-stream-0.6.1/lib/io/stream/generic.rb:184 in `drain'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/io-stream-0.6.1/lib/io/stream/generic.rb:196 in `block in flush'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/io-stream-0.6.1/lib/io/stream/generic.rb:195 in `synchronize'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/io-stream-0.6.1/lib/io/stream/generic.rb:195 in `flush'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/protocol-http1-0.28.1/lib/protocol/http1/connection.rb:508 in `block in write_chunked_body'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/protocol-http-0.45.0/lib/protocol/http/body/readable.rb:86 in `each'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/protocol-http1-0.28.1/lib/protocol/http1/connection.rb:501 in `write_chunked_body'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/protocol-http1-0.28.1/lib/protocol/http1/connection.rb:590 in `write_body'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/async-http-0.84.0/lib/async/http/protocol/http1/server.rb:133 in `block in each'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/async-2.21.0/lib/async/task.rb:327 in `defer_stop'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/async-http-0.84.0/lib/async/http/protocol/http1/server.rb:80 in `each'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/async-http-0.84.0/lib/async/http/server.rb:50 in `accept'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/io-endpoint-0.14.0/lib/io/endpoint/wrapper.rb:182 in `block (2 levels) in accept'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/async-2.21.0/lib/async/task.rb:197 in `block in run'
# | /Users/ayush/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/async-2.21.0/lib/async/task.rb:435 in `block in schedule'
It's something to do with threading .... we shouldn't make assumptions about how Bridgetown will be deployed. We need to find a better way to keep the persistent connection open without breaking the web server.
Summary
With Bridgetown v2.0, we added the
rackup
gem instead of instantiating Puma directly. This paved the way for the user to swap web server.There are still a couple of issues to resolve before we can claim to be fully Rack compliant and support all Rack web servers. This issue tracks the remaining work.
Motivation
There's no reason not to. We inherited a dependency on WEBrick from Jekyll, and replaced it with Puma. A step in the right direction, but we should go all the way. Roda is Rack-compliant. There's no technical reason for Bridgetown not to be.
Checklist
bundle exec puma
andbundle exec falcon serve
.require "puma"
dependency in the console command:bridgetown/bridgetown-core/lib/bridgetown-core/commands/console.rb
Line 83 in 7f48f7e
The text was updated successfully, but these errors were encountered: