fix(cache): separate package cache by platform#2165
fix(cache): separate package cache by platform#2165Sahitya0805 wants to merge 1 commit intoconda:mainfrom
Conversation
0dcafca to
678db83
Compare
|
This doesnt integrate the functionality anywhere and when you do add that its important to think about a migration strategy for people with existing caches. |
Ahh I see the PR here, but I think you have left a comment here mentioning that #2165 is incomplete and doesn't fix the issue, also both addresses different issue tags. Can you look into #2167 once to see if everything is addresses properly over there ? |
76d2ac1 to
bc7fb49
Compare
| let mut cache_entry = entry.lock().await; | ||
| let cache_path = self.path.join(cache_key.to_string()); | ||
|
|
||
| let new_path = cache_key.cache_path(&self.path); |
There was a problem hiding this comment.
This commit says remove duplication but this actually adds a lot of duplication..
There was a problem hiding this comment.
Thanks for pointing that out!
You're right the cache path resolution logic is currently duplicated. I'll refactor it by introducing a helper function to resolve the cache path (handling both the new platform aware layout and the legacy layout) and update the PR accordingly.
|
Are you still working on this? There is another PR in #2167 trying to solve the same issue. If you are not working on this PR it might be nice for the author of that PR to continue? |
|
Yes, I'm still working on it. I'll address the duplication issue and push an update shortly. |
ef41d2a to
1b96c2d
Compare
1b96c2d to
69885c9
Compare
|
Thanks for the review! I refactored the cache path resolution logic into a helper function to remove duplication and updated the call sites accordingly. I also removed the redundant assignments and verified that all tests pass locally, including Please let me know if any further changes are needed. |
Description
Previously cache keys did not include platform, causing packages from different platforms to overwrite each other.
This PR stores cached packages under
cache/pkgs/<platform>/<package>.Fixes #1014
How Has This Been Tested?
test_cache_key_displayincache_key.rsto verify thatCacheKeycorrectly prepends the platform folder.cargo test -p rattler_cacheandcargo checklocally.AI Disclosure
Tools: Custom AI Assistant
Checklist: