Building patches that change format of interface files

GHC Devs, Once I compile GHC I use the "cd ghc; make 2" trick to re-compile any changes. That however does not work if my code changes modify the format of interface files - the resulting compiler is unusable. In fact the only way to get a working compiler after interface format change that I am aware of is to rebuild everything from scratch. Needless to say, this takes a lot of time. Is there a better way? I'd like to test D841 but if this means rebuilding everything then I'll have to pass. Janek --- Politechnika Łódzka Lodz University of Technology Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata. Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie. This email contains information intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient or if you have received this message in error, please notify the sender and delete it from your system.

Technically, you can skip recompiling the stage1 compiler. But I never bother: all of the libraries must be rebuilt; you have, after all, changed the interface file format. Edward Excerpts from Jan Stolarek's message of 2015-04-15 13:20:10 +0100:
GHC Devs,
Once I compile GHC I use the "cd ghc; make 2" trick to re-compile any changes. That however does not work if my code changes modify the format of interface files - the resulting compiler is unusable. In fact the only way to get a working compiler after interface format change that I am aware of is to rebuild everything from scratch. Needless to say, this takes a lot of time. Is there a better way? I'd like to test D841 but if this means rebuilding everything then I'll have to pass.
Janek
--- Politechnika Łódzka Lodz University of Technology
Treść tej wiadomości zawiera informacje przeznaczone tylko dla adresata. Jeżeli nie jesteście Państwo jej adresatem, bądź otrzymaliście ją przez pomyłkę prosimy o powiadomienie o tym nadawcy oraz trwałe jej usunięcie.
This email contains information intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient or if you have received this message in error, please notify the sender and delete it from your system.

[oops, forgot to cc ghc-devs] Hi Janek, On 15/04/15 13:20, Jan Stolarek wrote:
Once I compile GHC I use the "cd ghc; make 2" trick to re-compile any changes. That however does not work if my code changes modify the format of interface files - the resulting compiler is unusable. In fact the only way to get a working compiler after interface format change that I am aware of is to rebuild everything from scratch. Needless to say, this takes a lot of time. Is there a better way?
I hit this problem quite often as well, but unfortunately don't know of a general solution other than rebuilding everything.
I'd like to test D841 but if this means rebuilding everything then I'll have to pass.
In the case of D841, the interface file changes are very minor (specifically, a new tag is used when an empty closed type family is compiled, but of course none of them exist yet). Thus you might be able to get away without a full rebuild. (I think ./configure incorporates some git revision data into the interface file version number, so presumably you have to avoid that as well.) All the best, Adam -- Adam Gundry, Haskell Consultant Well-Typed LLP, http://www.well-typed.com/

In the case of D841, the interface file changes are very minor (specifically, a new tag is used when an empty closed type family is compiled, but of course none of them exist yet). Thus you might be able to get away without a full rebuild. Good point. Sadly, your patch conflicts with my work on injective type families so looks like I have no choice but to do a full rebuild. I'll post comments about things I wanted to test on Phab.
Janek --- Politechnika Åódzka Lodz University of Technology TreÅÄ tej wiadomoÅci zawiera informacje przeznaczone tylko dla adresata. Jeżeli nie jesteÅcie PaÅstwo jej adresatem, bÄ dź otrzymaliÅcie jÄ przez pomyÅkÄ prosimy o powiadomienie o tym nadawcy oraz trwaÅe jej usuniÄcie. This email contains information intended solely for the use of the individual to whom it is addressed. If you are not the intended recipient or if you have received this message in error, please notify the sender and delete it from your system.
participants (3)
-
Adam Gundry
-
Edward Z. Yang
-
Jan Stolarek