Skip to content

Conditionals in project files, processed in order or not? #10706

Open
@phadej

Description

@phadej

If I have

packages:   indexed-traversable
packages:   indexed-traversable-instances
if impl(ghc <9.12)
  tests: False
  packages: indexed-traversable-benchmarks

tests:      True
benchmarks: True

it seems that with GHC-9.10 (i.e. when conditional is true), the tests are turned off, even lexically tests: True comes later.

This is consistent with how conditionals work in .cabal files (conditional sections processed as if they appear last), but it's undocumented in https://cabal.readthedocs.io/en/3.12/cabal-project-description-file.html#conditionals-and-imports so I report this as a bug.

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