Skip to content

DEPRECATION WARNING

Shazgorn edited this page May 28, 2017 · 12 revisions

Backported Mode is the default, for a limited time.

If you're here, you've probably seen this warning in your logs and/or console:

Celluloid 0.17.0 is running in BACKPORTED mode. [ http://git.io/vJf3J ]

You can make the warning go away.

Skip to the refactoring guide.

You are encouraged to set use require 'celluloid/current' right now, rather than require 'celluloid' or require 'celluloid/autostart'. This will expose as much out-of-date code as you can in your Celluloid implementations, as we approach 1.0 and start deprecating old syntax, conventions, and object behaviors. The call for refactoring your code will officially start at version 0.17.5 but you can start experimenting now. Watch for updates and changelogs.

Start bringing your code current now. This brings you added performance, stability, and flexibility -- at the cost of refactoring sections that are deprecated either in syntax, behavior, or conventions.

As always, you are welcome to flag down someone on the Celluloid team to answer questions, or assist in refactoring code segments if you've hit a wall.

Most common changes:

This guide gives you the most frequently needed changes to be up-to-date.

  1. Several widely used classes were moved or renamed:
  • Supervision::Container versus SupervisionGroup
  • Celluloid::Logger moved to Celluloid::Internals::Logger
  • Please see the complete list of moved or renamed classes: deprecate.rb
  1. supervise_as is removed across the board, and supervise takes these parameters in its options hash:
  • as: with a symbol of the name of the supervised actor.
  • type: with the class of actor to supervise.
  • args: [] with an array of initialization parameters.
  • size: to magically make it a Pool on the spot.
  • supervises: [<configuration>] to make it a supervisor itself.
    • The value expected is a configuration compatible array of hashes, meaning using the same syntax asx above... using as:, type:, args:, size:, etc.

This section will be updated with more tips as time goes on.

Clone this wiki locally