-
Notifications
You must be signed in to change notification settings - Fork 848
stack build does not rebuild executable without other-modules #2341
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
Comments
Hey, thanks for the details! I tried
With Main.hs
and Lib.hs
Changes to Lib cause rebuild despite not being listed in other-modules.
I've documented some more of the flags there, good idea! |
@mgsloan: Thanks for trying to reproduce it. I take it from your response that this is not a known problem? Two things to add:
|
Also, thanks for improving the documentation. 💯 |
@spl I believe I've resolved the issue. Now, all local ghcjs packages will be assumed to be dirty, because we can't be sure. Please re-open and comment if the git version of stack doesn't solve the problem for you. |
Nicely done. I think that's a reasonable solution. Thanks! |
Welcome, thanks for bringing up the issue! |
This may be a known issue. If so, I think it could be documented better. I could not find a clear answer in the issue archive to match this, so, at the very least, this issue might help others who encounter the problem.
Steps to reproduce:
.cabal
for an executable.hs-source-dirs
field mentioning the source directories with the modules.other-modules
field with the modules listed.stack
from that.cabal
.stack build
the first time.stack build
to rebuild.Expected:
The project rebuilds.
Actual:
The project does not rebuild.
Discussion:
I couldn't figure out why my project wasn't rebuilding. Then, I found that if I include
other-modules
with a moduleM
and updateM
, the project would rebuild. If I then changeN
, a module not listed inother-modules
, the project would not rebuild.Related:
These issues seem to be related:
stack test
not detecting changes to the test suitestack test
not detecting changes to the test suite #556From my cursory reading, it seems like this issue was supposed to be fixed in:
There seems to be a currently undocumented
--force-dirty
flag added in 09a9fa4 to deal with this kind of issue.I believe I did see a warning for unlisted modules (added in 31712d3?), but I wasn't sure what the warning was for. I wasn't even sure what an “unlisted module” was. Why would unlisted modules be a problem? If this issue is the reason for that warning, then the warning text could be improved.
Questions:
If this is a known issue with no fix currently planned, could it be documented better or handled by
stack
?stack
and report it.The text was updated successfully, but these errors were encountered: