Ticket #949 (new enhancement)

Opened 13 months ago

cabal should fail if compilation depends on a file not existing in the cabal file

Reported by: LeventErkok Owned by:
Priority: normal Milestone:
Component: cabal-install tool Version: 1.10.2.0
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform:

Description

Cabal doesn't complain if the build depends on a Haskell module that exists in the filesystem properly, but is not mentioned in the cabal file itself as part of "exposed-modules" or "other-modules". The build succeeds because ghc can find the relevant file just fine.

I've got bitten by this several times, especially after pushing a package to hackage, only to get it fail to build on the server because I've failed to put the name of a file in the appropriate section of the cabal file, thus it didn't make it to the .tar.gz bundle that got uploaded to the server.

I realize this might be hard to ensure, as it would require a deeper look into the dependencies between modules, but I trust the GHC API should have all the information necessary for cabal to complain appropriately.

Note: See TracTickets for help on using tickets.