8
8
9
9
Some of these are mini how-to guides, or sections of existing guides.
10
10
11
- Why Do Many Dune Projects Contain a ``Makefile ``?
11
+ Why do many Dune projects contain a ``Makefile ``?
12
12
=================================================
13
13
14
14
Many Dune projects contain a root ``Makefile ``. It's often only there for
@@ -23,31 +23,31 @@ convenience for the following reasons:
23
23
24
24
3. ``make `` is shorter to type than ``dune build @install ``
25
25
26
- How to Add a Configure Step to a Dune Project
27
- =============================================
26
+ How to add a configure step to a Dune project?
27
+ ==============================================
28
28
29
29
The with-configure-step _ example shows one way to add a configure step that
30
30
preserves composability; i.e., it doesn't require manually running the
31
31
``./configure `` script when working on multiple projects simultaneously.
32
32
33
33
.. _with-configure-step : https://github.com/ocaml/dune/tree/master/example/with-configure-step.t
34
34
35
- Can I Use ``topkg `` with Dune?
35
+ Can I use ``topkg `` with Dune?
36
36
==============================
37
37
38
38
While it's possible to use the topkg-jbuilder _, it's not recommended.
39
39
dune-release _ subsumes ``topkg-jbuilder `` and is specifically tailored to Dune
40
40
projects.
41
41
42
42
43
- How Do I Publish My Packages with Dune?
43
+ How do I publish my packages with Dune?
44
44
=======================================
45
45
46
46
Dune is just a build system and considers publishing outside of its scope.
47
47
However, the dune-release _ project is specifically designed for releasing Dune
48
48
projects to opam. We recommend using this tool for publishing Dune packages.
49
49
50
- Where Can I Find Some Examples of Projects Using Dune?
50
+ Where can I find some examples of projects using Dune?
51
51
======================================================
52
52
53
53
The dune-universe _ repository contains a snapshot of the latest versions of all
@@ -68,8 +68,8 @@ Jane Street as well.
68
68
.. _dune-release : https://github.com/samoht/dune-release
69
69
.. _jenga : https://github.com/janestreet/jenga
70
70
71
- How to Make Warnings Non-Fatal
72
- ==============================
71
+ How to make warnings non-fatal?
72
+ ===============================
73
73
74
74
`jbuilder ` formerly displayed warnings, but most of them wouldn't stop the
75
75
build. However, Dune makes all warnings fatal by default. This can be a
@@ -92,8 +92,8 @@ non-fatal:
92
92
(dev
93
93
(flags (:standard -warn-error -A))))
94
94
95
- How to Turn Specific Errors into Warnings
96
- =========================================
95
+ How to turn specific errors into warnings?
96
+ ==========================================
97
97
98
98
Dune is strict about warnings by default in that all warnings are treated as
99
99
fatal errors. To change certain errors into warnings for a project, you can add
@@ -106,8 +106,8 @@ the following to ``dune-workspace``:
106
106
In this example, the warnings 27 (unused-var-strict) and 32
107
107
(unused-value-declaration) are treated as warnings rather than errors.
108
108
109
- How to Display the Output of Commands as They Run
110
- =================================================
109
+ How to display the output of commands as they run?
110
+ ==================================================
111
111
112
112
When Dune runs external commands, it redirects and saves their output, then
113
113
displays it when complete. This ensures that there's no interleaving when
@@ -120,8 +120,8 @@ In that case, one can pass ``-j1 --no-buffer`` so the commands are directly
120
120
printed on the console (and the parallelism is disabled so the output stays
121
121
readable).
122
122
123
- How Can I Generate an ``mli `` File From an ``ml `` File
124
- ======================================================
123
+ How can I generate an ``mli `` file from an ``ml `` file?
124
+ =======================================================
125
125
126
126
When a module starts as just an implementation (``.ml `` file), it can be
127
127
tedious to define the corresponding interface (``.mli `` file).
@@ -143,7 +143,7 @@ file:
143
143
The ``ocaml-print-intf `` program has special support for Dune, so it will
144
144
automatically understand external dependencies.
145
145
146
- How Can I Build a Single Library ?
146
+ How can I build a single library ?
147
147
=================================
148
148
149
149
You might want to do this when you don't have all the dependencies installed to
@@ -171,8 +171,8 @@ directory - not the project root. If the library defines a ``name`` distinct fro
171
171
its ``public_name `` then that can be used interchangeably with the ``public_name ``
172
172
in this command.
173
173
174
- Files and Directories Whose Names Begin with "." (Period) are Ignored by `` source_tree ``
175
- ========================================================================================
174
+ Why does `` source_tree `` ignore files and directories when they begin with a "." (period)?
175
+ ==========================================================================================
176
176
177
177
Dune's default behaviour is to ignore files and directories starting with "."
178
178
when copying directories with ``source_tree ``. This is to avoid accidentally
@@ -224,8 +224,8 @@ In this case you can update it to look like this:
224
224
(dirs :standard .cargo \ target)
225
225
(data_only_dirs vendor)
226
226
227
- How Can I Write Inline Tests in a Package Without my Users Needing to Install ``ppx_inline_test ``?
228
- ==================================================================================================
227
+ Why can't I write inline tests in a package without users needing to install ``ppx_inline_test ``?
228
+ =================================================================================================
229
229
230
230
If you came to OCaml from Rust and noticed that Dune has a feature for running
231
231
inline tests you might be wondering how to do the OCaml equivalent of:
0 commit comments