dune
dune copied to clipboard
feat: update prepare function for atomic lock
This PR is a proposition for updating the dune.lock
directory in an atomic way. Its goal is to prevent the user of unwanted behavior while running the dune build --watch
command. It consists of 4 steps:
- Rename the
dune.lock
into.dune.lock
(in case of failure, it can still be restored) - Create a temporary directory and solve the new constraints
- Rename the temporary directory to
dune.lock
- Erase the
.dune.lock
(as it has been replaced)
This is the first piece of the solution for #10842.