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

NAME

6       dune-upgrade - Upgrade jbuilder projects to dune
7

SYNOPSIS

9       dune upgrade [OPTION]…
10

DESCRIPTION

12       dune upgrade upgrade all the jbuilder projects in the workspace to Dune
13

OPTIONS

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

MORE HELP

262       Use `dune COMMAND --help' for help on a single command.
263

EXIT STATUS

265       upgrade exits with the following status:
266
267       0   on success.
268
269       123 on indiscriminate errors reported on standard error.
270
271       124 on command line parsing errors.
272
273       125 on unexpected internal errors (bugs).
274

ENVIRONMENT

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

BUGS

320       Check bug reports at https://github.com/ocaml/dune/issues
321

SEE ALSO

323       dune(1)
324
325
326
327Dune n/a                                                       DUNE-UPGRADE(1)
Impressum