From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: [PATCH] Clean all .go in clean-go Date: Thu, 01 Sep 2016 03:10:25 +0200 Message-ID: <8760qgjugu.fsf@gnu.org> References: <20160831232034.13748-1-ericbavier@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfGWd-0006Al-Io for guix-devel@gnu.org; Wed, 31 Aug 2016 21:10:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfGWc-0005VQ-5u for guix-devel@gnu.org; Wed, 31 Aug 2016 21:10:39 -0400 In-Reply-To: <20160831232034.13748-1-ericbavier@openmailbox.org> (Eric Bavier's message of "Wed, 31 Aug 2016 18:20:33 -0500") 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: Eric Bavier Cc: guix-devel@gnu.org, Eric Bavier Hello, Eric Bavier writes: > 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 `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? 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. -- Mathieu Lirzin