From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YNgHKVgkP2e2IAAA62LTzQ:P1 (envelope-from ) for ; Thu, 21 Nov 2024 12:15:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id YNgHKVgkP2e2IAAA62LTzQ (envelope-from ) for ; Thu, 21 Nov 2024 13:15:20 +0100 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=rJGIz2ub; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=B2leUecz; 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=1732191320; a=rsa-sha256; cv=none; b=BmfSKFl7vzHYvFFiaPCDd47xcFunb9qtVc04MaVErgpkHixnHhvShOeYTn8lNgvz5V2kLd dLwaHnKCsDONnE/uAOd9pJpLKoG18Nm4oYHPRAdJcJYs19OkQ5OZqzP+uIWGiOhgiuAhDk VUwGlEsce71ASmnQpfMxydLqWfadlFCEFaPmy/Se1zHWhjNinhItRevcfwj91e7GF8Go4m RHa8hEWXG6mSHQMCyrGggP97OQMicgtP6vGhME3hpmvW7eWwSzHLd21FAT31BB5TSlIHTy 0oN+f6GTlYBN2vbLpYvOBX+Y0MwgFAO9K91dUHzXSiMiT2QP0kmRqDDZsQlE5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=rJGIz2ub; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=B2leUecz; 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=1732191320; 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=7gXkbW91SghTUFyvriYx1dC7pj6vPwqxVCWLwZ1CE5k=; b=ULVBQKhhtk6knAuda6iH2O2zc1+ZbKnC/Xo/R63eFbR3KuMmggUOHY4RbIHCw4oQ0Klc18 TsDBXt6MR4ZB10zESpKfQCxv6xxDBfY0wKr3GQC3AyZPX5xUedBKmXWqykMLTDfy6Uwwd3 CY5IZITxUM9Zo5zbmcXiw8PBBFeEwzAouJy//edzMH7C7Y4QXeVFF4yY66nAHLm7uS2Rft jY04Vh7DWhdGd4nSEgny9osGMMNdruSF3mzB55GIHfTPT2yoqjAhNNrXyW2ovYJmMEbHX3 4Y7ot2ZU/Yykuifv6dPu+HPmsXd2eDhFwfDDagFK3UqKoIZQu303tOQGt/ebNw== 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 739D21C486 for ; Thu, 21 Nov 2024 13:15:19 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE65R-0004hE-Pz; Thu, 21 Nov 2024 07:15:05 -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 1tE65P-0004eY-2H for guix-patches@gnu.org; Thu, 21 Nov 2024 07:15:04 -0500 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 1tE65O-0008GK-Pp for guix-patches@gnu.org; Thu, 21 Nov 2024 07:15:02 -0500 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=7gXkbW91SghTUFyvriYx1dC7pj6vPwqxVCWLwZ1CE5k=; b=rJGIz2ubK1iCFR5lLajMkcuzf6mb977To4y0mCQdsHl+7J0pjePS1WTw8ayY65Su9XXRHVaet4P//lrIkhr9g7RWQsDPrFuylCGA8OVv9TI36nE/puKxMF3n3buXrEKPTCcU/2MifbMfvlilZrhO4P+V8h7E5QKl6APvHBDrmimfMQFrHa/oq2kemIJzzdWNzH6vKm2Kcmcxp5DrVLFpERP9QV02b+OC6kua5Odp/NhUjY9O4uLMfVKVO+iJIeDEotLeAlJvWbZHh2U9atA6RGCystlOCzguyaLPEOAA6RSL24ZDkx+ejp2URTjEelsck0DMv4C0c9wIxBNBYacjkA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tE65O-0007Yg-3r for guix-patches@gnu.org; Thu, 21 Nov 2024 07:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74425] [PATCH] ui: Include channels in load path before searching for commands. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 21 Nov 2024 12:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74425 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Carlo Zancanaro Cc: Josselin Poiret , Simon Tournier , Mathieu Othacehe , Tobias Geerinckx-Rice , 74425@debbugs.gnu.org, Christopher Baines Received: via spool by 74425-submit@debbugs.gnu.org id=B74425.173219125628983 (code B ref 74425); Thu, 21 Nov 2024 12:15:02 +0000 Received: (at 74425) by debbugs.gnu.org; 21 Nov 2024 12:14:16 +0000 Received: from localhost ([127.0.0.1]:49368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE64d-0007XP-UA for submit@debbugs.gnu.org; Thu, 21 Nov 2024 07:14:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tE64b-0007XB-3G for 74425@debbugs.gnu.org; Thu, 21 Nov 2024 07:14:14 -0500 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 1tE64T-0008Bn-H2; Thu, 21 Nov 2024 07:14:05 -0500 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=7gXkbW91SghTUFyvriYx1dC7pj6vPwqxVCWLwZ1CE5k=; b=B2leUecz/tT+CxpkR9Pc 6ndBDx8ZLt32IxwAeBYR6YJ0sFVGQjhi7zTu5FTDKai10zFLynSW/79wX4A1M5R1LrwtUUEWfMJ9U yvAaCALbiEyTvAkdh26nRGp/W4FuBdtQ9F7qi6X2uPMw/qJbw6nzIjYq0tONpo6/UDEAdFhtYuQTA d00ba+SPaZQch17LE7A1Wv074sWVi8N4g3n9AXeaL90t3QbEVjRnXR1ibrl4mUfalj6NCxd9yVcn5 fl1zBkaHXfa5DHZSVyJ16Aaecf2k7NLR6eIPEhFT0GcyTXFnikudktb0RKJl3TC5A/gNSDu7Q0z6e bf4cy/0X1oZCJA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Carlo Zancanaro's message of "Tue, 19 Nov 2024 09:26:37 +1100") References: Date: Thu, 21 Nov 2024 13:14:00 +0100 Message-ID: <87jzcwss1j.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-Spam-Score: -2.02 X-Spam-Score: -2.02 X-Migadu-Queue-Id: 739D21C486 X-Migadu-Scanner: mx12.migadu.com X-TUID: mHiEol8NUAG1 Hello, Carlo Zancanaro skribis: > * guix/ui.scm (extension-directories): Add channel directories to load pa= th, > compiled load path, and returned list of directories. > > Co-authored-by: Ludovic Court=C3=A8s > Change-Id: I3063cbf7164a065b2c6c2a5c6473df79ce8cbe9b Nice, thanks for looking into it! > (define (extension-directories) > "Return the list of directories containing Guix extensions." > - (filter file-exists? > - (parse-path > - (getenv "GUIX_EXTENSIONS_PATH")))) > + (define package-path-entries > + ;; We need to resolve this lazily, because even using an #:autoload = is too > + ;; much and breaks compilation during "guix pull". > + (module-ref (resolve-module `(guix describe)) > + (symbol-append 'package-path-entries))) > + (let ((scm-path go-path (package-path-entries))) > + (set! %load-path (append %load-path scm-path)) > + (set! %load-compiled-path (append %load-compiled-path go-path)) > + (filter file-exists? > + (parse-path (getenv "GUIX_EXTENSIONS_PATH") scm-path)))) I think you could do: #:autoload (guix describe) (package-path-entries) instead of doing the trick above. Two things: 1. The =E2=80=98%load-path=E2=80=99 and =E2=80=98%load-compiled-path=E2= =80=99 modifications can now be removed from (gnu packages), after checking that GUIX_PACKAGE_PATH still takes precedence. 2. The performance impact of this change must be tested, in particular the startup time of =E2=80=98guix=E2=80=99 commands since they=E2=80= =99ll now be loading (guix channels) & co. unconditionally. One way to do that might be: PROFILE=3D$(guix time-machine -q --url=3D/path/to/checkout) guix shell time -- time $PROFILE/bin/guix build --help strace -c $PROFILE/bin/guix build --help =20=20=20=20=20 Could you give it a try? Ludo=E2=80=99.