1DUNE-DIAGNOSTICS(1)               Dune Manual              DUNE-DIAGNOSTICS(1)
2
3
4

NAME

6       dune-diagnostics - Fetch and return errors from the current build.
7

SYNOPSIS

9       dune diagnostics [OPTION]…
10

OPTIONS

12       --action-stderr-on-success=VAL
13           Same as --action-stdout-on-success but for the standard output for
14           error messages. A good default for large mono-repositories is
15           --action-stdout-on-success=swallow
16           --action-stderr-on-success=must-be-empty. This ensures that a
17           successful build has a "clean" empty output.
18
19       --action-stdout-on-success=VAL
20           Specify how to deal with the standard output of actions when they
21           succeed. Possible values are: print to just print it to Dune's
22           output, swallow to completely ignore it and must-be-empty to
23           enforce that the action printed nothing. With must-be-empty, Dune
24           will consider that the action failed if it printed something to its
25           standard output. The default is print.
26
27       --build-info
28           Show build information.
29
30       --display-separate-messages
31           Separate error messages with a blank line.
32
33       --error-reporting=VAL (absent=deterministic)
34           Controls when the build errors are reported. early - report errors
35           as soon as they are discovered. deterministic - report errors at
36           the end of the build in a deterministic order. twice - report each
37           error twice: once as soon as the error is discovered and then again
38           at the end of the build, in a deterministic order.
39
40       -f, --force
41           Force actions associated to aliases to be re-executed even if their
42           dependencies haven't changed.
43
44       --file-watcher=VAL (absent=automatic)
45           Mechanism to detect changes in the source. Automatic to make dune
46           run an external program to detect changes. Manual to notify dune
47           that files have changed manually."
48
49       --passive-watch-mode
50           Similar to [--watch], but only start a build when instructed
51           externally by an RPC.
52
53       --react-to-insignificant-changes
54           react to insignificant file system changes; this is only useful for
55           benchmarking dune
56
57       --sandbox=VAL (absent DUNE_SANDBOX env)
58           Sandboxing mode to use by default. Some actions require a certain
59           sandboxing mode, so they will ignore this setting. The allowed
60           values are: none, symlink, copy, hardlink.
61
62       -w, --watch
63           Instead of terminating build after completion, wait continuously
64           for file changes.
65
66       --wait-for-filesystem-clock
67           Dune digest file contents for better incrementally. These digests
68           are themselves cached. In some cases, Dune needs to drop some
69           digest cache entries in order for things to be reliable. This
70           option makes Dune wait for the file system clock to advance so that
71           it doesn't need to drop anything. You should probably not care
72           about this option; it is mostly useful for Dune developers to make
73           Dune tests of the digest cache more reproducible.
74

COMMON OPTIONS

