DUNE-SHUTDOWN(1)
π dune-shutdown, from the Dune Manual
okay so hi bestie π welcome to dune-shutdown(1) β yeah, it's in the Dune Manual, one of the dune girlies, and it is exactly what it sounds like: it cancels everything and shuts the whole thing down. no notes, no mercy, slay.
β¨ NAME β¨
dune-shutdown β Cancel and shutdown any builds in the current workspace.
like, all of them. right now. the workspace is closing bestie, go home π«Ά
π¦ SYNOPSIS π¦
dune shutdown [OPTION]β¦
that's it. that's the whole vibe. you just say dune shutdown and add whatever options your little heart desires. β¨
π OPTIONS π
okay this is the long part but stay with me, it's all good info i promise πΈ
--action-stderr-on-success=VALβ Same as--action-stdout-on-successbut for standard error instead of standard output. A good default for large mono-repositories is--action-stdout-on-success=swallow--action-stderr-on-success=must-be-empty. This ensures that a successful build has a "clean" empty output. clean output is such a mood honestly π§Όβ¨--action-stdout-on-success=VALβ Specify how to deal with the standard output of actions when they succeed. Possible values are:printto just print it to Dune's output,swallowto completely ignore it andmust-be-emptyto enforce that the action printed nothing. Withmust-be-empty, Dune will consider that the action failed if it printed something to its standard output. The default isprint.--build-infoβ Show build information. like a little get-to-know-me for your build π--display-separate-messagesβ Separate error messages with a blank line. breathing room for your errors β¨--error-reporting=VAL(absent=deterministic) β Controls when the build errors are reported.earlyreports errors as soon as they are discovered.deterministicreports errors at the end of the build in a deterministic order.twicereports each error twice: once as soon as the error is discovered and then again at the end of the build, in a deterministic order. (not me making you read the same error twice, but ok, it's literally an option π)-f,--forceβ Force actions associated to aliases to be re-executed even if their dependencies haven't changed. no thoughts, just re-run π₯--file-watcher=VAL(absent=automatic) β Mechanism to detect changes in the source.Automaticto make dune run an external program to detect changes.Manualto notify dune that files have changed manually. bestie you can literally just tell dune. iconic π«Ά--passive-watch-modeβ Similar to [--watch], but only start a build when instructed externally by an RPC. it just waits. patiently. for you. π--sandbox=VAL(absentDUNE_SANDBOXenv) β Set sandboxing mode. Some actions require a certain sandboxing mode, so they will ignore this setting. The allowed values are:none,symlink,copy,hardlink.--stop-on-first-errorβ Stop the build as soon as an error is encountered. one strike and we're out β-w,--watchβ Instead of terminating build after completion, wait continuously for file changes. it's giving main character who never leaves the party π--wait-for-filesystem-clockβ Dune digest file contents for better incrementally. These digests are themselves cached. In some cases, Dune needs to drop some digest cache entries in order for things to be reliable. This option makes Dune wait for the file system clock to advance so that it doesn't need to drop anything. You should probably not care about this option; it is mostly useful for Dune developers to make Dune tests of the digest cache more reproducible. fr fr, it's for the dune devs, not you, no cap π
π«Ά COMMON OPTIONS π«Ά
these are the ones that show up all over dune, so like, they're basically family at this point π
--always-show-command-lineβ Always show the full command lines of programs executed by dune.--auto-promoteβ Automatically promote files. This is similar to runningdune promoteafter the build. auto-glow-up β¨--build-dir=FILE(absentDUNE_BUILD_DIRenv) β Specified build directory._buildif unspecified. (gender-neutral, iconic, classic_buildπ)--cache=VAL(absentDUNE_CACHEenv) β Enable or disable Dune cache (one ofdisabled,enabled-except-user-rulesorenabled). Default isenabled-except-user-rules.--cache-check-probability=VAL(absentDUNE_CACHE_CHECK_PROBABILITYenv) β Check build reproducibility by re-executing randomly chosen rules and comparing their results with those stored in Dune cache. Note: by increasing the probability of such checks you slow down the build. The default probability is zero, i.e. no rules are checked. zero checks by default because girl we are BUSY π--cache-storage-mode=VAL(absentDUNE_CACHE_STORAGE_MODEenv) β Dune cache storage mode (one ofauto,hardlinkorcopy). Default ishardlink.--config-file=FILEβ Load this configuration file instead of the default one.--debug-backtracesβ Always print exception backtraces. they said the quiet part OUT LOUD π--debug-dependency-pathβ In case of error, print the dependency path from the targets on the command line to the rule that failed. it's giving receipts π§Ύβ¨--debug-package-logs(absentDUNE_DEBUG_PACKAGE_LOGSenv) β Always print the standard logs when building packages.--default-target=TARGET(absent=@@default) β Set the default target that is used when none is specified todune build.--diff-command=VAL(absentDUNE_DIFF_COMMANDenv) β Shell command to use to diff files. Use-to disable printing the diff.--disable-promotion(absentDUNE_DISABLE_PROMOTIONenv) β Disable all promotion rules. nobody's getting promoted today, not on my watch π--display=MODEβ Control the display mode of Dune. Seedune-config(5)for more details. Valid values for this option areprogress,verbose,short,quietortui. pick your aesthetic bestie π--dump-gc-stats=FILEβ Dump the garbage collector stats to a file after the build is complete. garbage stats? in THIS economy? π--help[=FMT](default=auto) β Show this help in formatFMT. The valueFMTmust be one ofauto,pager,grofforplain. Withauto, the format ispagerorplainwhenever theTERMenv var isdumbor undefined. (theTERMvar beingdumbis genuinely sending me π)--ignore-promoted-rulesβ Ignore rules with(mode promote), except ones with(only ...). The variable%{ignoring_promoted_rules}in dune files reflects whether this option was passed or not.--instrument-with=BACKENDS(absentDUNE_INSTRUMENT_WITHenv) β Enable instrumentation byBACKENDS.BACKENDSis a comma-separated list of library names, each one of which must declare an instrumentation backend.-j JOBS(absentDUNE_JOBSenv) β Run no more thanJOBScommands simultaneously.JOBSmust be a positive integer orautoto auto-detect the number of cores (the default). parallelism, the actual love language π₯--no-bufferβ Do not buffer the output of commands executed by dune. By default dune buffers the output of subcommands, in order to prevent interleaving when multiple commands are executed in parallel. However, this can be an issue when debugging long running tests. With--no-buffer, commands have direct access to the terminal. Note that as a result their output won't be captured in the log file. You should use this option in conjunction with-j 1, to avoid interleaving. Additionally you should use--verboseas well, to make sure that commands are printed before they are being executed. yes it's a whole combo, order it like a meal π--no-configβ Do not load the configuration file.--no-print-directoryβ Suppress "Entering directory" messages. (bestie we KNOW where we are π)--only-packages=PACKAGESβ Ignore stanzas referring to a package that is not inPACKAGES.PACKAGESis a comma-separated list of package names. Note that this has the same effect as deleting the relevant stanzas from dune files. It is mostly meant for releases. During development, it is likely that what you want instead is to build a particular<package>.installtarget.-p PACKAGES,--for-release-of-packages=PACKAGES(required) β Shorthand for--release --pkg=disabled --only-packages PACKAGE. You must use this option in your<package>.opamfiles, in order to build only what's necessary when your project contains multiple packages as well as getting reproducible builds. this one is REQUIRED, not optional, do not skip it π--pkg=VALβ Enable or disable package management. The default behaviour depends on whether a lock directory exists.--profile=VAL(absentDUNE_PROFILEenv) β Select the build profile, for instancedevorrelease. The default isdev. dev girlies stay winning π±--promote-install-files[=VAL](default=true) β Promote any generated<package>.installfiles to the source tree.--releaseβ Put dune into a reproducible release mode. Shorthand for--root .--ignore-promoted-rules--no-config--profile release--always-show-command-line--promote-install-files--require-dune-project-file--default-target @install. You should use this option for release builds. For instance, you must use this option in your<package>.opamfiles. Except if you already use-p, as-pimplies this option. the everything-bagel of release flags π--require-dune-project-file[=VAL](default=true) β Fail if adune-projectfile is missing. nodune-project, no service π--root=DIR(absentDUNE_ROOTenv) β Use this directory as workspace root instead of guessing it. Note that this option doesn't change the interpretation of targets given on the command line. It is only intended for scripts. scripts only, bestie, don't get creative π--store-orig-source-dir(absentDUNE_STORE_ORIG_SOURCE_DIRenv) β Store original source location indune-packagemetadata.--target-exec=TOOLCHAIN=CMD(absentDUNE_TARGET_EXECenv) β Wrapper command for running target binaries when cross-compiling. Format:TOOLCHAIN=CMD(e.g.,'windows=wine').--terminal-persistence=MODEβ Change how the log of build results are displayed to the console between rebuilds while in--watchmode. Supported modes:preserve,clear-on-rebuild,clear-on-rebuild-and-flush-history. aesthetic choices for your scrollback β¨--trace-file=FILEβ Output trace data in catapult format (compatible withchrome://tracing). yes typingchrome://tracinginto chrome is a real thing, slay π--verboseβ Same as--display verbose.--versionβ Show version information. what's your version bestie π--watch-exclusions=REGEXβ Adds a POSIX regular expression that will exclude matching directories fromdune build --watch. The option--watch-exclusionscan be repeated to add multiple exclusions. Semicolons can be also used as a separator. If no exclusions are provided, then a standard set of exclusions is used; however, if one or more--watch-exclusionsare used, none of the standard exclusions are used. The standard exclusions are:^_opam/_opam^_esy/_esy^\.#.*/\.#.*~$^#[^#]*#$/#[^#]*#$^4913$/4913$/.git/.hg:/windows. that's the whole list, character for character, no edits, periodt π--workspace=FILE(absentDUNE_WORKSPACEenv) β Use this specific workspace file instead of looking it up.-x VAL(absentDUNE_CROSS_TARGETenv) β Cross-compile using this toolchain. going to another platform? we ride π¦
π EXIT STATUS π
dune shutdown exits with:
0β on success. we ate π1β if an error happened. ngl it happens π130β if it was interrupted by a signal. someone hit Ctrl+C and ended the whole thing π«
okay bestie that's not even the whole story β there's MORE coming, don't go anywhere π«Άπ
πΈ ENVIRONMENT πΈ
okay bestie, so shutdown is lowkey nosy about your environment β these variables all change how it behaves, so let's go through them one by one π
DUNE_BUILD_DIRβ the build directory you're pointing at. If you don't say anything, it just assumes_buildlike the confident main character it is β¨DUNE_CACHEβ turns the Dune cache on or off. Your choices aredisabled,enabled-except-user-rules, orenabled. Default?enabled-except-user-rules, no cap πDUNE_CACHE_CHECK_PROBABILITYβ makes Dune check whether builds are reproducible by re-executing randomly chosen rules and comparing what they produce to what's stored in the Dune cache. Heads up though: the more you crank up the probability, the slower your build gets π. Default probability is zero, meaning literally no rules get checked.DUNE_CACHE_STORAGE_MODEβ how the Dune cache stores stuff. Pick one ofauto,hardlinkorcopy. Default ishardlinkπ«ΆDUNE_CROSS_TARGETβ cross-compile using this toolchain. that's it, that's the vibe πDUNE_DEBUG_PACKAGE_LOGSβ always prints the standard logs when building packages. for when you need to see everything πDUNE_DIFF_COMMANDβ the shell command used to diff files. Set it to-if you want the diff printing to just... stop π« (valid, honestly)DUNE_DISABLE_PROMOTIONβ disables all promotion rules. every single one. gone πDUNE_INSTRUMENT_WITHβ enables instrumentation by BACKENDS. BACKENDS here is a comma-separated list of library names, and every one of those libraries has to declare an instrumentation backend. no freeloaders π§DUNE_JOBSβ caps how many commands run at the same time at JOBS. JOBS has to be a positive integer, orautoto auto-detect your core count β andautois the default πDUNE_PROFILEβ the build profile.devif you don't specify anything, orreleaseif-pis set. two moods, pick one βDUNE_ROOTβ use this directory as the workspace root instead of letting Dune guess. Important though: this does not change how targets given on the command line get interpreted. It's only meant for scripts, iykyk πDUNE_SANDBOXβ the sandboxing mode to use by default. (peep--sandboxfor the deets ποΈ)DUNE_STORE_ORIG_SOURCE_DIRβ stores the original source location in thedune-packagemetadata. archival queen π¦DUNE_TARGET_EXECβ a wrapper command for running target binaries when you're cross-compiling. Format:TOOLCHAIN=CMD(like, for example,'windows=wine') π·DUNE_WORKSPACEβ use this specific workspace file instead of making Dune go look for one. decisive. obsessed π
π SEE ALSO π
dune(1)β go read that one too bestie, it's the whole ecosystem π¦
aaaand that's the whole page, fr fr π this was Dune 3.24.1, the DUNE-SHUTDOWN(1) manual page β thanks for reading all the way to the bottom, you're literally the best, slay π
β¨π
π¦ where this page comes from
- ubuntu stonking: ocaml-dune 3.24.1-4 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms