From unknown Fri Jun 13 10:49:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#46303 <46303@debbugs.gnu.org> To: bug#46303 <46303@debbugs.gnu.org> Subject: Status: Typo helper doesn't always know which command is missing Reply-To: bug#46303 <46303@debbugs.gnu.org> Date: Fri, 13 Jun 2025 17:49:26 +0000 retitle 46303 Typo helper doesn't always know which command is missing reassign 46303 guix submitter 46303 Leo Famulari severity 46303 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 14:53:50 2021 Received: (at submit) by debbugs.gnu.org; 4 Feb 2021 19:53:50 +0000 Received: from localhost ([127.0.0.1]:42310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7khK-0000oI-0r for submit@debbugs.gnu.org; Thu, 04 Feb 2021 14:53:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:55926) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7khG-0000o6-RH for submit@debbugs.gnu.org; Thu, 04 Feb 2021 14:53:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7khG-00026q-GZ for bug-guix@gnu.org; Thu, 04 Feb 2021 14:53:46 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:56587) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7khE-0003S8-Oq for bug-guix@gnu.org; Thu, 04 Feb 2021 14:53:46 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8B9C95C0087; Thu, 4 Feb 2021 14:53:43 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 04 Feb 2021 14:53:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=E+VeGl9Axk0kkkjNT64zGW5V cTaVfOFLRIVKdmDW8Dg=; b=BnfHZHKKo2yg8q1sNhGCR6AmGPChqTUCzdHreeBq Mu4gHJFJTXkunJr04sxcn52IfJ+jInYZxhmAJuKrdgnz00Ul6PMTUKLAgnN0uUAt RJH+eqOl1VDsSS/xJM1HPwd1sHBM99/8WR0ApkxBo4PJgHHSTeznnUz1ldlublHS HYg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=E+VeGl 9Axk0kkkjNT64zGW5VcTaVfOFLRIVKdmDW8Dg=; b=vYc7yVYKHA1BMptimROgF5 9Glhos0Pd9RhlB8HwUjRXgp3+QHFuZJ+x8sZTi8TTBjVDt3p8vIqonHUgfx89my2 YmR0qfJv87kAIenJiVUMXpJB9Qfd4ORD67nn1gL8nvoUlnbVP1l9QeO+6vEroZTz paUtd8GNANvsp6aVJOLRujErOFwIxvYZrhVPbP05wc5SEhsSdzBWTBQiNHwddGJf e5ZDoBSQBVB/6wUSK6TLiDNWOr2RigmSzp5L2eQT+tgvs9i3Uls6wgk/TeiqRvzX UepO8orlK32H2+Ncf2G/iIqtAdmELbAeOaZTBXHXOmz1dhseIXLCaw8cMtNt/unw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeeggdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre dttddtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhepvddvudegffefiedttdfhfedvuefhgf ekieekgeekveetgefhfeetgfegueduffeinecuffhomhgrihhnpehgnhhurdhorhhgnecu kfhppedutddtrdduuddrudeiledruddukeenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpehlvghosehfrghmuhhlrghrihdrnhgrmhgv X-ME-Proxy: Received: from localhost (pool-100-11-169-118.phlapa.fios.verizon.net [100.11.169.118]) by mail.messagingengine.com (Postfix) with ESMTPA id 2A5731080064; Thu, 4 Feb 2021 14:53:43 -0500 (EST) Date: Thu, 4 Feb 2021 14:53:41 -0500 From: Leo Famulari To: zimoun Subject: Typo helper doesn't always know which command is missing Message-ID: References: <20210115163732.53665-1-zimon.toutoune@gmail.com> <20210119212810.20681-1-zimon.toutoune@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210119212810.20681-1-zimon.toutoune@gmail.com> Received-SPF: pass client-ip=66.111.4.29; envelope-from=leo@famulari.name; helo=out5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: bug-guix@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) On Tue, Jan 19, 2021 at 10:28:08PM +0100, zimoun wrote: > * guix/utils.scm (string-distance): New procedure. > (string-closest): New procedure. > * tests/utils.scm: Test it. This is a great feature, but I found a tricky failure: ------ $ ./pre-inst-env guix system vm --no-grafts doc/os-config-bare-bones.texi --substitute-urls=https://ci.guix.gnu.org -d guix: system: command not found hint: Did you mean `system'? Try `guix --help' for more information. $ guix environment guix $ ./pre-inst-env guix system vm --no-grafts doc/os-config-bare-bones.texi -d /gnu/store/pw453xpixcll02w1nz9mfggm2cn0jqpx-run-vm.sh.drv ------ It will only be seen by developers, so not a big deal, but it would still be nice to correctly report which command is missing. Some run-time dependency of guix is missing. From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 04 16:39:13 2021 Received: (at submit) by debbugs.gnu.org; 4 Feb 2021 21:39:13 +0000 Received: from localhost ([127.0.0.1]:42392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7mLI-0005QK-MG for submit@debbugs.gnu.org; Thu, 04 Feb 2021 16:39:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:54068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l7mLG-0005QC-Au for submit@debbugs.gnu.org; Thu, 04 Feb 2021 16:39:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:55620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l7mLG-0008Gt-3h for bug-guix@gnu.org; Thu, 04 Feb 2021 16:39:10 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]:34028) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l7mL9-0000rg-1u for bug-guix@gnu.org; Thu, 04 Feb 2021 16:39:09 -0500 Received: by mail-wr1-x42f.google.com with SMTP id g10so5339633wrx.1 for ; Thu, 04 Feb 2021 13:39:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=oidguQiXf/qg28XF12p7wmSWiVsyux5jxhY7CSCfIKI=; b=S2QrzAVSo7otjZpJReX2rXSf7LaZxBv/vA1YABfKSo8PXyEro4tx2pE26tJjpaP74B AMDDLXjuRub7EmC7XJi0lddsjelsH4pzP67kI9N1Pur2RLMPWdakSSTXdkIz2ywZi82/ d/Ktlvr2TRW7aVmqOigIg+vF50ap1cTyjtphTr/3MdXFVSUARWdrIGLL9evR7ZKk2UJM gXVMjqElL6CrawRB7dWs0TYMhtkQB4tVzx4VrKMn8503Hon0236njNuFpGiFgb7t7oYX CCj4iSazjqKxZE/6KvGN07ybcS3DWLVqbdGaeqMHKc0aRBnMfuMtmqrfBowCCtMg0gng yvNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=oidguQiXf/qg28XF12p7wmSWiVsyux5jxhY7CSCfIKI=; b=hWLCELy1v+fmmgeoDwmDhtIPmZF3C47Dx/UiDLZNP5xexBj2w3qSHBUmlIkgfb0UQt MF1VzBIbY9DrWyR1S8+ig4XTJjMkotonMZXtoN+PvA9Elr2BEFYqTq7/MbKkjQctGb6s DtboYJv/InU8F77S6vRF2LXzgFTYtVcqZwOniTvnXDg9KC7FsjjoHVtrM5UD3B5uiGln AEq88MEPX08VuWM3yniuHegUBDBktDh5TC8Xrg9OhdbGVDYdtFEobkPio82n6SQwcx0L uMkDWoJrw5mbDcIlxyBp5DnKeVqGYuKMJQt4hE4bvsQPN0rbbD1mzB6ZuHU0vnNbLs1c E8KQ== X-Gm-Message-State: AOAM533Fz6Pp0bVAYlxJJdxu6uhKOo2Cyc03XxBQraroIXli1slJsb4O Q71NasAuXKyYDWJrn06jmB/PE/Gfq+4= X-Google-Smtp-Source: ABdhPJxOM1oRVq0nbIb6zmX7t+/i6Y5+wO0BcuD7w16VmSywNdow77Ocue/lhk/667e5RlsS9IKH1A== X-Received: by 2002:adf:c6c1:: with SMTP id c1mr1469722wrh.326.1612474741595; Thu, 04 Feb 2021 13:39:01 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id d10sm9505721wrn.88.2021.02.04.13.39.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Feb 2021 13:39:01 -0800 (PST) From: zimoun To: Leo Famulari Subject: Re: Typo helper doesn't always know which command is missing In-Reply-To: References: <20210115163732.53665-1-zimon.toutoune@gmail.com> <20210119212810.20681-1-zimon.toutoune@gmail.com> Date: Thu, 04 Feb 2021 22:29:52 +0100 Message-ID: <86tuqrbjxr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: bug-guix@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi Leo, On Thu, 04 Feb 2021 at 14:53, Leo Famulari wrote: > On Tue, Jan 19, 2021 at 10:28:08PM +0100, zimoun wrote: >> * guix/utils.scm (string-distance): New procedure. >> (string-closest): New procedure. >> * tests/utils.scm: Test it. > > This is a great feature, but I found a tricky failure: > > ------ > $ ./pre-inst-env guix system vm --no-grafts doc/os-config-bare-bones.texi= --substitute-urls=3Dhttps://ci.guix.gnu.org -d > guix: system: command not found=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > hint: Did you mean `system'? > > Try `guix --help' for more information. > $ guix environment guix > $ ./pre-inst-env guix system vm --no-grafts doc/os-config-bare-bones.texi= -d > /gnu/store/pw453xpixcll02w1nz9mfggm2cn0jqpx-run-vm.sh.drv > ------ > > It will only be seen by developers, so not a big deal, but it would > still be nice to correctly report which command is missing. Some > run-time dependency of guix is missing. I am missing, because the command line is not wrong. :-) Well, I am missing what you are suggesting. I mean if =E2=80=9C./pre-inst-= env guix =E2=80=9D is run in an incorrect environment, then, I am not sure= what could be done. How does it work with a commit which predates the hint introduction? How does it fail? I guess it fails, if not I am missing something. :-) Basically, when =E2=80=9Cguix system=E2=80=9D is called (or any other comma= nd), it enters in =E2=80=99run-guix-command=E2=80=99 and does this snippet: --8<---------------cut here---------------start------------->8--- (catch 'misc-error (lambda () (resolve-interface `(guix scripts ,command))) (lambda _ (let ((hint (command-hint command (commands)))) (format (current-error-port) (G_ "guix: ~a: command not found~%") command) (when hint (display-hint (format #f (G_ "Did you mean @code{~a}?") hint))) (show-guix-usage))))) --8<---------------cut here---------------end--------------->8--- Therefore, it means that =E2=80=9C(resolve-interface `(guix scripts ,comman= d))=E2=80=9D fails for some reasons. It seems really hard to catch the reasons. Well, this cannot happen with regular =E2=80=9Cguix =E2=80=9D otherwis= e it is severe bug. And in a developer setup, so much stuff could be wrong. Well, these run-time dependencies could be checked by the script =E2=80=9C./pre-inst-env=E2=80=9D but I do not know if it is worth. Could you explain more what you would like? On a side note, trying I get that the hint seems to work=E2=80=A6 --8<---------------cut here---------------start------------->8--- $ guix system vm --no-grafts ~/src/guix/guix/doc/os-config-bare-bones.texi = --substitute-urls=3Dhttps://ci.guix.gnu.org --dry-run --derivatio guix system: error: derivatio: unrecognized option hint: Did you mean `derivation'? --8<---------------cut here---------------end--------------->8--- =E2=80=A6but not work for all the options: --8<---------------cut here---------------start------------->8--- $ guix system vm --no-grafts ~/src/guix/guix/doc/os-config-bare-bones.texi = --substitute-rls=3Dhttps://ci.guix.gnu.org --dr-run --derivation guix system: error: substitute-rls=3Dhttps://ci.guix.gnu.org: unrecognized = option --8<---------------cut here---------------end--------------->8--- Another story than your report, right? Cheers, simon