From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id OMvrMxCD/mFEdAEAgWs5BA (envelope-from ) for ; Sat, 05 Feb 2022 15:00:48 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KEI9MBCD/mEHBwAAauVa8A (envelope-from ) for ; Sat, 05 Feb 2022 15:00:48 +0100 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 479C8344AD for ; Sat, 5 Feb 2022 15:00:47 +0100 (CET) Received: from localhost ([::1]:59202 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGLcM-0000NW-CK for larch@yhetil.org; Sat, 05 Feb 2022 09:00:46 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGLbM-0000N9-F9 for guix-devel@gnu.org; Sat, 05 Feb 2022 08:59:44 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:35296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGLbI-0001Fi-Tm for guix-devel@gnu.org; Sat, 05 Feb 2022 08:59:44 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 60A0821F; Sat, 5 Feb 2022 14:59:38 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ZCLP7Zwkh2S; Sat, 5 Feb 2022 14:59:37 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id F40E7171; Sat, 5 Feb 2022 14:59:36 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Attila Lendvai Subject: Re: Shepherd config file and GEXP semantics References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 17 =?utf-8?Q?Pluvi=C3=B4se?= an 230 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 05 Feb 2022 14:59:36 +0100 In-Reply-To: (Attila Lendvai's message of "Sun, 30 Jan 2022 19:53:00 +0000") Message-ID: <87bkzlifcn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / X-Rspamd-Server: hera X-Rspamd-Queue-Id: 60A0821F X-Spamd-Result: default: False [0.46 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_ALL(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.56)[subject]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] Received-SPF: softfail client-ip=185.233.100.1; envelope-from=ludo@gnu.org; helo=hera.aquilenet.fr X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1644069647; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=TpSKIlfPLSJ9IBp+5jKkeZRHUKf/Yw7WmvXwMdumhsw=; b=Zfk31rXkcXVzcYtr2M2ERDA7Zcezys3REgzhZHwpQftBxS0QmO+2vZXHsIM6eF1Fraz0e3 rZMW5RbTc5bgFX5RKhu1lPMMXqWaF4m48Eka2DiQKZ6zCx594i/zhs8PwyLX+7ZM36LG7t FoJUL1LZ8TbRbzqBZPvkT51MEWBmla43Uz5szQWcYnvu0YQ3UgEfFioxzruVPlbMXofKeR uZHlwZhfUa6lN1jikASn96YLMjqBISI59hj6Kxx7YSy6lFx26QpEXsJQUPfEwzBiEUbyZu p1OqEbUDfkSSF5jhH6qlAzllwK7nH+GXy4jiTtITZ42aeLNQVLpSyQgXwKim8w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1644069647; a=rsa-sha256; cv=none; b=jDajG5C1ZRgeWY13A+aX2h3dG+AwRYB+5aBB0enU6CzMmZikxDZ9KXNbXDOBPwNtupYrfa 7ohhQcwaAnoNV1LJ/N06VGdpkFli+uEMfbbDQspbblfGe3X4E7It1mQhFqY3KpiCbxZsnZ GpAp5nW/TFvXNBFZ9sNTVZFoWJA1jaFcdCC/y+lAotD4TSotQA7ijFawCcv+JE6+YzhVAw 3DB58bM3RHSR1WkCO6ebtwp8XVnnJ9B+Pv5tzoB2++wT1pr2l42jKQaYASGVJ+CDLoVR/E YltpE4zO0bu0SDupKUzkDEJe4HSn8lKx0BLjXxWmJXYg4Q3SwRCHyCz2mpiBuA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.43 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 479C8344AD X-Spam-Score: -4.43 X-Migadu-Scanner: scn0.migadu.com X-TUID: /PiLCCppdq3n Hi, Attila Lendvai skribis: > (define (make-user-module) > (let ((m (make-fresh-user-module))) > ;; The typical configuration file wants to do '(make ...)',= and > ;; '(register-services ...)', so provide the relevant bindings by def= ault. > (module-use! m (resolve-interface '(oop goops))) > (module-use! m (resolve-interface '(shepherd service))) > m)) > > (define (load-in-user-module) > (let ((user-module (make-user-module))) > (save-module-excursion > (lambda () > (set-current-module user-module) > (use-modules (nongnu services swarm-utils)) > > ;; this works, i.e. *log-directory* is not unbound upon execution: > ;; (eval '(lambda () > ;; *log-directory*) > ;; user-module) > > (lambda () *log-directory*) > )))) =E2=80=98use-modules=E2=80=99 is a macro that should only be used at the to= p level, even if it sometimes works in different contexts, for now. Instead, you should use Guile=E2=80=99s first-class module API (info "(guil= e) Module System Reflection"). As you noticed in the code you copied from, you would call =E2=80=98module-use!=E2=80=99 and similar procedures. I don=E2=80=99t see which module =E2=80=98*log-directory*=E2=80=99 is in, t= hough. HTH, Ludo=E2=80=99.