-
Notifications
You must be signed in to change notification settings - Fork 146
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 caching with processed emitDependency #239
Conversation
Codecov Report
@@ Coverage Diff @@
## main #239 +/- ##
==========================================
+ Coverage 81.28% 81.37% +0.09%
==========================================
Files 13 13
Lines 1480 1498 +18
Branches 546 552 +6
==========================================
+ Hits 1203 1219 +16
Misses 110 110
- Partials 167 169 +2
Continue to review full report at Codecov.
|
|
||
if (this.processed.has(path)) { | ||
if (filesToEmit && cacheItem) { | ||
this.emitDependencyCache.set(path, cacheItem.then(res => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why you're using cacheItem.then()
instead of await cacheItem
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to chain the promise here instead of awaiting it since it can be circular and cause circular awaiting that never resolves.
This updates to the latest version of `@vercel/nft` which includes better shared caching between runs. x-ref: vercel/nft#239 x-ref: vercel/nft#238 x-ref: vercel/nft#237
This updates to the latest version of `@vercel/nft` which includes better shared caching between runs. x-ref: vercel/nft#239 x-ref: vercel/nft#238 x-ref: vercel/nft#237
Follow-up to #238 this ensures we handle caching for processed
emitDependency
calls correctly. This also enables testing of the shared caching against the integration suite as it was previously only being tested against the unit suite.