-
Notifications
You must be signed in to change notification settings - Fork 37
Shake fails to rebuild recover from deleted libraries/integer-gmp/gmp/config.mk #433
Comments
The problem is Shake doesn't like you to declare a rule that builds two targets, and after running the rule, they aren't available. My guess is the rule that builds those two doesn't actually build those two files, but depends on something that does build those two files, and which you didn't dirty/delete. The solution would then be to make the rule directly build them. |
Right, it's unclear how to easily fix this. Here is the problematic line: https://github.com/snowleopard/hadrian/blob/master/src/Rules/Gmp.hs#L82 The https://github.com/snowleopard/hadrian/blob/master/src/Rules/Data.hs#L19 As you can see, it's a generic rule, handling all GHC packages, and we do not know upfront what will be the exact set of output files for a given package. We know for sure the rule will generate |
Yes, that makes sense and indeed it looks like that is what is happening here.
I'm not sure how to best reorganize the rules such that this property holds. It seems that It seems like the solution is to ensure that files generated by |
Whoops, indeed it look like we came to the same conclusion @snowleopard; your comment didn't show up until I had already submitted. |
That would be great; I'm currently doing what I can to make sure that the various build configurations work as expected in preparation for merging. |
@bgamari Aha, we're on the same page :-) Here's what I propose:
If you're up to implementing this, go ahead without waiting for me, otherwise I'll pick this up later. |
While trying to fix this I got the following Shake error:
As a workaround, I modified the last pattern to start with the
The file @bgamari One possible solution is to move |
Yes, this sounds reasonable to me. In principle
I get a bunch of files in Unfortunately, I'm not sure it will be easy to convince Cabal to do this. @hvr, @ezyang, is there any way to get Cabal's |
While testing my fix for #432 I tried deleting
libraries/integer-gmp/gmp/config.mk
to force Hadrian to reconfiguregmp
. However, instead of rerunningconfigure
Shake fails with a perplexing error,Indeed the file Shake complains about is missing: I intentionally deleted it. What I don't understand is why shake fails instead of simply rebuilding it. It surely knows how to do so, there is a rule for it in
Rules.Gmp
, which clearly has realized.Thinking that perhaps it doesn't like to build multi-target rules where only some targets are out of date, I then tried deleting
libraries/integer-gmp/integer-gmp.buildinfo
as well. Unfortunately this just resulting in Shake complaining about both files,The text was updated successfully, but these errors were encountered: