Give reason when value needs to be rebuilt based on an update to a source file
authorNick Downing <downing.nick@gmail.com>
Sun, 21 Oct 2018 09:37:55 +0000 (20:37 +1100)
committerNick Downing <downing.nick@gmail.com>
Sun, 21 Oct 2018 09:37:55 +0000 (20:37 +1100)
BuildCache.js

index 2fcba41..7640fa5 100644 (file)
@@ -37,7 +37,7 @@ BuildCache.prototype.get = async function(key, build_func) {
           stats = await fs_stat(result.deps[i])
           if (stats.mtimeMs > result.time) {
             if (this.diag)
-              console.log('rebuilding', key)
+              console.log('rebuilding', key, 'reason', result.deps[i])
             result.deps = [key]
             result.time = Date.now()
             await build_func(result)