76       --always-show-command-line
77           Always show the full command lines of programs executed by dune
78
79       --auto-promote
80           Automatically promote files. This is similar to running dune
81           promote after the build.
82
83       --build-dir=FILE (absent DUNE_BUILD_DIR env)
84           Specified build directory. _build if unspecified
85
86       --cache=VAL (absent DUNE_CACHE env)
87           Enable or disable Dune cache (either enabled or disabled). Default
88           is `disabled'.
89
90       --cache-check-probability=VAL (absent DUNE_CACHE_CHECK_PROBABILITY env)
91           Check build reproducibility by re-executing randomly chosen rules
92           and comparing their results with those stored in Dune cache. Note:
93           by increasing the probability of such checks you slow down the
94           build. The default probability is zero, i.e. no rules are checked.
95
96       --cache-storage-mode=VAL (absent DUNE_CACHE_STORAGE_MODE env)
97           Dune cache storage mode (one of auto, hardlink or copy). Default is
98           `auto'.
99
100       --config-file=FILE
101           Load this configuration file instead of the default one.
102
103       --debug-artifact-substitution
104           Print debugging info about artifact substitution
105
106       --debug-backtraces
107           Always print exception backtraces.
108
109       --debug-cache=VAL
110           Show debug messages on cache misses for the given cache layers.
111           Value is a comma-separated list of cache layer names. All available
112           cache layers: shared,workspace-local,fs.
113
114       --debug-dependency-path
115           In case of error, print the dependency path from the targets on the
116           command line to the rule that failed.
117
118       --debug-digests
119           Explain why Dune decides to re-digest some files
120
121       --debug-load-dir
122           Print debugging info about directory loading
123
124       --debug-store-digest-preimage
125           Store digest preimage for all computed digests, so that it's
126           possible to reverse them later, for debugging. The digests are
127           stored in the shared cache (see --cache flag) as values, even if
128           cache is otherwise disabled. This should be used only for
129           debugging, since it's slow and it litters the shared cache.
130
131       --default-target=TARGET (absent=@@default)
132           Set the default target that when none is specified to dune build.
133
134       --diff-command=VAL (absent DUNE_DIFF_COMMAND env)
135           Shell command to use to diff files. Use - to disable printing the
136           diff.
137
138       --disable-promotion (absent DUNE_DISABLE_PROMOTION env)
139           Disable all promotion rules
140
141       --display=MODE
142           Control the display mode of Dune. See dune-config(5) for more
143           details. Valid values for this option are progress, verbose, short,
144           quiet or tui.
145
146       --dump-gc-stats=FILE
147           Dump the garbage collector stats to a file after the build is
148           complete.
149
150       --dump-memo-graph=FILE
151           Dumps the dependency graph to a file after the build is complete
152
153       --dump-memo-graph-format=FORMAT (absent=gexf)
154           File format to be used when dumping dependency graph
155
156       --dump-memo-graph-with-timing
157           With --dump-memo-graph, will re-run each cached node in the Memo
158           graph after building and include the runtime in the output. Since
159           all nodes contain a cached value, this will measure just the
160           runtime of each node
161
162       --help[=FMT] (default=auto)
163           Show this help in format FMT. The value FMT must be one of auto,
164           pager, groff or plain. With auto, the format is pager or plain
165           whenever the TERM env var is dumb or undefined.
166
167       --ignore-promoted-rules
168           Ignore rules with (mode promote), except ones with (only ...). The
169           variable %{ignoring_promoted_rules} in dune files reflects whether
170           this option was passed or not.
171
172       --instrument-with=BACKENDS (absent DUNE_INSTRUMENT_WITH env)
173           "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
174           list of library names, each one of which must declare an
175           instrumentation backend.
176
177       -j JOBS
178           Run no more than JOBS commands simultaneously.
179
180       --no-buffer
181           Do not buffer the output of commands executed by dune. By default
182           dune buffers the output of subcommands, in order to prevent
183           interleaving when multiple commands are executed in parallel.
184           However, this can be an issue when debugging long running tests.
185           With --no-buffer, commands have direct access to the terminal. Note
186           that as a result their output won't be captured in the log file.
187           You should use this option in conjunction with -j 1, to avoid
188           interleaving. Additionally you should use --verbose as well, to
189           make sure that commands are printed before they are being executed.
190
191       --no-config
192           Do not load the configuration file
193
194       --no-print-directory
195           Suppress "Entering directory" messages
196
197       --only-packages=PACKAGES
198           Ignore stanzas referring to a package that is not in PACKAGES.
199           PACKAGES is a comma-separated list of package names. Note that this
200           has the same effect as deleting the relevant stanzas from dune
201           files. It is mostly meant for releases. During development, it is
202           likely that what you want instead is to build a particular
203           <package>.install target.
204
205       -p PACKAGES, --for-release-of-packages=PACKAGES (required)
206           Shorthand for --release --only-packages PACKAGE. You must use this
207           option in your <package>.opam files, in order to build only what's
208           necessary when your project contains multiple packages as well as
209           getting reproducible builds.
210
211       --print-metrics
212           Print out various performance metrics after every build
213
214       --profile=VAL (absent DUNE_PROFILE env)
215           Select the build profile, for instance dev or release. The default
216           is dev.
217
218       --promote-install-files[=VAL] (default=true)
219           Promote the generated <package>.install files to the source tree
220
221       --release
222           Put dune into a reproducible release mode. This is in fact a
223           shorthand for --root . --ignore-promoted-rules --no-config
224           --profile release --always-show-command-line
225           --promote-install-files --default-target @install
226           --require-dune-project-file. You should use this option for release
227           builds. For instance, you must use this option in your
228           <package>.opam files. Except if you already use -p, as -p implies
229           this option.
230
231       --require-dune-project-file[=VAL] (default=true)
232           Fail if a dune-project file is missing.
233
234       --root=DIR
235           Use this directory as workspace root instead of guessing it. Note
236           that this option doesn't change the interpretation of targets given
237           on the command line. It is only intended for scripts.
238
239       --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
240           Store original source location in dune-package metadata
241
242       --terminal-persistence=MODE
243           Changes how the log of build results are displayed to the console
244           between rebuilds while in --watch mode. Supported modes: preserve,
245           clear-on-rebuild, clear-on-rebuild-and-flush-history.
246
247       --trace-extended
248           Output extended trace data (requires trace-file)
249
250       --trace-file=FILE
251           Output trace data in catapult format (compatible with
252           chrome://tracing)
253
254       --verbose
255           Same as --display verbose
256
257       --version
258           Show version information.
259
260       --watch-exclusions=REGEX
261           Adds a POSIX regular expression that will exclude matching
262           directories from `dune build --watch`. The option
263           --watch-exclusions can be repeated to add multiple exclusions.
264           Semicolons can be also used as a separator. If no exclusions are
265           provided, then a standard set of exclusions is used; however, if
266           one or more --watch-exclusions are used, none of the standard
267           exclusions are used. The standard exclusions are: ^_opam /_opam
268           ^_esy /_esy ^\.#.* /\.#.* ~$ ^#[^#]*#$ /#[^#]*#$ ^4913$ /4913$
269           /.git /.hg :/windows
270
271       --workspace=FILE (absent DUNE_WORKSPACE env)
272           Use this specific workspace file instead of looking it up.
273
274       -x VAL
275           Cross-compile using this toolchain.
276

EXIT STATUS

278       diagnostics exits with the following status:
279
280       0   on success.
281
282       1   if an error happened.
283
284       130 if it was interrupted by a signal.
285

ENVIRONMENT

287       These environment variables affect the execution of diagnostics:
288
289       DUNE_BUILD_DIR
290           Specified build directory. _build if unspecified
291
292       DUNE_CACHE
293           Enable or disable Dune cache (either enabled or disabled). Default
294           is `disabled'.
295
296       DUNE_CACHE_CHECK_PROBABILITY
297           Check build reproducibility by re-executing randomly chosen rules
298           and comparing their results with those stored in Dune cache. Note:
299           by increasing the probability of such checks you slow down the
300           build. The default probability is zero, i.e. no rules are checked.
301
302       DUNE_CACHE_STORAGE_MODE
303           Dune cache storage mode (one of auto, hardlink or copy). Default is
304           `auto'.
305
306       DUNE_DIFF_COMMAND
307           Shell command to use to diff files. Use - to disable printing the
308           diff.
309
310       DUNE_DISABLE_PROMOTION
311           Disable all promotion rules
312
313       DUNE_INSTRUMENT_WITH
314           "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
315           list of library names, each one of which must declare an
316           instrumentation backend.
317
318       DUNE_PROFILE
319           Build profile. dev if unspecified or release if -p is set.
320
321       DUNE_SANDBOX
322           Sandboxing mode to use by default. (see --sandbox)
323
324       DUNE_STORE_ORIG_SOURCE_DIR
325           Store original source location in dune-package metadata
326
327       DUNE_WORKSPACE
328           Use this specific workspace file instead of looking it up.
329

SEE ALSO

331       dune(1)
332
333
334
335Dune n/a                                                   DUNE-DIAGNOSTICS(1)
Impressum