From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id gXduK2I1n19OVAAA0tVLHw (envelope-from ) for ; Sun, 01 Nov 2020 22:23:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id OFq6JmI1n19lAgAAB5/wlQ (envelope-from ) for ; Sun, 01 Nov 2020 22:23:30 +0000 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 052DA9402DD for ; Sun, 1 Nov 2020 22:23:29 +0000 (UTC) Received: from localhost ([::1]:49318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZLl2-0007vd-ND for larch@yhetil.org; Sun, 01 Nov 2020 17:23:28 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48636) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZLkt-0007vS-Tl for guix-devel@gnu.org; Sun, 01 Nov 2020 17:23:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33987) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZLks-0006xW-0d; Sun, 01 Nov 2020 17:23:18 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49138 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZLkr-0000WJ-K9; Sun, 01 Nov 2020 17:23:17 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ricardo Wurmus Subject: Re: Extending Guix without using the Guile load path References: <87o8tulhci.fsf@elephly.net> <871rpxu2fb.fsf@gnu.org> <87tuuayplb.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 Brumaire an 229 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: Sun, 01 Nov 2020 23:23:16 +0100 In-Reply-To: <87tuuayplb.fsf@elephly.net> (Ricardo Wurmus's message of "Sat, 31 Oct 2020 23:53:36 +0100") Message-ID: <87ft5spvhn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 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-Scanner: ns3122888.ip-94-23-21.eu 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@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: BOBMY/N1C/hl Hi! Ricardo Wurmus skribis: > Ludovic Court=C3=A8s writes: > >> Hello! >> >> Ricardo Wurmus skribis: >> >>> I think it=E2=80=99s a bit difficult to install the Guix Workflow Langu= age at >>> this point and I=E2=80=99d like to change that. >>> >>> Currently, new sub-commands for Guix are looked up by module name on the >>> Guile load path. When installing the =E2=80=9Cgwl=E2=80=9D package, th= ough, the Guile >>> load path is not automatically altered, so users need to set it up by >>> themselves. The load path is only altered automatically when users >>> install the =E2=80=9Cguile=E2=80=9D package. This is not a good recomm= endation because >>> users may have Guile 2.2 in their profile, and not Guile 3.0 or whatever >>> version may be needed by the extension. [...] >> GUIX_EXTENSIONS_PATH sounds like a good idea. I suppose it could be >> implemented pretty much like GUIX_PACKAGE_PATH? >> >> That would also allow us to consider Guix Home a package rather than a >> channel, like you did for GWL. > > Below is a draft that adds Guile modules from GUIX_EXTENSIONS_PATH to > the %load-path and %load-compiled-path. > > I think this implementation is not good, but I=E2=80=99d like to provoke = some > comments about the following thoughts: > > * what happens to the Guile dependencies of an extension? Those would > not be added to the load path. Should the extension take care of this > by manually augmenting the load path? Hmm that doesn=E2=80=99t sound great. > * The draft simply uses the same directories that GUILE_LOAD_PATH and > GUILE_LOAD_COMPILED_PATH use. Is this a bad idea? Would it not be > better to have a new directory prefix (such as =E2=80=9Clib/guix/extens= ions=E2=80=9D)? On one hand, if it=E2=80=99s a different search path, you=E2=80=99d rather = use a different directory like lib/guix/extensions. OTOH, all this is regular Guile code and it=E2=80=99d be ridiculous to be unable to just have it on t= he Guile load path. > * The search path on the =E2=80=9Cguix=E2=80=9D package does not distingu= ish between > compiled modules and source modules; it simply looks for all the > conventional directories and puts them on the GUIX_EXTENSIONS_PATH, > while (guix ui) adds them to both %load-path and %load-compiled-path. Traditionally distros distinguish between arch-dependent and arch-independent files, and that would prevent that. (Thinking out loud.) What if an extension could instead be a package installed next to Guix and its channels in ~/.config/guix/current, and we use =E2=80=98package-path-entries=E2=80=99 as is done in (gnu packages) to augm= ent =E2=80=98%load-path=E2=80=99 and =E2=80=98%load-compiled-path=E2=80=99? Thanks, Ludo=E2=80=99.