General summary/comments (optional)
Steps to reproduce
- Have a repository with several executable targets. Say, the project is
foo, and the executables are exe1, exe2, exe3.
- 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.