Unverified Commit d2711d22 authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

Invalidator: don’t call invalidate at all if there’s nothing to invalidate (#75706)

No behavior changes in this PR, just a small adjustment since while
debugging it was surprising that `invalidate` was called even though it
was a no-op with an empty array.

Previously, `invalidate` would unconditionally get called after
building, even if no work was queued.

Test Plan: CI
parent 5fa487a1
...@@ -306,8 +306,11 @@ class Invalidator { ...@@ -306,8 +306,11 @@ class Invalidator {
this.rebuildAgain.delete(key) this.rebuildAgain.delete(key)
} }
} }
if (rebuild.length > 0) {
this.invalidate(rebuild) this.invalidate(rebuild)
} }
}
public willRebuild(compilerKey: keyof typeof COMPILER_INDEXES) { public willRebuild(compilerKey: keyof typeof COMPILER_INDEXES) {
return this.rebuildAgain.has(compilerKey) return this.rebuildAgain.has(compilerKey)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment