From its inception in 2002 with negative version numbers (really!) up to version 0.9.x included, the Shepherd’s service interface used GOOPS, Guile’s object-oriented programming system (see GOOPS in GNU Guile Reference Manual).
There was a <service>
class whose instances you could access
directly with slot-ref
; generic functions such as start
and stop
had one method accepting a service object and another
method accepting the name of a service as a symbol, which it would
transparently resolve.
This interface is deprecated. It is still supported in version 0.10.5 but will be removed in the next stable series.
Fortunately, common idioms are easily converted to the current interface. For example, you would previously create a service like so:
(make <service> ;deprecated GOOPS interface #:provides '(something) #:requires '(another thing) #:start ... #:stop ... #:respawn? #t)
With the new interface (see Defining Services), you would write something very similar:
(service '(something) #:requirement '(another thing) #:start ... #:stop ... #:respawn? #t)
Likewise, instead of writing:
(start 'whatever)
... you would write:
(start-service (lookup-service 'whatever))
When using one of the deprecated methods, a deprecation warning is
emitted, depending on the value of the GUILE_WARN_DEPRECATED
environment variable (see GUILE_WARN_DEPRECATED
in GNU Guile Reference Manual).