From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 6MI2CnIlZGGzOQEAgWs5BA (envelope-from ) for ; Mon, 11 Oct 2021 13:52:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oG/MBXIlZGG6awAA1q6Kng (envelope-from ) for ; Mon, 11 Oct 2021 11:52:18 +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 7A87516294 for ; Mon, 11 Oct 2021 13:52:17 +0200 (CEST) Received: from localhost ([::1]:46760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mZtqp-00076L-HH for larch@yhetil.org; Mon, 11 Oct 2021 07:52:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mZtqc-000767-He for guix-patches@gnu.org; Mon, 11 Oct 2021 07:52:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mZtqc-0007T0-8a for guix-patches@gnu.org; Mon, 11 Oct 2021 07:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mZtqb-0007On-W7 for guix-patches@gnu.org; Mon, 11 Oct 2021 07:52:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50755] [PATCH v3] import: Generate list of importers based on available modules Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 11 Oct 2021 11:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50755 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: pinoaffe , 50755@debbugs.gnu.org Received: via spool by 50755-submit@debbugs.gnu.org id=B50755.163395309228400 (code B ref 50755); Mon, 11 Oct 2021 11:52:01 +0000 Received: (at 50755) by debbugs.gnu.org; 11 Oct 2021 11:51:32 +0000 Received: from localhost ([127.0.0.1]:56784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZtq8-0007Nz-06 for submit@debbugs.gnu.org; Mon, 11 Oct 2021 07:51:32 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:35373) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mZtq6-0007Ni-3e for 50755@debbugs.gnu.org; Mon, 11 Oct 2021 07:51:30 -0400 Received: by mail-qt1-f169.google.com with SMTP id c20so16113824qtb.2 for <50755@debbugs.gnu.org>; Mon, 11 Oct 2021 04:51:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rcSopNcUnSmoAH18aFQAGhjQ8XBcrhWDD3r+mUvHLlo=; b=lkkCxju5KIRON3pO7wisnFkxWX2M/0L9oyJhBj6DVHi2mnqTusXQ2AHLiCGjSJ71oi bkmFbTZEpsWryl9nbkriKhyjQ0Jf1iLjct0MR6n7xITo+baXapPdtQZ5o2LN2XLsVtNx /oVxnq3UmEhgZZ+2grj+XTf8/ltUiB3aVvS4ihNuQmX7xng4ADd7NIYBN/C7yQIDQGMO bhl40Bth3CAx3zLcQGLYVla6H4b3WEt/WHxe8fzCfUsJiuQhJMQqd02x1+WSOEHJ89jl UVemeiN3GFBLO4NZHTDxNOOF+ujJnn5/7ODgCNY54UKbZ7RbkBrIZIiHvMb8IpojnxBr nRJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rcSopNcUnSmoAH18aFQAGhjQ8XBcrhWDD3r+mUvHLlo=; b=RfNkXHnwPqiu3eLqJngXh+Kb2Rlg0Fcqo0YGbW0oHGj/z0nbX/4DZeESXKEiVyDH8a 1YcUsSw/30R78lna1Tygd85GnUFL2r8zys8KxTSlt9OIDPXu1TLYlznobuvG/64elaIE 4GT+vJAoLgG4p6DSXjL0rHLv+WSWhTWscvB1D97jPlghXA4rNd2+hlKG9DhRit5K97+3 O2SCnjm5gIylqZdGgb2kTDtnyu2MI3/8DYrJmniAKzfWMRhEpYh+UORiwope1FkvQykC PZ07qgdCOtI9WR61OVCzrjKwECknxqSTw4xrChALOqh8LAiX3l4KYVAZZqMR/ZLm79Dv +aJA== X-Gm-Message-State: AOAM531uf2JRTW5Uy5DxKvZ7c27ClZftJfDw1xDou2FKebBat2FEcBpD Nk5VNY8jAZJP1kmYpaqwt+izvufEJdr9DowYGP8= X-Google-Smtp-Source: ABdhPJwbiliMy1wY0CYvpkiDDW9XJU0u/kPTu06JKs2+Kc4qgEV//H4cX/hOPI/CDuMbcBOT/7tTFpbf71EcSHbUYpc= X-Received: by 2002:a05:622a:55:: with SMTP id y21mr4258205qtw.39.1633953084530; Mon, 11 Oct 2021 04:51:24 -0700 (PDT) MIME-Version: 1.0 References: <87tuibh43w.fsf@airmail.cc> <87mtnxswwq.fsf@airmail.cc> <4ddbb2adfa86c9ed2e1cf01ad5c1d0129553cbae.camel@telenet.be> <87k0j0hii3.fsf@airmail.cc> <87r1d6zdcj.fsf@airmail.cc> In-Reply-To: From: zimoun Date: Mon, 11 Oct 2021 13:51:13 +0200 Message-ID: Content-Type: text/plain; charset="UTF-8" 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1633953137; 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: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=rcSopNcUnSmoAH18aFQAGhjQ8XBcrhWDD3r+mUvHLlo=; b=XfRdjVuyiwNwlciFil6Bplr5TbW/YaH01/4UKfCJV+QfyuVfFK7RhSc2mLe8OpZnH6LAyA /7HPMeqtIPmq9Ys2msRJ7538pcMtI0cPw045ZWTxgFZ0xSTd0bPXS0pvAFSQ8m8qaRxuIt a5HLfYkwgJVedy2zrPZCJQPBqEisvJVxx8jDalu8/tu/KYpW/h6LOEGu1AS+oq5TPvJKJA eRMi7BIL5nRNzl3eQtRKcpSIEodId/YMvaC/cR3HATMECCKyRN2U25CB8bMNunwXks7Q0z LGTZTlsINwZw9ylPBBuYelVGS/j+q1Fhkqb97TNBDsfGMm1E96maQWLgpe++YA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1633953137; a=rsa-sha256; cv=none; b=ojYGezmgGhXZ7s7LG9/7Qd5djuIDyrC3g5M0YeMRbzQYo+iB44KeNu+Uph5v4be8V7kd3W wNCfKBgszIEpVZEoXJ/HyD5OElhVjW0CFDHSvPWYXVdMCLfGXtGiZpFvEFitnzp4j3IhQz LL0S/13LEiG9UrnwSvLZabsuvrbF+3YYhN0MYXSqBZSdNvBZdP5N3loTYAJUvEnAtMvwCC 4MV3EYPOAoJixm77AiMh0NXNc5G8XPPn1ZIsDa/uQYE5LZtAfDaFphzJJGRtI5/m32E6bu Bj1KvA3K31FGpqjQ65AFwLCQ2Fq9DVAmkqht/mj8bWrl/dY0dSKC6NLYxvZPeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lkkCxju5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=lkkCxju5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7A87516294 X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: mv+Y3ABa/jsT Hi, On Thu, 30 Sept 2021 at 10:37, Maxime Devos wrote: > The list of importers is only needed for two purposes, right? > > 1. to print a list of importers when "guix import --help" is run > 2. to verify the string actually specifies an importer > > Then 'guix import SOME-IMPORTER STUFF' could be optimised: > > reolve-importer and guix-import could be modified to skip the validation > step and let resolve-importer print the error if the module couldn't be > found. Possibly (resolve-module '(the possibly undefined module) #:ensure #f) > might be useful. Then 'importers' would only be required for purpose (1), > so it could be wrapped in a promise, such that if "guix import some-importer stuff" > is called, only the required importer module is loaded. My comment is about the elegance vs the performance loss. On old machines, Guix is becoming unpractical for many operations (almost all the operations indeed) and I would not add another slowness. I am fine to sacrifice some performances if it is worth. However, the balance is always: what is gain and what is loss? Here the gain is small code elegance against the performance lost for end-user. The question: does it worth? From my point of view, no, this change is not worth. For what my opinion is worth here. ;-) Cheers, simon