Skip to content
Permalink
Browse files

fix: walk invalidated dependencies (#573)

When invalidation was added in #532 I apparently forgot to account for it withiin the dependency walking code, so invalidated files wouldn't ever be rewalked. This has likely been causing a variety of nasty-to-debug errors in the wild 😞
  • Loading branch information...
tivac committed Mar 28, 2019
1 parent 59ce902 commit 0284b1191906b96ee1d6bdc196260ca1a3db1f65
Showing with 11 additions and 5 deletions.
  1. +11 −5 packages/processor/processor.js
@@ -430,11 +430,17 @@ class Processor {

// Walk this node's dependencies, reading new files from disk as necessary
await Promise.all(
this._graph.dependenciesOf(name).map((dependency) => (
dependency in this._files ?
this._files[dependency].walked :
this.file(dependency)
))
this._graph.dependenciesOf(name).map((dependency) => {
const { valid, walked : complete } = this._files[dependency] || false;

// If the file hasn't been invalidated wait for it to be done processing
if(valid) {
return complete;
}

// Otherwise add it to the queue
return this.file(dependency);
})
);

// Mark the walk of this file & its dependencies complete

0 comments on commit 0284b11

Please sign in to comment.
You can’t perform that action at this time.