Skip to content

Spurious duplicate modules error #7525

Closed
@Bodigrim

Description

@Bodigrim
name:          duplicate-modules
version:       0.0
cabal-version: 2.0
build-type:    Simple
category:      NA
maintainer:    NA
synopsis:      NA
description:   NA NA
license:       BSD3
license-file:  LICENSE

flag expose

library
  default-language: Haskell2010
  if flag(expose)
    exposed-modules: Foo
  else
    other-modules: Foo

cabal check is unhappy with this:

Warning: The package will not build sanely due to these errors:
Warning: Duplicate modules in library: Foo
Warning: Hackage would reject this package.

I understand that it's a tricky situation for cabal and that potentially there could be exponentially many flag combinations, but practically, when number of flags is < 5, I'd expect cabal to evaluate all possible combinations and validate respective configurations independently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions