Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: walk invalidated dependencies #573

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions packages/processor/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down