Closed davydovanton closed 7 years ago
:+1:
Doesn't look like autostart actually starts things? You need Celluloid.boot
. Is this a bug in autostart.rb or am I missing something? With this change:
~/source/celluloid/celluloid-io/dblock (master)$ bundle exec ruby examples/echo_server.rb
I, [2016-05-03T12:20:31.111404 #81113] INFO -- : Celluloid 0.17.3 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
/Users/dblock/.rvm/gems/ruby-2.3.0/bundler/gems/celluloid-386cfcb8843a/lib/celluloid.rb:38:in `actor_system': Celluloid is not yet started; use Celluloid.boot (Celluloid::Error)
from /Users/dblock/.rvm/gems/ruby-2.3.0/bundler/gems/celluloid-386cfcb8843a/lib/celluloid.rb:155:in `start'
from /Users/dblock/.rvm/gems/ruby-2.3.0/bundler/gems/celluloid-386cfcb8843a/lib/celluloid/autostart.rb:3:in `<top (required)>'
from examples/echo_server.rb:6:in `require'
from examples/echo_server.rb:6:in `<main>'
I believe we are in the process of removing autostart but it's been a long time since I looked at it.
celluloid master (0.18.x.pre) is intended to work as follows:
require "celluloid/current"
is equivalent to require "celluloid"
require "celluloid"
does not call Celluloid.boot
require "celluloid/autostart"
is equivalent to require "celluloid" && Celluloid.boot
Awesome.
@tarcieri @ioquatix if you want I can reopen PR :)
We should probably merge this.
@ioquatix awesome, thanks 🎉
@davydovanton I appreciate the sentiment, but let's be honest. You did some work, figuring out there is a bug, made a PR, like a year ago, and we basically ignored you. As someone who has experienced both sides of this (as someone submitting a PR into the great void, and as someone here now triaging an issue that's a year old), please accept my sincere apologies for that and thanks for persisting with this.
@ioquatix hey, don't worry. I know that oss projects are hard and we don't have the time or motivation for maintaining this sometimes.
I don't have any negative emotions about it and thanks for you work 💚 💙 ❤️
Require 'celluloid/autostart' for starting actor system
/cc @marshall-lee, @tarcieri, @digitalextremist