haskell / haskell/cabal

Persistence mechanism in testsuite is fragile

Open
#9,730 0 comments 1 reaction 0 assignees View on GitHub
needs triage type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.