From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aCnuGwuOXl+EcAAA0tVLHw (envelope-from ) for ; Sun, 13 Sep 2020 21:24:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8NU3FguOXl/tRQAAbx9fmQ (envelope-from ) for ; Sun, 13 Sep 2020 21:24:27 +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 27E8E94050D for ; Sun, 13 Sep 2020 21:24:27 +0000 (UTC) Received: from localhost ([::1]:40404 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHZU1-00006P-TQ for larch@yhetil.org; Sun, 13 Sep 2020 17:24:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50676) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHZS8-0007pB-L4 for guix-devel@gnu.org; Sun, 13 Sep 2020 17:22:28 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:61951) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kHZS6-0003mE-Ca; Sun, 13 Sep 2020 17:22:28 -0400 X-Originating-IP: 67.180.193.214 Received: from spesh.com (c-67-180-193-214.hsd1.ca.comcast.net [67.180.193.214]) (Authenticated sender: outgoing@spesh.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 21B5540003; Sun, 13 Sep 2020 21:22:19 +0000 (UTC) References: User-agent: mu4e 1.4.13; emacs 27.1 From: Danny O'Brien To: Brendan Tildesley Subject: Re: =?utf-8?Q?=E2=80=98guix_environment=E2=80=99?= vs. =?utf-8?Q?=E2=80=98=2Ebash=5Fprofile=E2=80=99?= In-reply-to: Date: Sun, 13 Sep 2020 14:22:14 -0700 Message-ID: <874ko14bjt.fsf@spesh.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: none client-ip=217.70.183.194; envelope-from=danny@spesh.com; helo=relay2-d.mail.gandi.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/13 13:34:55 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 13 Sep 2020 17:24:13 -0400 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@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; 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.01 X-TUID: LA9Xy1kci3Pj Brendan Tildesley writes: > Doom Emacs has a tool `doom doctor' for diagnosing common > errors. Perhaps there > could be a `guix doctor' that would check for such things. `guix > offload test' > is already somewhat like that but for offloading, althought it > could improve. > Any bug report from a user where the solution is to tell them to > fix their > environment instead of changing guix could also have a check > added to guix > doctor. Also, we could collect knowledge on aspects of GNU/Linux > that are unique > to Guix that one often doesn't learn about on other > distributions and include a > page in the manual. for example I never had any use for sudo -E > or sudo -i > until I started using Guix. > I was going to suggest the same thing -- a "guix doctor" would have helped me a great deal when I was struggling to set up guix at the very start. Also because I share my shell and other configuration files across distributions, it's not uncommon for me to fix something in another distribution which causes repeated trouble in guix (or vice-versa!). So a program that I could repeatedly re-run to identify a root cause (or even run as a test to check that a change doesn't break guix) would be great. Just something that can tell you "oh, your environment variables aren't what I would expect, here is what I think may be wrong" would be very useful. Another quick note: I've noticed a trend in a few FLOSS projects of spending some concentrated time on improving the usability of error messages. Elm and Rust are two examples that spring to mind. The strategy appears to be to collect common mistakes and their errors, and then iterate on making the error messages not only clearer about what has happened, but also provide concrete suggestions on what can be done to fix the problem -- to the extent of even providing suggested commands that would correct the error. https://elm-lang.org/news/compiler-errors-for-humans https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html I find Guix error messages to be very good on the whole, but I wonder if the strong connection between Guix and Guile might serve us well here. Clearer error messages in the REPL, informed by Guix usage and implemented by improving Guile error reporting, would benefit both immensely. And I think it might makes sense to do this in tandem with a more reactive "guix doctor" project. I'm not a great coder, but I make a lot of common mistakes, so happy to help in that respect! d.