From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id EFGkIuUT+2bOegAA62LTzQ:P1 (envelope-from ) for ; Mon, 30 Sep 2024 21:11:01 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id EFGkIuUT+2bOegAA62LTzQ (envelope-from ) for ; Mon, 30 Sep 2024 23:11:01 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=KbibvFjB; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="m/QSOzeB"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1727730661; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=zj179eTg/79GuZb3zw4jfSMRZPFz0BWcmXYTUVKV5QQ=; b=H4RbaijmnQip3ED/O9LFJspQ6Fdef6sAnjyk7YtCTliJSZnTgZZl2+UOH+oPkxcUzL/Ism +b49EpMetjTNJ6noz9ZJZzM+SWWBBjvsEv73lgrQW/fNAKKWnwDxB94GSEu5PWZk8TimEZ 9Lx0C4xm/84locK7GlPbLcMKjt30/EjZwqhwEBuGve1TW7JT+e66LNJqv4WVg1cAddOBQO GbB1vYv7AWe8gudQcxVMmsq7hxgxzT/KtBclMUObknuKgoX3Yx0+raA3dti/YifJVWLakV rMB6MhZlOP+R0a/nJ25KUjE3fWF0HXBw6Ly0uPZIt90OXeOcsKxx4ME+ZABYpQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=KbibvFjB; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="m/QSOzeB"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1727730661; a=rsa-sha256; cv=none; b=kl0QN7ghWsfFArgufJJ5M5iUEhzVe3YqWALEb+V8XUxCsS9mvjFXllMF+PDXaXYAsqcyOb QqVybk2taYv0v8Xuz2U6mfJZR8++eSgq+Vj4FOW6YiSNzA3n4gnS/zEAmPyJKxj0ZyIDuF NQWvNogB+/Bzrxb5v7hCholpu+J/nNZ7BQWilqoziM01Og4oJGoGnHLEKgIw16iWjJD6kk PTNdUpzb7hMWJd5ePAkxZ6HcE7SL+FO0lEn3c0rNd8h+6flolBTYBBHhjKBvOvsqItE5qy 1sZH/gqzqvSYqGehNOyDoCU52ncMrecOVgteo0XBs5lq+9CUQQ0DQRPJgY6Lvw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3AF7F1AC5B for ; Mon, 30 Sep 2024 23:11:00 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svNf5-0000XV-8P; Mon, 30 Sep 2024 17:10:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svNf3-0000X3-MM for guix-patches@gnu.org; Mon, 30 Sep 2024 17:10:29 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1svNf3-0004dp-DW for guix-patches@gnu.org; Mon, 30 Sep 2024 17:10:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=zj179eTg/79GuZb3zw4jfSMRZPFz0BWcmXYTUVKV5QQ=; b=KbibvFjBgCQvNY9vChkcP5VRHWmuMsQ9ZwoER3WpKkobzlajhSbm74xqe4dxaNE9Q1F4XN7OmETEPvBG/6xtsJWSl3lpDgT7PP61alvG/UTHPmB2ALpw4o4fPKU9fA/EjseYnpePGkFnHBe6xg9QxJVQylacaSTUZncC2wOzTbwpkLZiNlF6m0PU5007/vqbpT2ycUUqYTHIcKfHNnC75cNz5+VIzvhPTLlA5EiclBYy8WK9bWx1NgbhBwdsaVbmvfOfxCOoHT5gdHQFKpCMgKCWmdbOeTE/Sd/QYYgeQ44RpXudZc3qHVfCqae+GRGYntCLKkOjK+hXxhQo7DTsKA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1svNfa-00075p-GQ for guix-patches@gnu.org; Mon, 30 Sep 2024 17:11:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#71928] [PATCH v2] gnu: Throw error when extending services that do not use extensions. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 Sep 2024 21:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71928 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Richard Sent Cc: 71928@debbugs.gnu.org Received: via spool by 71928-submit@debbugs.gnu.org id=B71928.172773061826726 (code B ref 71928); Mon, 30 Sep 2024 21:11:02 +0000 Received: (at 71928) by debbugs.gnu.org; 30 Sep 2024 21:10:18 +0000 Received: from localhost ([127.0.0.1]:47169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svNer-0006wu-70 for submit@debbugs.gnu.org; Mon, 30 Sep 2024 17:10:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46366) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1svNFj-0002FQ-DW for 71928@debbugs.gnu.org; Mon, 30 Sep 2024 16:44:58 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1svNF5-0001Lw-To; Mon, 30 Sep 2024 16:43:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=zj179eTg/79GuZb3zw4jfSMRZPFz0BWcmXYTUVKV5QQ=; b=m/QSOzeBJbiBjIMst4+f XSix5LviubWFOa9r9xcuIUmQdUXhlgIg2grAVf2NjVxnAzp3mn2P2r3so+x+SJHXvWWgd2CPh2l+R 7zW9ZcOzGwDbL+UkpcyUE+JwtC1ox0LfYZeUudbg5q06BTgwlvXX4jajwgmwocyvUJNIBRZgsvICC wSD0WViuHQE/2ob9kAur8vcqocbxvnny2mJCbGb62dBaPyYvfVNZIGHdtVPnMciLTxIRZd6QFiCtt njRYcmul9LC8s9pplx/lqfrPn2O3IGBwEoSQZcIrpYYx3IRaQc/pOcoLCCOnF2PiYlIt/GLCQ1dP9 wez5Xu/vXYI0fw==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <6afb44e7f09f2d8fdbbe4cd0bad92ca170aef1b0.1720045261.git.richard@freakingpenguin.com> (Richard Sent's message of "Wed, 3 Jul 2024 18:21:01 -0400") References: <6afb44e7f09f2d8fdbbe4cd0bad92ca170aef1b0.1720045261.git.richard@freakingpenguin.com> Date: Mon, 30 Sep 2024 22:43:36 +0200 Message-ID: <87h69w50uf.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3AF7F1AC5B X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.49 X-Spam-Score: -4.49 X-TUID: OyV7M01sX6cW Hello, Richard Sent skribis: > * gnu/services.scm (fold-services): Add error handling when using service > extensions. > > Fixes: https://issues.guix.gnu.org/71887 > Change-Id: Ic8d631674bfddde495c93952d9e6cd5649bb287d [...] > @@ -1223,12 +1224,22 @@ (define* (fold-services services > (params -> (service-value sink)) > (service > -> > - ;; Distinguish COMPOSE and EXTEND because PARAMS t= ypically > - ;; has a different type than the elements of EXTEN= SIONS. > - (if extend > - (service (service-kind sink) > - (extend params (compose extensions))) > - sink))) > + (begin > + (unless (or (null? extensions) > + ;; A value of #t is a convention for= "make > + ;; sure the service is present." > + (every (cut eq? #t <>) extensions) > + (and extend compose)) > + (error (format #f "Extensions are not supporte= d in \ > +~a yet the following service types extend it:~{~% ~a~}" > + (service-kind sink) > + (map service-kind dependents)))) > + ;; Distinguish COMPOSE and EXTEND because PARAMS= typically > + ;; has a different type than the elements of EXT= ENSIONS. > + (if extend > + (service (service-kind sink) > + (extend params (compose extensions)= )) > + sink)))) I understand the current situation where extensions to a non-extensible service are silently swallowed is suboptimal, but I wonder about the implications of the semantic change here. Currently the =E2=80=9C#t means ensure the service is present=E2=80=9D conv= ention is not enforced; is it even widely followed in the Guix repo? But then, what about repos out there that provide services? It would seem to me that this is something that cannot be changed overnight without running the risk to break people=E2=80=99s code. So perh= aps the first step (and maybe last step?) would be to print a warning. WDYT? Thanks, Ludo=E2=80=99.