If I run stack clean && stack build --profile , I get an executable that is slower than if I ran stack clean && stack build , this is normal and normal.
If I run stack clean && stack build --profile && stack build , then I get an executable file that is also slow and this persists until I run stack clean && stack build
I set the rebuild-ghc-options: true option to stack.yaml, but I either donβt understand how to use the stack correctly, or I use it incorrectly because I donβt have a clear mental model of what state the stack build starts. Does this explicitly affect future builds until I run stack clean , does that also affect dependencies? How can I make sure that when I create with the default settings, I get the same executable every time?
Edit: Let me be clear, I understand what happens mechanically, I understand that the stack build only repairs what needs to be rebuilt, the fact is that if I run stack build , then I want it to rebuild everything, what is required to build the release, and if I just built with profiling, which means rebuilding everything, let it be.
Edit 2: Well, I know that the stack has no idea about release builds or profiling, etc., that there is no fundamental difference, but --profile just changes the ghc flags? I suppose I'm asking why not rebuild-ghc-options do what it says on tin? If ghc options change, why not completely rebuild the project? What does this flag do?
haskell haskell-stack
Kyren
source share