-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parse): don't lookup non-parsable files in the cache (#6476)
**Problem:** Today we try to read every file from the cache, even if it's non-parsable, and always get a cache miss (since we don't parse it and thus not storing anything). We shouldn't try and access the cache for non-parsable files at all. <img width="366" alt="image" src="https://github.com/user-attachments/assets/e7c4ec79-2c97-47b2-b272-bc7124795f4d"> **Fix:** Ignore cache for non-parsable files. **Commit Details:** - Other than tidying the code, the only change is to also check for `isParsableFile()` inside `shouldUseCacheForFile()`. - As part of this change, since I now import `isParsableFile`, I also moved `gitBlobChecksumFromBuffer` out of `assets.ts` and into `file-utils.ts`. `file-utils` is in `shared` but was importing it from the editor's `assets.ts`, and along with it the entire editor code, unnecessarily. **Manual Tests:** I hereby swear that: - [x] I opened a hydrogen project and it loaded - [x] I could navigate to various routes in Play mode
- Loading branch information
Showing
5 changed files
with
42 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters