Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
stack build/test/bench --profile should recompile if previous compile was without --profile #2984
If you build without
Steps to reproduce
Stack builds two times, first without profiling options and then another time with.
Stack builds only once without profiling. It ignores the second build instruction because no files changed.
Method of installation
Hmm, I can't reproduce the issue:
It seems that it works only the first time. Try this:
I believe the issue here is that the library can be built / installed with both profiling and non-profiling versions. However, when it comes to executables / test-suites / benchmarks, there can only be one at a time. Stack doesn't realize that the executable was most recently built without profiling, and so it needs to rebuild the executable.
I think a fix to this would look something like:
I'm going to try doing something like this, hopefully it goes smoothly. It feels a little strange to special case profiling this way, but I think it's only necessary because it gets special cased elsewhere.
This would also help with another situation, where you build both