dune icon indicating copy to clipboard operation
dune copied to clipboard

feat: update prepare function for atomic lock

Open maiste opened this issue 5 months ago • 0 comments

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:

  1. Rename the dune.lock into .dune.lock (in case of failure, it can still be restored)
  2. Create a temporary directory and solve the new constraints
  3. Rename the temporary directory to dune.lock
  4. Erase the .dune.lock (as it has been replaced)

This is the first piece of the solution for #10842.

maiste avatar Aug 27 '24 16:08 maiste