Rust compile time stuck on "Blocking waiting for file lock on package cache"

Bug description:
Over half of the time when I try to compile my Rust project (which is pretty small) the project gets stuck on “Blocking waiting for file lock on package cache” for several minutes, sometimes even close to 10 minutes. Eventually the package cache is freed and compiles.

Expected vs Current Behavior:
I expect that when no other programs are accessing my package cache it shouldn’t be blocked. Currently it is regularly being accessed by another process, perhaps something is going on in the container that is refreshing or trying to save state and it traps the package cache.

Steps to reproduce:
Hit run (cargo run)

Bug appears at this link:

Screenshot(s)/Screen Recording:
This one took 5 mins:
Screenshot 2023-10-30 at 9.38.29 PM

Browser/OS/Device: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36
Chrome/MacOS/Intel Macbook Pro

Replit Profile:


I have reached out to our team to get a bit more information about why this is happening. I will let you know what they say as soon as I am able!


it looks like the reason is that the cargo cache for rust projects is stored outside of the Repl itself, which is why each time it takes so long to run. Our engineer has recreate the Replt to use Nix packages, which pulls from an internal cache and runs much faster.

You can find a link to that Repl here: . You can fork that back to your account.

If you have any further issues, please let us know. Thanks!