Not often, but once in a while I will run into some filesystem corruption or similar, which removes a couple files in stack’s local file cache. For example:
haskell-src-exts> happy: ~/.stack/snapshots/x86_64-linux-nix/c1905bb1b17a991e3ffae2ea917ec6a38b82e6dcad26b163aaf8bfe9fb27ebb0/8.8.3/share/x86_64-linux-ghc-8.8.3/happy-1.19.12/HappyTemplate-arrays-coerce: openFile: does not exist (No such file or directory)
-- While building package haskell-src-exts-1.22.0 using:
~/.stack/setup-exe-cache/x86_64-linux-nix/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.3 --builddir=.stack-work/dist/x86_64-linux-nix/Cabal-3.0.1.0 build --ghc-options " -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
Progress 1/4
In particular: openFile: does not exist (No such file or directory
. A file (or a couple) are missing. Can stack review and repair? Or is there a thing I can do to trigger the rebuild for the problem package(s)?
I can reset the cache, and in the past I may have even reset the one problem package, but I never remember what to do for a simple/precise fix when stack finds some files are missing. Is this where I should be using stack clean
, removing some file/directory, editing some JSON file, or some other stack foo
command?
Thanks