pkg: dune watch mode with autolocking #11614
Labels
feature-request
User wanted features
package management
proposal
RFC's that are awaiting discussion to be accepted or rejected
rule
Internal dune rules
I'm opening this PR to discuss the best way to introduce the auto locking inside the watch-mode. Being able to auto-lock the dependencies will developing would be really useful. The solution I have in mind would remove some of the problem that were raised.
The solution would consist in 3 stages:
dune.lock
directory as a target of thedune pkg lock
command and as an input for thedune build
command. We could use the "promote" mechanism to make it changes the file in the source directory. This is what is currently used bydune fmt
and we could imaginedune pkg lock
following the same pattern.dune-project
or*.opam
file, it would update the generateddune.lock
entry only for the new package. We would provide the exact version we already have for the other packages. If it fails to build, we would ask the user to manually rundune pkg lock
because it would mean a "strong" upgrade.Solving being the costly part in the process, doing it only with the flag would prevent it from happening when users don't expect it.
I have started to dig a bit in the code on how to do this. However, before going further, I would like to get your feedback on this @rgrinberg. WDTY of this solution?
The text was updated successfully, but these errors were encountered: