-
Notifications
You must be signed in to change notification settings - Fork 842
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
Failure to rebuild with stack build/test on change to executable source file (Main.hs) #691
Comments
Ok, this seems related to #481 (and its dup #671). Except, #481 says that stack "only" rebuilds when "Main.hs" changes... and this seems to be a case where it didn't EVEN rebuild when Main.hs changed! So perhaps this is a more basic failure of timestamp/modification handling. One very important fact that I neglected to mention is that I often run Nevertheless, I was not running this synchronization when the anomalous-seeming bash commands above were run. (But had been previously and the first time the failure occurred.) |
When you're able to reproduce, I recommend modifying the |
Will do. |
Ok, I got it again while using stack to build stack. What happened just now was that I was continuing to modify $ ./.stack-work/dist/x86_64-osx/Cabal-1.22.2.0/build/stack/stack build
TEMP: snap directory is: "/Users/rrnewton/.stack/snapshots/x86_64-osx/lts-2.17/7.8.4/"
$ But this was bogus, and I could tell because I'd just disabled that $ stack clean
$ stack build
...
$ ./.stack-work/dist/x86_64-osx/Cabal-1.22.2.0/build/stack/stack build
$ Which we can see because the last |
I'm going to be honest: I have no idea what this report means. |
Sorry, things are a bit self-referential because I'm reporting about problems using stack to build stack. But the point here was just that I know As soon as I figure out how to get it to print the timestamps, I'll include the output from that. |
Here is a repro. Following can be run as a shell script, preferably in an empty dir: stack new In the end it says there is nothing to build, while clearly it should report the compilation error in app/Foo.hs |
yes |
Given that #32 has been resolved with 0.1.3, can you confirm if this issue is also resolved? |
OK, it issues a warning about modules not listed in other-modules. It is sad to have to maintain that list though. |
That's the design of the cabal file format. We could discuss why it's designed that way exactly, but we are stuck with it. Closing as resolved. |
This was a failure not using a released version of stack, but using stack 7412e6b to work on stack itself.
Namely, this travis failure here, was due to
stack build
andstack test
returning successfully, and not rebuilding due to changes insrc/main/Main.hs
.Steps to reproduce:
In spite of having the exact commits available above, and running on the same machine I just observed this on (Mac OS laptop). I'm having difficulty reproducing this. What I can say is that before posting this I ran exactly these commands, which are still in my bash scroll back:
Expected output:
I would expect a law that change detection always ensures that
stack build; stack clean; stack build
does the same thing on the first and second stack builds.Actual output:
The first stack build and test "succeed" and the newly introduced type error is only detected after cleaning.
Lacking reproduction, I'm hoping someone has a hypothesis as to what may cause failures of update detection in the current architecture.
The text was updated successfully, but these errors were encountered: