Closed gpetiot closed 1 year ago
Thanks @gpetiot, that sounds great to me. Use only dune
everywhere but in a dedicated section for low-level/manual compilation. Looks so obvious makes me feel ashamed we haven't thought about that earlier. Great to have new eyes.
I also support moving/sorting things around.
I would love to have a proper documentation for how to set up an OCaml project and how to build and run programs. This includes how to work with opam switches.
For some tutorials it may make more sense for them to suggest using an interactive context (REPL or playground), for other tutorials, the recommended workflow will be to set up a project and work on that.
What if we had pages that explain the different workflow/setups (interactive vs project-based), so that the tutorials can reference either the interactive workflow/setup or the project-based workflow/setup. :thinking:
This issue is related to https://github.com/ocaml/ocaml.org/issues/956.
From users feedback I think we should revisit the "building" section, at the moment there is:
ocamlc
andocamlopt
firstdune
as part of the ocaml-platformdune init
,dune build
,dune exec
ocamlopt
dune
) VS manual compilation (ocamlopt
)ocamlopt
ocamlopt
ocamlc
, thedune
part is probably applicable like for C?ocamlc
,ocamlopt
,ocamlfind
anddune
, as well as pre-dune
build systemsocamlc
andocamlopt
dune
I think we should move the "Compiling OCaml projects" page under the section Getting Started, and rename it something like "Building a project with
dune
", located after "Get up and running" (I think this one should stop after getting everything installed and configured). This page would present the basic usage ofdune
: init, build, exec, and stress that this is the standard and recommended way of building a project.ocamlfind
should be mentioned in the same way afteropam
.Every following page should only use
dune
.We could add a "Manual compilation" page presenting
ocamlc
andocamlopt
in the "advanced" section (Guides probably? but I am in favor of creating a new "Advanced usage" section anyway).What do you think?