1DUNE-UTOP(1) Dune Manual DUNE-UTOP(1)
2
3
4
6 dune-utop - Load library in utop
7
9 dune utop [OPTION]… [DIR] [ARGS]…
10
12 dune utop DIR build and run utop toplevel with libraries defined in DIR
13
15 --action-stderr-on-success=VAL
16 Same as --action-stdout-on-success but for the standard output for
17 error messages. A good default for large mono-repositories is
18 --action-stdout-on-success=swallow
19 --action-stderr-on-success=must-be-empty. This ensures that a
20 successful build has a "clean" empty output.
21
22 --action-stdout-on-success=VAL
23 Specify how to deal with the standard output of actions when they
24 succeed. Possible values are: print to just print it to Dune's
25 output, swallow to completely ignore it and must-be-empty to
26 enforce that the action printed nothing. With must-be-empty, Dune
27 will consider that the action failed if it printed something to its
28 standard output. The default is print.
29
30 --build-info
31 Show build information.
32
33 --context=CONTEXT (absent=default)
34 Select context where to build/run utop.
35
36 --error-reporting=VAL (absent=deterministic)
37 Controls when the build errors are reported. early - report errors
38 as soon as they are discovered. deterministic - report errors at
39 the end of the build in a deterministic order. twice - report each
40 error twice: once as soon as the error is discovered and then again
41 at the end of the build, in a deterministic order.
42
43 -f, --force
44 Force actions associated to aliases to be re-executed even if their
45 dependencies haven't changed.
46
47 --file-watcher=VAL (absent=automatic)
48 Mechanism to detect changes in the source. Automatic to make dune
49 run an external program to detect changes. Manual to notify dune
50 that files have changed manually."
51
52 --passive-watch-mode
53 Similar to [--watch], but only start a build when instructed
54 externally by an RPC.
55
56 --react-to-insignificant-changes
57 react to insignificant file system changes; this is only useful for
58 benchmarking dune
59
60 --sandbox=VAL (absent DUNE_SANDBOX env)
61 Sandboxing mode to use by default. Some actions require a certain
62 sandboxing mode, so they will ignore this setting. The allowed
63 values are: none, symlink, copy, hardlink.
64
65 -w, --watch
66 Instead of terminating build after completion, wait continuously
67 for file changes.
68
69 --wait-for-filesystem-clock
70 Dune digest file contents for better incrementally. These digests
71 are themselves cached. In some cases, Dune needs to drop some
72 digest cache entries in order for things to be reliable. This
73 option makes Dune wait for the file system clock to advance so that
74 it doesn't need to drop anything. You should probably not care
75 about this option; it is mostly useful for Dune developers to make
76 Dune tests of the digest cache more reproducible.
77
79 These options are common to all commands.
80
81 --always-show-command-line
82 Always show the full command lines of programs executed by dune
83
84 --auto-promote
85 Automatically promote files. This is similar to running dune
86 promote after the build.
87
88 --build-dir=FILE (absent DUNE_BUILD_DIR env)
89 Specified build directory. _build if unspecified
90
91 --cache=VAL (absent DUNE_CACHE env)
92 Enable or disable Dune cache (either enabled or disabled). Default
93 is `disabled'.
94
95 --cache-check-probability=VAL (absent DUNE_CACHE_CHECK_PROBABILITY env)
96 Check build reproducibility by re-executing randomly chosen rules
97 and comparing their results with those stored in Dune cache. Note:
98 by increasing the probability of such checks you slow down the
99 build. The default probability is zero, i.e. no rules are checked.
100
101 --cache-storage-mode=VAL (absent DUNE_CACHE_STORAGE_MODE env)
102 Dune cache storage mode (one of auto, hardlink or copy). Default is
103 `auto'.
104
105 --config-file=FILE
106 Load this configuration file instead of the default one.
107
108 --debug-artifact-substitution
109 Print debugging info about artifact substitution
110
111 --debug-backtraces
112 Always print exception backtraces.
113
114 --debug-cache=VAL
115 Show debug messages on cache misses for the given cache layers.
116 Value is a comma-separated list of cache layer names. All available
117 cache layers: shared,workspace-local,fs.
118
119 --debug-dependency-path
120 In case of error, print the dependency path from the targets on the
121 command line to the rule that failed.
122
123 --debug-digests
124 Explain why Dune decides to re-digest some files
125
126 --debug-load-dir
127 Print debugging info about directory loading
128
129 --debug-store-digest-preimage
130 Store digest preimage for all computed digests, so that it's
131 possible to reverse them later, for debugging. The digests are
132 stored in the shared cache (see --cache flag) as values, even if
133 cache is otherwise disabled. This should be used only for
134 debugging, since it's slow and it litters the shared cache.
135
136 --default-target=TARGET (absent=@@default)
137 Set the default target that when none is specified to dune build.
138
139 --diff-command=VAL (absent DUNE_DIFF_COMMAND env)
140 Shell command to use to diff files. Use - to disable printing the
141 diff.
142
143 --disable-promotion (absent DUNE_DISABLE_PROMOTION env)
144 Disable all promotion rules
145
146 --display=MODE
147 Control the display mode of Dune. See dune-config(5) for more
148 details. Valid values for this option are One of progress, verbose,
149 short or quiet
150
151 --dump-memo-graph=FILE
152 Dumps the dependency graph to a file after the build is complete
153
154 --dump-memo-graph-format=FORMAT (absent=gexf)
155 File format to be used when dumping dependency graph
156
157 --dump-memo-graph-with-timing
158 With --dump-memo-graph, will re-run each cached node in the Memo
159 graph after building and include the runtime in the output. Since
160 all nodes contain a cached value, this will measure just the
161 runtime of each node
162
163 --help[=FMT] (default=auto)
164 Show this help in format FMT. The value FMT must be one of auto,
165 pager, groff or plain. With auto, the format is pager or plain
166 whenever the TERM env var is dumb or undefined.
167
168 --ignore-promoted-rules
169 Ignore rules with (mode promote), except ones with (only ...). The
170 variable %{ignoring_promoted_rules} in dune files reflects whether
171 this option was passed or not.
172
173 --instrument-with=BACKENDS (absent DUNE_INSTRUMENT_WITH env)
174 "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
175 list of library names, each one of which must declare an
176 instrumentation backend.
177
178 -j JOBS
179 Run no more than JOBS commands simultaneously.
180
181 --no-buffer
182 Do not buffer the output of commands executed by dune. By default
183 dune buffers the output of subcommands, in order to prevent
184 interleaving when multiple commands are executed in parallel.
185 However, this can be an issue when debugging long running tests.
186 With --no-buffer, commands have direct access to the terminal. Note
187 that as a result their output won't be captured in the log file.
188 You should use this option in conjunction with -j 1, to avoid
189 interleaving. Additionally you should use --verbose as well, to
190 make sure that commands are printed before they are being executed.
191
192 --no-config
193 Do not load the configuration file
194
195 --no-print-directory
196 Suppress "Entering directory" messages
197
198 --only-packages=PACKAGES
199 Ignore stanzas referring to a package that is not in PACKAGES.
200 PACKAGES is a comma-separated list of package names. Note that this
201 has the same effect as deleting the relevant stanzas from dune
202 files. It is mostly meant for releases. During development, it is
203 likely that what you want instead is to build a particular
204 <package>.install target.
205
206 -p PACKAGES, --for-release-of-packages=PACKAGES (required)
207 Shorthand for --release --only-packages PACKAGE. You must use this
208 option in your <package>.opam files, in order to build only what's
209 necessary when your project contains multiple packages as well as
210 getting reproducible builds.
211
212 --print-metrics
213 Print out various performance metrics after every build
214
215 --profile=VAL (absent DUNE_PROFILE env)
216 Select the build profile, for instance dev or release. The default
217 is dev.
218
219 --promote-install-files[=VAL] (default=true)
220 Promote the generated <package>.install files to the source tree
221
222 --release
223 Put dune into a reproducible release mode. This is in fact a
224 shorthand for --root . --ignore-promoted-rules --no-config
225 --profile release --always-show-command-line
226 --promote-install-files --default-target @install
227 --require-dune-project-file. You should use this option for release
228 builds. For instance, you must use this option in your
229 <package>.opam files. Except if you already use -p, as -p implies
230 this option.
231
232 --require-dune-project-file[=VAL] (default=true)
233 Fail if a dune-project file is missing.
234
235 --root=DIR
236 Use this directory as workspace root instead of guessing it. Note
237 that this option doesn't change the interpretation of targets given
238 on the command line. It is only intended for scripts.
239
240 --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env)
241 Store original source location in dune-package metadata
242
243 --terminal-persistence=MODE
244 Changes how the log of build results are displayed to the console
245 between rebuilds while in --watch mode. Supported modes: preserve,
246 clear-on-rebuild, clear-on-rebuild-and-flush-history.
247
248 --trace-file=FILE
249 Output trace data in catapult format (compatible with
250 chrome://tracing)
251
252 --verbose
253 Same as --display verbose
254
255 --version
256 Show version information.
257
258 --workspace=FILE (absent DUNE_WORKSPACE env)
259 Use this specific workspace file instead of looking it up.
260
261 -x VAL
262 Cross-compile using this toolchain.
263
265 Use `dune COMMAND --help' for help on a single command.
266
268 utop exits with the following status:
269
270 0 on success.
271
272 123 on indiscriminate errors reported on standard error.
273
274 124 on command line parsing errors.
275
276 125 on unexpected internal errors (bugs).
277
279 These environment variables affect the execution of utop:
280
281 DUNE_BUILD_DIR
282 Specified build directory. _build if unspecified
283
284 DUNE_CACHE
285 Enable or disable Dune cache (either enabled or disabled). Default
286 is `disabled'.
287
288 DUNE_CACHE_CHECK_PROBABILITY
289 Check build reproducibility by re-executing randomly chosen rules
290 and comparing their results with those stored in Dune cache. Note:
291 by increasing the probability of such checks you slow down the
292 build. The default probability is zero, i.e. no rules are checked.
293
294 DUNE_CACHE_STORAGE_MODE
295 Dune cache storage mode (one of auto, hardlink or copy). Default is
296 `auto'.
297
298 DUNE_DIFF_COMMAND
299 Shell command to use to diff files. Use - to disable printing the
300 diff.
301
302 DUNE_DISABLE_PROMOTION
303 Disable all promotion rules
304
305 DUNE_INSTRUMENT_WITH
306 "Enable instrumentation by BACKENDS. BACKENDS is a comma-separated
307 list of library names, each one of which must declare an
308 instrumentation backend.
309
310 DUNE_PROFILE
311 Build profile. dev if unspecified or release if -p is set.
312
313 DUNE_SANDBOX
314 Sandboxing mode to use by default. (see --sandbox)
315
316 DUNE_STORE_ORIG_SOURCE_DIR
317 Store original source location in dune-package metadata
318
319 DUNE_WORKSPACE
320 Use this specific workspace file instead of looking it up.
321
323 Check bug reports at https://github.com/ocaml/dune/issues
324
326 dune(1)
327
328
329
330Dune n/a DUNE-UTOP(1)