Describe the bug
We are trying to update file-entry-cache dependency from v8 to v11 in ESLint. So far we have found three differences that affect ESLint's use case:
reconcile() in file-entry-cache v11 updates cache entries for all files that are tracked in the cache, not just those for which getFileDescriptor() was called. This effectively makes all cache entries valid. ESLint isn't necessarily always run on the same set of files. Making all cache entries valid means that files that have changed, but weren't included in the last lint run, would have outdated lint results stored in cache as valid lint results for the latest versions of the files. file-entry-cache v8 used to update cache entries only for files for which getFileDescriptor() was called.
getFileDescriptor() in file-entry-cache v11 returns changed: false on additional calls for the same file. With file-entry-cache v8, if getFileDescriptor() returns changed: true on the first call for a file, it will also return changed: true on subsequent calls for the same file.
create() in file-entry-cache v11 throws an error if the cache file content is invalid JSON. file-entry-cache v8 used to silently overwrite the cache file on reconcile().
I'm filing this as a bug (3 possible bugs) since I couldn't find mentions of these changes in release descriptions. Not sure if the changes were intentional, but for at least one (1.) I don't think we could find a viable workaround in ESLint.
How To Reproduce (best to provide workable code or tests!)
- https://stackblitz.com/edit/stackblitz-starters-oe4y59em?file=package.json,init.js,check.js,update.js
- https://stackblitz.com/edit/stackblitz-starters-hhkkanjb?file=package.json,init.js,update.js,check.js
- https://stackblitz.com/edit/stackblitz-starters-gbe5tfbu?file=package.json,init.js,check.js
Describe the bug
We are trying to update file-entry-cache dependency from v8 to v11 in ESLint. So far we have found three differences that affect ESLint's use case:
reconcile()in file-entry-cache v11 updates cache entries for all files that are tracked in the cache, not just those for whichgetFileDescriptor()was called. This effectively makes all cache entries valid. ESLint isn't necessarily always run on the same set of files. Making all cache entries valid means that files that have changed, but weren't included in the last lint run, would have outdated lint results stored in cache as valid lint results for the latest versions of the files. file-entry-cache v8 used to update cache entries only for files for whichgetFileDescriptor()was called.getFileDescriptor()in file-entry-cache v11 returnschanged: falseon additional calls for the same file. With file-entry-cache v8, ifgetFileDescriptor()returnschanged: trueon the first call for a file, it will also returnchanged: trueon subsequent calls for the same file.create()in file-entry-cache v11 throws an error if the cache file content is invalid JSON. file-entry-cache v8 used to silently overwrite the cache file onreconcile().I'm filing this as a bug (3 possible bugs) since I couldn't find mentions of these changes in release descriptions. Not sure if the changes were intentional, but for at least one (1.) I don't think we could find a viable workaround in ESLint.
How To Reproduce (best to provide workable code or tests!)