commercialhaskell / commercialhaskell/stack

Stack fails to rebuild output executable if deleted

Open
#3,083 7 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

Using Stack 1.4.0 on Windows:

* Checkout HLint, `git clone https://github.com/ndmitchell/hlint.git && cd hlint`
* Create a stack.yaml, `stack init`
* Build it, `stack build`
* Find the exe, `stack exec where hlint` - says something like `c:\Neil\hlint\.stack-work\install\60f100ec\bin\hlint.exe`
* Delete the exe, `del c:\Neil\hlint\.stack-work\install\60f100ec\bin\hlint.exe`
* Rebuild it, `stack build` - nothing happens, but it should detect that the output file is missing and rebuild it.

I suggest that if the output file no longer exists then stack rebuilds the inputs. Note that Shake takes this approach for build rules, rebuilding if either the inputs _or the outputs_ have changed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.