The build function may capture every log above a certain level of verbosity, which means these have no guarantee of being deterministic. The presence of any output logs will disable caching of the build output. To allow caching of build output with warnings or errors, replace the log statements with build messages that are added to the build context.