ouroboros-network
ouroboros-network copied to clipboard
Check the `NoThunks` invariant during a nightly CI test
If you set the following flag and run the test suite, most TVar
s -- including all critical ones, unless we have a bug -- will check their contents for thunks via the nothunks
library whenever they're updated.
$ cat cabal.project.local
package io-classes
flags: +checktvarinvariant
This flag makes the tests run quite slow, so it's something we had been doing incrementally. But I, for example, haven't done it since taking over lead for two months! So adding it to some CI (nightly, but perhaps even just weekly) would be much safer.
Edit: io-sim-classes
was renamed io-classes
on 2021 July 8.
This would be a useful step, but it's not enough: we need to run this check on a "realistic" chain, and currently no Consensus test creates such a thing.
There's some context about how nightlies used to work here https://github.com/input-output-hk/ouroboros-network/issues/3892#issuecomment-1191618988 but I don't know that any of it will be applicable to this Issue.
This is blocked on https://github.com/input-output-hk/ouroboros-network/issues/4006
This is not fixed until all the current thunk tests pass