cabal icon indicating copy to clipboard operation
cabal copied to clipboard

Persistence mechanism in testsuite is fragile

Open mpickering opened this issue 6 months ago • 0 comments

In the testsuite we generate a module ScriptEnv0.hs which records information about the compiler used to build the testsuite, the packages etc so that the test runner can then use this information to

However, this is very fragile because

  • ScriptEnv0.hs is generated by a module compiled against Cabal-3.10
  • The file is compiled against Cabal-3.11

So if any definition changes between 3.10 and 3.11 then the new version will fail to read the generated file.

Really we should record the information which needs to be persisted in a more generic way (ie only depending on base) so that you can be sure the serialisation/deserialisation will work.

This seems to have worked for a while because these data types never change.. but now compilerAbiTag is populated by 3.11 but not by 3.10, which leads to bugs like #9725

mpickering avatar Feb 21 '24 17:02 mpickering