Skip to content

stack build copies unnecessary executables when asked to build just a single executable #3486

@athas

Description

@athas

General summary/comments (optional)

Steps to reproduce

  1. Have a repository with several executable targets. Say, the project is foo, and the executables are exe1, exe2, exe3.
  2. Run stack build foo:exe3

Expected

Stack should build the exe3 target (and any dirty dependencies) and then only copy the exe3 binary from the .stack-work/dist/.../build/ directory to .stack-work/install/.../bin/.

Actual

Stack copies all executables in the package, even the ones with no changes and which it was not asked to copy, which is slow if there are a lot of them.

Stack version

$ stack --version
Version 1.5.1, Git revision 96e83a05fbeafb5cc3b1f52195433101c1f6ab8a x86_64 hpack-0.18.1

Method of installation

Via stack upgrade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions