stack build creates two copies of the output executable
<p>I am new to stack and not all that proficient with cabal.</p>

<p>I have converted a cabal project to stack. It seems to be building fine. I like it so far.</p>

<p>But I have observed something that I do not understand. When I execute a stack build command I see two output executables get created. Both are in the .stack-work path with one under dist and the other under install. They have radically different sizes. The file in the dist path is almost twice the size of the one in the install path.</p>

<p>The only thing I can think of to explain this is the possibility that the executable file in the dist path includes (embeds within itself) all of the package dependencies required to run this code on a different machine (it is complete and ready for distribution to a different machine), while the file in the install path expects that it is running on the same machine where it was built and where those dependent libraries are installed external to the main application code.</p>

<p>Does that make sense?</p>

<p>Any alternative explanations?</p>

<p>Dave Smith</p>