Hello,
I took the habit of managing my post-install setup things in the Setup.hs. The advantages are clear: it's coded in haskell, and it has access to the app data directory, where the binary will get installed.
I'm using it now for instance, to copy the QML data files and icons that a haskell QML application needs to the installation folder.
This all worked well until recently, but now stack started optimizing the build a lot, and if it detects that no haskell files changed, it won't re-trigger the Setup.hs. That obviously doesn't work for me, because I'd like my QML files and icons to get copied every time I run stack install during development. stack is so smart that not even touch Setup.hs or of another .hs file
helps to re-trigger its execution. I must physically change the contents
of one file.
I can't find a flag for stack that would trigger just the Setup.hs and nothing else (or little else; certainly 'clean' and '--reconfigure' force rebuilding too many things). How should I do that? Should I write a shell script? I found I could leverage 'stack path' to get the installation folder, but it's less portable that the haskell in my Setup.hs?
Thank you,
Emmanuel