From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guillaume Le Vaillant Subject: Re: Question about sbcl-package->ecl-package Date: Wed, 16 Oct 2019 16:06:56 +0200 Message-ID: <87zhi0u6m7.fsf@yamatai> References: <871rvdujku.fsf@yamatai> <87k194zyt6.fsf@ambrevar.xyz> <20191016124745.GH1014@E5400> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34480) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKjx9-0003dj-KH for guix-devel@gnu.org; Wed, 16 Oct 2019 10:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKjx7-0005Dr-QF for guix-devel@gnu.org; Wed, 16 Oct 2019 10:07:03 -0400 Received: from mout02.posteo.de ([185.67.36.66]:34925) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKjx7-0005D7-8q for guix-devel@gnu.org; Wed, 16 Oct 2019 10:07:01 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id CE7742400FB for ; Wed, 16 Oct 2019 16:06:58 +0200 (CEST) In-reply-to: <20191016124745.GH1014@E5400> 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: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner skribis: > On Wed, Oct 16, 2019 at 01:59:01PM +0200, Pierre Neidhardt wrote: >> I've encountered the same problem a couple of times. >> If you try to compile ecl-dexador, you'll see it fails because it does >> not re-use the arguments of sbcl-dexador which patches out a failing >> test. >> >> Something is wrong in sbcl-package->ecl-package. >> Andy? >> >> That said, it's not a very big deal, since the cl- package works for all compilers. >> > > Sounds like the conversion isn't "recursive enough". On a per-package > basis you can replace the created ecl package with the real one. The > better option would be to look at how python defines python2- variants, > which sounds a lot like the problem you're having here. I suspect the problem comes from the 'rewrite' function used to change the package inputs. In 'guix/build-system/asdf.scm': --8<---------------cut here---------------start------------->8--- (define rewrite (match-lambda ((name content . rest) (let* ((is-package? (package? content)) (new-content (if is-package? (transform content) content))) `(,name ,new-content ,@rest))))) --8<---------------cut here---------------end--------------->8--- Won't '(transform content)' create a new ecl-package for each input package instead of trying to find the already defined ecl-package? Maybe it could be replaced by something like: --8<---------------cut here---------------start------------->8--- (let* ((sbcl-input-name (package-name content)) (ecl-input-name (transform-package-name sbcl-input-name)) (ecl-input-package (find-package ecl-name))) (if (package? ecl-input-package) ecl-input-package (transform content))) --8<---------------cut here---------------end--------------->8--- However, it's the first time I look at the internals of Guix, so I'm not sure if this would work or not... What do you think?