-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stack build/test/bench --profile should recompile if previous compile was without --profile #2984
Comments
--profile
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 |
This actually gets rather tricky when you consider that it needs to apply to tests / benchmarks (located in |
Have switching on/off profiling cause package dirtiness #2984
If you build without
--profile
and then withstack
doesn't recompile the second time to create a binary with profiling options if no files have changed. This is in opposition toghc
behaviour. If you build without-prof
and then with,ghc
will recompile the second time even if no files changed.Steps to reproduce
For example:
stack clean && stack build
.stack build --profile
.Expected
Stack builds two times, first without profiling options and then another time with.
Actual
Stack builds only once without profiling. It ignores the second build instruction because no files changed.
Stack version
Method of installation
community/stack
.The text was updated successfully, but these errors were encountered: