From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhuIY-00089o-HP for guix-patches@gnu.org; Tue, 24 Jul 2018 06:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhuIU-000440-Fe for guix-patches@gnu.org; Tue, 24 Jul 2018 06:12:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhuIU-00043u-BF for guix-patches@gnu.org; Tue, 24 Jul 2018 06:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fhuIU-0003Mg-4y for guix-patches@gnu.org; Tue, 24 Jul 2018 06:12:02 -0400 Subject: [bug#32192] [PATCH 0/7] Remove duplicated packages. Resent-Message-ID: From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87k1ptehfi.fsf@cbaines.net> <20180717210733.GC12949@jasmine.lan> <877elry3xo.fsf@gnu.org> Date: Tue, 24 Jul 2018 12:11:33 +0200 In-Reply-To: <877elry3xo.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Thu, 19 Jul 2018 11:23:31 +0200") Message-ID: <8736w954fe.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Leo Famulari Cc: 32192@debbugs.gnu.org ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > It=E2=80=99s terrible to see there were so many duplicate packages. > > The package lookup machinery detects and warns about same-named packages > when you do things like: > > (define-public var1 > (package (name "something") =E2=80=A6)) > (define-public var2 > (package (name "something") =E2=80=A6)) > > The problem here is that duplicates were in the same module and using > the same variable name, such that the second definition would shadow the > first one, and so Guix only sees one package. > > I think we should add a warning in the compiler for this situation. Done! https://git.savannah.gnu.org/cgit/guile.git/commit/?h=3Dstable-2.2&id=3Db= dcd0ba8a71af24f0b64d7acac3130d8f541d26c Now you get warnings like this: --8<---------------cut here---------------start------------->8--- $ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-topleve= l gnu/packages/haskell.scm gnu/packages/haskell.scm:9224:0: warning: shadows previous definition of `g= hc-th-lift-instances' at gnu/packages/haskell.scm:5437:0 gnu/packages/haskell.scm:9306:0: warning: shadows previous definition of `g= hc-time-locale-compat' at gnu/packages/haskell.scm:2591:0 wrote `/data/src/guile-2.1/cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/gu= ix/gnu/packages/haskell.scm.go' $ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-topleve= l gnu/packages/emacs.scm gnu/packages/emacs.scm:8704:0: warning: shadows previous definition of `ema= cs-load-relative' at gnu/packages/emacs.scm:3467:0 gnu/packages/emacs.scm:9648:0: warning: shadows previous definition of `ema= cs-csv-mode' at gnu/packages/emacs.scm:7390:0 wrote `/data/src/guile-2.1/cache/guile/ccache/2.2-LE-8-3.A/home/ludo/src/gu= ix/gnu/packages/emacs.scm.go' --8<---------------cut here---------------end--------------->8--- This will be in Guile 2.2.5. Ludo=E2=80=99.