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). This interface was deprecated in 0.10.0 and removed in 1.0.0. The remainder of this section describes that interface and how to migrate from it.
The GOOPSy interface provided
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.
Fortunately, common idioms are easily converted to the current interface. For example, you would previously create a service like so:
(make <service> ;former 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))
If in doubt, please get in touch with us at help-guix@gnu.org.