bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71887: Raise an error when extending a service type that doesn't sup


From: Richard Sent
Subject: bug#71887: Raise an error when extending a service type that doesn't support extensions
Date: Mon, 01 Jul 2024 18:10:27 -0400

Hi Guix,

At present it is possible to extend service-types that do not implement
compose or extend methods, resulting in surprising behavior that's hard
to debug [1]. We should throw an error when a service-type that does not
have compose or extend fields is extended.

--8<---------------cut here---------------start------------->8---
(use-modules (gnu home)
             (gnu home services)
             (gnu home services desktop)
             (gnu services))

(home-environment
 (services
  (list
   ;; home-redshift-service-type does not support extensions
   (simple-service 'this-should-error home-redshift-service-type
                   "According to all known laws of aviation..."))))
--8<---------------cut here---------------end--------------->8---


[1]: https://lists.gnu.org/archive/html/help-guix/2024-07/msg00000.html

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]