-
Notifications
You must be signed in to change notification settings - Fork 62
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
[CI] Prelude.hs does not always rebuild when Prelude.sawcore is changed #1856
Comments
I believe this is an unfortunate limitation of Template Haskell's ability to detect when files need to be recompiled. In particular:
I believe the typical way to work around this issue is by calling Template Haskell's |
I did a bit of digging, and it looks like we actually do use (at least a version of)
This makes sense, because on my local machine, cabal does seem to always know to rebuild |
My theory is that the main build is building saw and uploading it (https://github.com/GaloisInc/saw-script/blob/master/.github/workflows/ci.yml#L212), then the mr-solver-tests job is downloading that same artifact (https://github.com/GaloisInc/saw-script/blob/master/.github/workflows/ci.yml#L245). If there were local changes, then saw gets rebuilt, overwriting that artifact and you get the good tests, but if there were no local changes, the artifact version runs. Since the artifact name does not include the branch, you probably get the one uploaded from main (but who knows?). To test this, I'd change the name (line 216, line 247, line 281, line 348, line 408, line 567, and anywhere else I missed) to include the branch (e.g. If the above fixes it for you, I think we definitely need it because it could be affecting other things here as well. |
Unfortunately, these errors are now occurring on the |
Crap. Well maybe we ought to push a hotfix which changes the name of Of course there's still the deeper problem of why |
Just wanted to add as a datapoint that I've seen this issue locally of cabal not rebuilding the prelude when only |
A few other things I found:
|
Looks like the fix went out in Cabal 3.10.1.0. I use Cabal 3.8 locally, so that could be the reason? |
Interesting, I hadn't considered the possibility of this happening due to a saw-script/.github/workflows/ci.yml Line 71 in fad48d8
It might be worth bumping that to see if that makes a difference. |
Very interesting @bboston7! Somehow I get away with using cabal 3.4.0 – so maybe I'm on an old enough version that these features still work for me locally? |
Cruelly, there is a different bug in |
Updating to |
Testing in #1861! |
That's unfortunate news about cabal, but I'm also worried that maybe we have two problems here: |
After a discussion with @kquick, we've agreed that the primary issue ( @kquick is separately looking into whether the lack of branch information on the |
I noticed while working on #1849 that it appears
Prelude.hs
does not always rebuild on CI whenPrelude.sawcore
is changed on the branch relative tomaster
.Specifically, it appears that every commit which does not itself change
Prelude.sawcore
orPrelude.hs
uses a cached version ofPrelude.sawcore
frommaster
– even when the branch as a whole relative tomaster
does changePrelude.sawcore
.Here's the timeline of commits and CI passes/failures that makes me suspect this:
Prelude.sawcore
andmr-solver-tests
such thatmr-solver-tests
will fail if the version ofPrelude.sawcore
frommaster
is usedPrelude.sawcore
, but also does not changemr-solver-tests
in any way that should make it fail – howevermr-solver-tests
fails! The failure seems to indicate that thesaw
executable used formr-solver-tests
has the version ofPrelude.sawcore
from master (test_fun0
was imported fromPrelude
).Prelude.sawcore
in a way which should have no impact onmr-solver-tests
, but nowmr-solver-tests
passes again!Prelude.sawcore
ormr-solver-tests
, but nowmr-solver-tests
fails – in the same way which indicates that thePrelude.sawcore
used is the one frommaster
.Prelude.hs
, and the result was thatmr-solver-tests
passes (unfortunately I deleted this commit by force-pushing in an attempt to clean up the branch, but you can still see the CI run).As I wrote all this out I realized that based on my hypothesis, the force-push cleanup I did will not actually work because I didn't change
Prelude.sawcore
orPrelude.hs
in my last commit – so we'll see what happens.Tagging @RyanGlScott and @kquick because I think maybe you guys are the CI guys? If not, let me know who I should ping!
The text was updated successfully, but these errors were encountered: