feat: lock on target directories not Nargo.toml#7538
feat: lock on target directories not Nargo.toml#7538TomAFrench wants to merge 3 commits intomasterfrom
Nargo.toml#7538Conversation
|
In #7345 I changed the locking so when I understand your change would allow concurrent |
| fs2::FileExt::lock_shared(&file) | ||
| .unwrap_or_else(|e| panic!("Failed to lock {path_display}: {e}")); | ||
| } | ||
| let lock_path = target_dir.join(".nargo-lock"); |
There was a problem hiding this comment.
I would suggest locking on a package specific lock file in the output directory, to allow the compilations in aztec-packages to go concurrently without all waiting on this single .nargo-lock to be free.
| } | ||
| Ok(locks) | ||
|
|
||
| Ok(LockedFile(file)) |
There was a problem hiding this comment.
I would also suggest removing the lock files to not leave around hundreds of them, but maybe that's not important. Or maybe they can all be in a target/locks directory, so nobody is bothered.
Pull request was closed
Description
Problem*
Resolves #7542
Summary*
This PR moves the locks which are currently applied to
Nargo.tomlfiles onto the target directory. This allows users to run commands in parallel more easily without any potential for clashing by just specifying a separate build directory.As an example of this, I've moved the integration tests to use their own target directory per test so compiling for acir/brillig and with different inliner settings don't conflict with each other.
Additional Context
Documentation*
Check one:
PR Checklist*
cargo fmton default settings.