Quantcast
Channel: OCaml - Topics tagged dune
Viewing all articles
Browse latest Browse all 521

Learning OCaml - a few tooling questions

$
0
0

I’ve created a new dune project (with dune init project <proj_name>) for the sake of solving all learning exercises with the hoped-for comfort of automated build system. So far I had no need to tinker with initial dune-project settings, only manual interventions in respective dune files for executable, lib and test.

Now I’d like to play with some 3rd party libraries, so I
ve added manually a new dependency like tsdl in dune-project file at project’s root, expecting particular <package_name>.opam will be re-generated to reflect the changes, while meeting criteria by opam Integration — Dune documentation . Unfortunately this is not the case, .opam remains untouched, ie. out of sync with dune-project changes, after dune build. After an hour reading man-pages for dune and readthedocs documentation, I’ve found no answer how to keep opam in sync. Out of despair I’ve deleted the .opam and dune build finally generated an updated version. Like, really?

Now straight to questions:

  • what is the correct way to keep in sync dune-project and project.opam files?
  • what is the correct/idiomatic way to add/remove project’s dependencies?
  • is there a more idiomatic way to install dependencies then googled-out opam install . --deps-only trick?
  • is there or is planned an option to install dependencies not globally but per-project?
  • what are motives to not keep and manage all declarations, recipes and options in a single place like dune-project file but scatter them around the whole project tree and in different formats?

8 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 521

Trending Articles