[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ‘guix environment’ vs. ‘.bash_profile’

From: Ludovic Courtès
Subject: Re: ‘guix environment’ vs. ‘.bash_profile’
Date: Wed, 16 Sep 2020 18:47:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)


Danny O'Brien <> skribis:

> 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.

Interesting.  Any idea how this particular issue could be checked for?
If we can come up with an automated way to determine that “something’s
wrong”, we might as well get ‘guix environment’ to display a hint.

> 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.

I see.

> 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.

Yes, I very much admire what the Elm folks (and also the GCC folks,
closer to me) have achieved in recent years.

> 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.

We’ve tried to follow the trend above.  :-)  We’re still very far from
the quality of Elm or recent GCC messages, but I think that, as you
write, we can iterate on specific error messages and gradually improve
them, add hints, and so on.

For example, ‘guix’ displays hints for unbound variables or misnamed
modules because these are common mistakes.  Let’s collect more of those
“common mistakes” and improve the way they are reported.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]