Skip to content

LocalBuildInfo should change at build time when components are selected #2910

Open
@enolan

Description

@enolan

You can specify which components to build like this: runhaskell Setup.hs build my-testsuite. But since LocalBuildInfo is generated at configure time, the componentsConfigs field list every component that was enabled then. This means you can't check whether certain components are being built.

I ran into this trying to update my PR #2844. cabal-install's Setup.hs builds the manpage in a postBuild hook. If we're haven't built cabal yet and dist/build/cabal doesn't exist, then the openFile call to write dist/build/cabal/cabal.1 will fail. We need to only try to make the manpage when building the executable component but it's impossible to find out at this stage.

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