pub const CachePoison = enum 124
125
126
127
128
129
130
131
132
133 pub const CachePoison = enum {
pure,
poisoned,
/// Indicates the user would like to see a stack trace if the cache
/// would become poisoned.
disallowed,
/// Indicates the user would like to ignore the cache being poisoned
/// and cache anyway, opting into cache hits on stale configuration.
ignored,
}
If the cache is poisoned means that the configure logic had side effects, or otherwise did something that could not be tracked by the cache system.
This is not to be confused with whether individual steps may have side effects when being evaluated; it has to do with the logic inside build.zig itself. For example, a
Runstep that prints "hello world" has side effects at make time and therefore does not warrant setting this flag, while checking for the existence ofscdocat configure time in order to choose the default value for a configuration option does.Keeping the cache pure will make
zig buildfaster, bypassing the configurer process when identical configuration would be generated.When the cache is poisoned, the maker process will delete the build configuration file upon ingesting it since it cannot be reused.