dune will generate and update a project's .opam
file when you run dune build
, letting you just manage the project's dependencies in dune-project
.
However, this seems to require an awkward step when adding a new dependency. The only sequence of events I can figure out seems to be:
- Add new dependencies to
dune-project
'sdepends
stanza. dune build
: updates the.opam
file with the new dependency, and fails with errors about the missing new dependencies.opam install . --deps-only
dune build
: succeeds.
Is this the intended flow? The step in which dune build
fails with errors, in order to get the side effect of updating the .opam
file, seems incorrect.
Is there either a dune subcommand that just updates the opam file with the dependencies in dune-project, or a dune subcommand that will update the opam file and also update the installed dependencies according to the updated opam file, as part of the build step?
Or is the above sequence of events the intended flow?