Ticket #2330 (closed bug: fixed)

Opened 6 months ago

Last modified 2 months ago

ghc-pkg should not report duplicate depends

Reported by: duncan Assigned to: simonmar
Priority: normal Milestone: 6.10 branch
Component: Compiler Version: 6.8.2
Severity: normal Keywords:
Cc: Difficulty: Unknown
Test Case: Operating System: Unknown/Multiple
Architecture: Unknown/Multiple

Description

$ ghc-pkg field regex-base-0.72.0.1 depends
depends: base-3.0.1.0 array-0.1.0.0 base-3.0.1.0 bytestring-0.9.0.1

Note the base-3.0.1.0 base-3.0.1.0. This is clearly silly. It causes problems for Cabal. Although we can easily work around this using nub it'd be better if duplicate depends were never reported or better yet rejected or eliminated at package registration time.

(I'm not sure how it ended up this way, I don't think Cabal makes package registration files with duplicate depends)

Change History

06/30/08 17:19:24 changed by igloo

  • difficulty set to Unknown.
  • milestone set to 6.10 branch.

I can't reproduce this; in the HEAD:

$ ghc-pkg field regex-base-0.72.0.1 depends
depends: array-0.1 base-3.0 bytestring-0.9

and with 6.8.2:

$ ghc-pkg field regex-base-0.72 depends    
depends: base-3.0.1.0 bytestring-0.9.0.1 array-0.1.0.0

Can you give instructions for reproducing it, please?

07/02/08 05:37:54 changed by duncan

My guess is to make a ghc-pkg registration file with a duplicate value in the 'depends' field and then register that package.

Really it'd be better if it were rejected at registration time.

08/13/08 07:36:09 changed by simonmar

  • owner set to simonmar.

08/18/08 05:34:49 changed by simonmar

  • status changed from new to closed.
  • resolution set to fixed.

Fixed:

Mon Aug 18 12:24:34 BST 2008  Simon Marlow <marlowsd@gmail.com>
  * Test for and reject duplicate dependencies (#2330)

09/30/08 08:40:37 changed by simonmar

  • architecture changed from Unknown to Unknown/Multiple.

09/30/08 08:51:50 changed by simonmar

  • os changed from Unknown to Unknown/Multiple.