Skip to content

cabal install run immediately after cabal build unnecessarily rebuilds the project #6919

@joeyh

Description

@joeyh

Describe the bug

I have just run cabal build. No source files have changed. I run cabal install (with some options), and it rebuilds the entire project from scratch.

To Reproduce

cabal unpack propellor-5.9.1
cd propellor-5.9.1
cabal build
cabal install --install-method=symlink --installdir=. exe:propellor --overwrite-policy=always

I notice that, if I cabal build exe:propellor, the cabal install does not re-build.
The default cabal build of both executables and the library differing from what's it's being asked to install seem to be what causes the re-build. I think it should be possible to build everything and then only install part of what was build, without a rebuild.

System information

cabal-install version 3.0.0.0
compiled using version 3.0.1.0 of the Cabal library 

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