GNU bug report logs -
#32192
[PATCH 0/7] Remove duplicated packages.
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Tue, 17 Jul 2018 20:29:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
ludo <at> gnu.org (Ludovic Courtès) skribis:
> It’s 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") …))
> (define-public var2
> (package (name "something") …))
>
> 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=stable-2.2&id=bdcd0ba8a71af24f0b64d7acac3130d8f541d26c
Now you get warnings like this:
--8<---------------cut here---------------start------------->8---
$ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-toplevel gnu/packages/haskell.scm
gnu/packages/haskell.scm:9224:0: warning: shadows previous definition of `ghc-th-lift-instances' at gnu/packages/haskell.scm:5437:0
gnu/packages/haskell.scm:9306:0: warning: shadows previous definition of `ghc-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/guix/gnu/packages/haskell.scm.go'
$ /data/src/guile-2.1/meta/uninstalled-env guild compile -Wshadowed-toplevel gnu/packages/emacs.scm
gnu/packages/emacs.scm:8704:0: warning: shadows previous definition of `emacs-load-relative' at gnu/packages/emacs.scm:3467:0
gnu/packages/emacs.scm:9648:0: warning: shadows previous definition of `emacs-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/guix/gnu/packages/emacs.scm.go'
--8<---------------cut here---------------end--------------->8---
This will be in Guile 2.2.5.
Ludo’.
This bug report was last modified 6 years and 360 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.