-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: lock on target directories not Nargo.toml
#7538
base: master
Are you sure you want to change the base?
Conversation
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Description
Problem*
Resolves #7542
Summary*
This PR moves the locks which are currently applied to
Nargo.toml
files 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 fmt
on default settings.