forked from FuelLabs/sway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use an advisory lock to co-ordinate access to git checkout repos (Fue…
…lLabs#3592) This introduces an advisory lock around the re-usable git checkout repo directories. Closes FuelLabs#2603, FuelLabs#3484. Unfortunately, it's a little tricky to reliably test this from this project repository as doing so requires creating a test project with one or more `git` dependencies. We can't reliably add git dependencies (that point to external repos) to projects within this repo as the dependency would necessarily be at least one commit of forc behind, and as a result it's likely that these dependencies would break at some point in the future, e.g. next time forc makes some breaking change. @segfault-magnet, @hal3e would you mind testing this branch in your use-case mentioned in FuelLabs#2603 to make sure we've covered the issue? Edit: I've managed to test this locally by adding some long `sleep`s immediately after acquiring the lock guard, and then spinning up multiple processes of `forc` locally to build a toy project with multiple git dependencies. All appears to work fine, with each process blocking and waiting its turn for access to the checkout repo. Co-authored-by: bing <[email protected]>
- Loading branch information
1 parent
5b35baa
commit efd4518
Showing
3 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters