Ticket #594 (new enhancement)

Opened 4 years ago

Last modified 17 months ago

Unhelpful error message for "module found in multiple packages"

Reported by: Tim <chevalier@…> Owned by:
Priority: normal Milestone: Cabal-2.0
Component: Cabal library Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: project(> week)
GHC Version: Platform:

Description

I was checking whether cabal-install would install my "extcore" package, and got:

$ sudo cabal install extcore --enable-library-profiling --reinstall
Resolving dependencies...
Configuring extcore-0.3...
Preprocessing library extcore-0.3...
Building extcore-0.3...

Language/Core/Core.hs:6:7:
    Could not find module `Data.Generics':
      it was found in multiple packages: base-3.0.3.1 syb
cabal: Error: some packages failed to install:
extcore-0.3 failed during the building phase. The exception was:
exit: ExitFailure 1

This is an unhelpful error message because it gives the user no information about what they have to do to continue. Since I'm the package author, I was able to figure out that I needed to change the .cabal file to depend on base >= 4. In general, the error message should explain that this is a bug in the package description and to report it to the package maintainer.

cabal-install 0.6.2, library version 1.6.0.3.

Change History

Changed 4 years ago by guest

  • reporter changed from guest to Tim <chevalier@…>

Changed 4 years ago by duncan

  • difficulty changed from unknown to project(> week)
  • component changed from cabal-install tool to Cabal library
  • milestone set to Cabal-2.0

There's very little we can do about this until Cabal does the dependency tracking itself rather than leaving it to ghc --make.

In the mean time it might be possible to get ghc to report a more helpful error message. Against my better judgement, ghc recently added a flag to distinguish whether it is being called by cabal or by the end user so that it can target error messages better.

Changed 17 months ago by elga

Note: See TracTickets for help on using tickets.