Skip to content

Stack fails to rebuild output executable if deleted #3083

@ndmitchell

Description

@ndmitchell

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions