celluloid / celluloid-io

UNMAINTAINED: See celluloid/celluloid#779 - Evented sockets for Celluloid actors
https://celluloid.io
MIT License
879 stars 93 forks source link

Update example code #167

Closed davydovanton closed 7 years ago

davydovanton commented 8 years ago

Require 'celluloid/autostart' for starting actor system

/cc @marshall-lee, @tarcieri, @digitalextremist

marshall-lee commented 8 years ago

:+1:

dblock commented 8 years ago

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>'
ioquatix commented 7 years ago

I believe we are in the process of removing autostart but it's been a long time since I looked at it.

tarcieri commented 7 years ago

celluloid master (0.18.x.pre) is intended to work as follows:

ioquatix commented 7 years ago

Awesome.

davydovanton commented 7 years ago

@tarcieri @ioquatix if you want I can reopen PR :)

ioquatix commented 7 years ago

We should probably merge this.

davydovanton commented 7 years ago

@ioquatix awesome, thanks 🎉

ioquatix commented 7 years ago

@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.

davydovanton commented 7 years ago

@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 💚 💙 ❤️