cabal check gives invalid duplicate modules warning #766

bos opened this Issue May 24, 2012 · 2 comments

2 participants

Haskell member

(Imported from Trac #776, reported by guest on 2010-12-11)

Given the Cabal file:

cabal-version: >= 1.2
build-type: Simple
name: test
version: 4.1
license: GPL
category: Test
author: Test
maintainer: Test
synopsis: Test
description: Test
flag extended-library
if flag(extended-library)
I get the cabal check output:

The following warnings are likely affect your build negatively:

  • Duplicate modules in library: Test These warnings may cause trouble when distributing the package:
  • A 'license-file' is not specified. The following errors will cause portability problems on other environments:
  • The package is missing a Setup.hs or Setup.lhs script. Hackage would reject this package.
The error about Test being duplicate is incorrect - the flag means it will occur at most once. This bug is annoying for Hoogle, which wants to have a library exposing internal details, mainly for documentation purposes, and a normal library as well.

Thanks, Neil

Haskell member

(Imported comment by @aslatter on 2010-12-11)

Hi Neil,

I frequently use the "cabal haddock --internal" for this sort of thing.

Take care,

Haskell member

(Imported comment by @dcoutts on 2010-12-11)

Note also that if we improve this test then your example will still be rejected, because conditionally exposed modules are not reasonable. The exported API is supposed to be independent of the flags, because by design we do not allow dependencies to specify flags (while you might imagine that's possible in principle, such dependencies could not be translated into distro packages).

@ttuegel ttuegel added invalid and removed bug labels Apr 23, 2015
@ttuegel ttuegel closed this Apr 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment