prog003 test does not pass as intended
The prog003 GHCi test appears to be intended to test that we correctly choose between using existing object code and the interpreter when loading modules. In short, this test sets up four modules, A, B, C, and D:
- B & C depend upon D
- A depends upon B & C
It then compiles all four to object code and loads A, which should load all four object files. It then deletes B.o and reloads, expecting that B and A are both loaded by the interpreter.
In practice, this test appears to be broken in more than one way:
- in the default, dynamic build configuration it always loads all modules using the interpreter
- when GHC is built statically (e.g. using Hadrian's
fully_staticflavour transformer) it tries to loadBwith the interpreter and loadsAfrom object code, resulting in linking errors (since the linker has none ofB's symbols in its symbol table).