Skip to content

Fix double locking file caches on windows #2303

Closed
@Arcticae

Description

@Arcticae

Which components does the task require to be changed? (think hard pls)

snforge

Description

There seems to be a problem with file locking, double lock does not wait for acquiring but fails on the write itself:

Image

Related code:

https://github.com/foundry-rs/starknet-foundry/blob/8fa75bbdd1b0b0b80c6fc3e7fc9fa399a11a925a/crates/cheatnet/src/forking/cache.rs#L138C1-L141C1

The problem seems to be the way windows locks work in fs2
Related info about cross-platform locking in fs2: https://tikv.github.io/doc/fs2/trait.FileExt.html#notes-on-file-locks

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingsnforge

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions