Skip to content

Conditional sections in cabal.project can be silently ignored depending on cache state #8699

Closed
@Bodigrim

Description

@Bodigrim

On two separate occasions I've hit an issue with conditionals in cabal.project, which I nevertheless cannot reliably reproduce after cabal clean. Thus this ticket is likely for future reference only, maybe someone will be more lucky / persistent.

The issue I witnessed is that

if(impl(ghc >= 9.6))

section in cabal.project was ignored by cabal build -w ghc-9.6. The necessary (but not sufficient) preconditions seem to be that ghc in PATH is ghc-9.4 and there was a successful cabal build before (implicitly with GHC 9.4).

Cf. #7783 and #8358.

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