From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id KChCIgMeZWVBdgEAG6o9tA:P1 (envelope-from ) for ; Mon, 27 Nov 2023 23:53:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KChCIgMeZWVBdgEAG6o9tA (envelope-from ) for ; Mon, 27 Nov 2023 23:53:55 +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 C98293CAC7 for ; Mon, 27 Nov 2023 23:53:54 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lendvai.name header.s=protonmail header.b=UAaP58ST; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1701125635; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vYg74gVgyCe4LMunpmnVHJWG7xYJbqUWfJihM60+s7w=; b=qYNtAfCJsNxczgc4vjIr1jq+Eamoqs1EioNU5jPxMnaHan6Psw1EinmeGsIxqVyGsYWtF1 6KXtAM9skQPauV+L6HD87AFlINdrV9Ks6PDLAyOp9W8w/0HOuhF9QJmvESXJ9iCmyofPct 00Z2htNeBR4ppd6B7e6gNVsNP3PmxOPKmTy7HOmFcGTWGg6rC75OPMxhrUxhGYxyOe6tT+ cCe5eQffSHfElmcj9cuBOiMHx4Z9ZTgRdoI6+hU6pIUkJ02445qnZxx74eRktqGI7B/iAi eAX9GUGX+ZEnSzYz0rGtgGMuELJTBGmguaEGdBECq4BW35l+qpxMkKvs10WMWA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1701125635; a=rsa-sha256; cv=none; b=D/nRMTlm0LWYpp6MqREiWBi4AvRfw2swnNlkzXIhncQHc6p6NcSPYFbmKQ5I75kbjBlxgS 3jN/qJYQd8gslDIEcE42yxhFBfir9Kaz3JfaY44EF3vsruvxGvCWf6MaW4sh1bcOTczdA/ H4Dh0vwwwUa1ow1eHxKF8ENsDlz6/JEDwgW9L2cXeuAo5G0veycTr/kSYSAlufXdsZpLG0 t5aOUc0GH2qmyL4KmSD/TfJj/TgWa/n6gNtL/OfbErO1d7LYPP5ATK16/ccs24fZtOI2Wl M+wInsml860AWaQHyGIQmlrjFl76jARa86PfsT0wOMBlNHYcTJ0XJLzfQqVv3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lendvai.name header.s=protonmail header.b=UAaP58ST; dmarc=none; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r7kTg-0004ic-B8; Mon, 27 Nov 2023 17:53:20 -0500 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 1r7kTb-0004iH-0H for guix-devel@gnu.org; Mon, 27 Nov 2023 17:53:15 -0500 Received: from mail-40136.proton.ch ([185.70.40.136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r7kTX-0003qS-DT for guix-devel@gnu.org; Mon, 27 Nov 2023 17:53:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail; t=1701125578; x=1701384778; bh=vYg74gVgyCe4LMunpmnVHJWG7xYJbqUWfJihM60+s7w=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=UAaP58STH24cqOmgPFehncEBS5bo8lx4vEPUtENFAe5DGyWmM0FmyzzeuLNjJNBjq 6BZwO13Y0gi10V/PVMA2jjNhd+hWIAqHCIsTlw/gbBuh27BW7uwJjT0P8nYfc9UNqX GrYXKgQMSDNfWbDgpPRkywKyeJm1zbtZjS4bq4+ktD0JsrAAlsWI7xpDvuyG+ph40z 55Wxdz7uxr87/KORgwtUpmUE8hPuYn8o+4L0+oxCfA1N2F8lR3fPwbYHeQEkFLsUv/ B5nv57SOtq9rsxZpX8PZPT8+q1moWjfwnWYdeCSB6Mwv2O4VXmLulI2KsLAiFTnBRa c1HbBZvb7v65Q== Date: Mon, 27 Nov 2023 22:52:51 +0000 To: guix-devel From: Attila Lendvai Subject: shepherd GEXP module import mystery Message-ID: Feedback-ID: 28384833:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.40.136; envelope-from=attila@lendvai.name; helo=mail-40136.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -7.48 X-Spam-Score: -7.48 X-Migadu-Queue-Id: C98293CAC7 X-TUID: kQVgZYl3flOq dear Guix, context: i'm adding logging to shepherd, and while i was testing it i encou= ntered a conflict with my service code that shouldn't happen. i'm probably missing something from my mental model around guile modules, a= nd/or how shepherd compiles and loads them. the symptom is that a start GEXP of my service sees bindings that come from= the module called (shepherd support), but i have no idea who and where imp= orts that module. i added the following two format lines to the beginning of my start GEXP: (format #t "*** start gexp speaking, current module is ~A, module-uses: ~A~= % ringbuffer: ~A~%" (current-module) (module-uses (current-module)) (and=3D> (module-variable (current-module) 'ring-buffer) variable-ref)) (format #t "*** ringbuffer in packages: ~A~%" (map (lambda (module-name) (and=3D> (module-variable (resolve-interface module-name) 'ringbuffer) variable-ref)) '((guile) (oop goops) (shepherd service) (srfi srfi-34) (system repl error-handling) (guix build utils) (guix build syscal= ls) (gnu build file-systems)))) and they print: *** start gexp speaking, current module is # module-uses: ( # # # # # # # # # # # # # # # # # #=20 *** ringbuffer in packages: (#f #f #f #f #f #f #f #f)=20 how else can a definition (i.e. 'ringbuffer) get into this module without i= t coming from one of the modules in its module-uses list? i'm pretty sure that it's coming from (shepherd support) because i'm neck d= eep in debugging the original issue: a macro from (shepherd support) overwr= ote my function that errored when it was called at runtime as a function. i'm also seeing this warning (i.e. my root issue): WARNING: (#{ g108}#): `log.debug' imported from both (guix-crypto utils) an= d (shepherd support) i've checked the module list of the gexp, and how guix compiles the .go fil= es that are then given to shepherd, and i see nothing obvious. i even looke= d at the source file that gets generated and compiled for the service in qu= estion, and it doesn't contain any mention of this module. there are no direct mentions of (shepherd support) in the source, that's wh= y i thought maybe something re-exports the entire module, so i checked the = presence of 'ringbuffer in all the used modules... but it's not in any of t= hem. could it be a bug in how different versions/instances of guile serialize/lo= ad a .go file? or could it be due to the module magic in (gnu services shep= herd) that compiles the shepherd config into a .go file? i'm out of ideas, any hint is appreciated! --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CPeople always find partners [with] exactly the same level of unres= olved traumas they are at, without any exception. Now the trauma may look d= ifferently, and how it manifests may look differently, but the degree of tr= auma is always equal, I mean with perfect accuracy. [=E2=80=A6] And that tr= auma then shows up in the relationship.=E2=80=9D =09=E2=80=94 G=C3=A1bor M=C3=A1t=C3=A9 (1944=E2=80=93), 'On The Spot - Az e= llens=C3=A9g gyermekei', 48m50s