From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH] Clean all .go in clean-go Date: Thu, 1 Sep 2016 20:30:35 -0500 Message-ID: <20160901203035.1ea32dee@openmailbox.org> References: <20160831232034.13748-1-ericbavier@openmailbox.org> <8760qgjugu.fsf@gnu.org> <874m5zokwp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfdJk-0002Ah-T4 for guix-devel@gnu.org; Thu, 01 Sep 2016 21:30:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfdJg-00034b-Nn for guix-devel@gnu.org; Thu, 01 Sep 2016 21:30:51 -0400 Received: from smtp28.openmailbox.org ([62.4.1.62]:41284 helo=smtp13.openmailbox.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfdJf-00032c-Eq for guix-devel@gnu.org; Thu, 01 Sep 2016 21:30:48 -0400 In-Reply-To: <874m5zokwp.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org, Eric Bavier On Thu, 01 Sep 2016 14:37:58 +0200 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > Mathieu Lirzin skribis: >=20 > > Eric Bavier writes: > > =20 > >> From: Eric Bavier > >> > >> I encountered a runtime error recently while running `guix system > >> reconfigure`. Thinking this might be because of an ABI break I ran `m= ake clean-go && make` before trying again, with the same result. > >> > >> It turns out a module had been renamed, in this case fish.scm to shell= s.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 ha= d 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 erro= rs in > >> the future. =20 > > > > 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? =20 >=20 > Look, the fine manual already mentions it (info "(guix) Using the > Configuration System"). :-) >=20 > I=E2=80=99ve also been hit by what Eric describes though. However, the i= ndented > use case is that people use =E2=80=98guix pull=E2=80=99, in which case th= ey cannot have > this sort of problem; at worse they get =E2=80=9Cno code for module=E2=80= =9D 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. >=20 > > 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. =20 >=20 > 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