unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, Danny O'Brien <danny@spesh.com>,
	Brendan Tildesley <mail@brendan.scot>
Subject: Re: ‘guix environment’ vs. ‘.bash_profile’
Date: Wed, 16 Sep 2020 19:58:42 +0200
Message-ID: <87tuvxvc19.fsf@elephly.net> (raw)
In-Reply-To: <87363hmzx9.fsf@gnu.org>


Ludovic Courtès <ludo@gnu.org> writes:

> Hi!
>
> Danny O'Brien <danny@spesh.com> skribis:
>
>> Brendan Tildesley <mail@brendan.scot> 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.

The checks would have to be pretty self-contained and carefully ordered.
Imagine LD_LIBRARY_PATH is set to something terribly incompatible: we
might not even be able to launch Guile then!  These tests would also
have to work for older Guixes, e.g. when “guix pull” was used but the
effective “guix” command is /usr/local/bin/guix or even
~/.guix-profile/bin/guix (from a misguided invocation of “guix install
guix”).

This is really tricky to get right when you can’t trust the execution
environment.

> For example, ‘guix’ displays hints for unbound variables or misnamed
> modules because these are common mistakes.

I think these hints are excellent!  I’m often surprised at how good and
useful they are.

I have sometimes been frustrated with the lack of *any* output in case
of errors.  It is possible to get Guix to just print an obscure error
and get neither a backtrace nor a hint.  Of course I can’t remember now
how to replicate this, but this could be a good exercise for new
contributors: do whatever you can to make Guix barf!

One thing that usually only hits contributors is a barrage of unrelated
error messages (with repeated hints to include different modules) that
culminate in something silly like “unknown package” for an unrelated
package that obviously exists.  I’m sure you’ve also encountered this
before while adding or upgrading packages.

-- 
Ricardo


  reply	other threads:[~2020-09-16 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-13  5:24 Brendan Tildesley
2020-09-13 21:22 ` Danny O'Brien
2020-09-16 16:47   ` Ludovic Courtès
2020-09-16 17:58     ` Ricardo Wurmus [this message]
2020-09-16 20:17   ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2020-09-12 12:49 Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87tuvxvc19.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=danny@spesh.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=mail@brendan.scot \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of guix-devel@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-devel/0 guix-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-devel guix-devel/ https://yhetil.org/guix-devel \
		guix-devel@gnu.org
	public-inbox-index guix-devel

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.devel
	nntp://news.gmane.io/gmane.comp.gnu.guix.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git