Fix cache not invalidated when files are ignored or restored#18029
Conversation
commit: |
✅ Deploy Preview for prettier ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I think the bug can be fixed by removing the initial value of - let shouldSetCache = !isDifferent;
+ let shouldSetCache = false;Will it work? Also, we need tests for this case. |
It seems don't work. If the file is ignored, it gets an early return. const isFileIgnored = isIgnored(filename);
if (
isFileIgnored &&
(context.argv.debugCheck ||
context.argv.write ||
context.argv.check ||
context.argv.listDifferent)
) {
continue;
} |
|
Hello @kovsu , sorry for the long delay. Do you know why we need For example: If I run This really doesn't make sense to me, since each command can even have a different cache location. |
|
It looks like there's been no action on this PR since November - is it dead? Is there a different fix for #18016 somewhere? |
|
Maybe caused by jaredwray/cacheable#1648? |
Yes, I will confirm this when it publish the new version. |
|
jaredwray/cacheable#1648 won't get released in time, I'll merge this and release v3.9 and revisit later. |
Description
fix: #18016
After:
CleanShot.2025-10-10.at.16.51.22.mp4
Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.