all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Bavier <ericbavier@openmailbox.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, Eric Bavier <bavier@member.fsf.org>
Subject: Re: [PATCH] Clean all .go in clean-go
Date: Thu, 1 Sep 2016 20:30:35 -0500	[thread overview]
Message-ID: <20160901203035.1ea32dee@openmailbox.org> (raw)
In-Reply-To: <874m5zokwp.fsf@gnu.org>

On Thu, 01 Sep 2016 14:37:58 +0200
ludo@gnu.org (Ludovic Courtès) wrote:

> Mathieu Lirzin <mthl@gnu.org> skribis:
> 
> > Eric Bavier <ericbavier@openmailbox.org> writes:
> >  
> >> From: Eric Bavier <bavier@member.fsf.org>
> >>
> >> I encountered a runtime error recently while running `guix system
> >> reconfigure`.  Thinking this might be because of an ABI break I ran `make clean-go && make` before trying again, with the same result.
> >>
> >> It turns out a module had been renamed, in this case fish.scm to shells.scm,
> >> but I had overlooked this and failed to update the list of modules in my
> >> config.scm's (use-package-modules ...) statement.  However, I still had a
> >> stale fish.go sitting in my build directory, which `make clean-go` had failed
> >> to clean up, and guix happily loaded it.
> >>
> >> I believe the following patch is an appropriate way to avoid such errors in
> >> the future.  
> >
> > AIUI the main problem is that the API for defining "config.scm" is not
> > stable because of the package modules renames.  Since package names are
> > more stable, I think that configuration files should import (gnu
> > packages) and use 'specification->package' when possible to resolve
> > packages, instead of relying on the module names.  Maybe we should fix
> > the "config.scm" documentation?  
> 
> Look, the fine manual already mentions it (info "(guix) Using the
> Configuration System").  :-)
> 
> I’ve also been hit by what Eric describes though.  However, the indented
> use case is that people use ‘guix pull’, in which case they cannot have
> this sort of problem; at worse they get “no code for module” or similar.

Sure, but we also regularly recommend users to maintain a git checkout.

> When I use ./pre-inst-env, I feel like I have my wizard hat on and no
> safety belt.  ;-)

This is in fact what I do most times.

> 
> > In regards of the .go files remaining in the build directory, I agree
> > that this is not good, however I don't think it is worth trying to fix
> > this issue which equally applies to every file generated by Make.  Using
> > wildcards can be tempting in such cases but it can lead to accidental
> > file deletions which is worse IMO.  As a consequence I would prefer
> > keeping the current 'clean-go' rule.  
> 
> I sympathize with that.

How about simply printing  a warning if there are any .go files laying
around after a `make clean` or `make clean-go`?

`~Eric

  reply	other threads:[~2016-09-02  1:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-31 23:20 [PATCH] Clean all .go in clean-go Eric Bavier
2016-08-31 23:20 ` [PATCH] build: Clean all .go files " Eric Bavier
2016-09-01  1:10 ` [PATCH] Clean all .go " Mathieu Lirzin
2016-09-01 10:03   ` David Craven
2016-09-01 12:37   ` Ludovic Courtès
2016-09-02  1:30     ` Eric Bavier [this message]
2016-09-02 12:42       ` Ludovic Courtès
2016-09-16  5:15         ` Eric Bavier
2016-09-16  6:00           ` Leo Famulari
2016-09-20  5:20           ` Ludovic Courtès
2017-11-07  1:06           ` myglc2
2017-11-08 10:49             ` Vincent Legoll

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

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

  git send-email \
    --in-reply-to=20160901203035.1ea32dee@openmailbox.org \
    --to=ericbavier@openmailbox.org \
    --cc=bavier@member.fsf.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.