DUNE-DESCRIBE(1)
π« dune-describe β the Dune Manual page, bestie edition π«
okay so. DUNE-DESCRIBE(1)? It lives in the Dune Manual. And basically it's your group chat with the workspace itself. Let's get into it π«Ά
β¨ NAME β¨
dune-describe β Describe the workspace. that's it. that's the whole job. and honestly? iconic.
π SYNOPSIS π
dune describe [COMMAND] β¦
π¦ DESCRIPTION π¦
So here's the vibe: this command tells you what's up in your current workspace, and it can do it in human form or machine form. Choose your fighter π
By default, it spits out a human readable description of the current workspace. Key word: human. This output is aimed at humans and it is NOT suitable for machine processing. Specifically, it is not versioned β so if you're out here trying to parse it from a program, hard no bestie π
If you want to interpret the output of this command from a program, you must use the --format option to specify a machine readable format, plus the --lang option to get a stable output. Both. Not one. Both. periodt π
π COMMANDS π
aliases [OPTION]β¦ [DIR]β¦β Print aliases in a given directory. It works similarly tols. lowkey serving the same energy πcontexts [OPTION]β¦β List the build contexts available in the workspace. all of them. every single one π«Άdepexts [OPTION]β¦β Print the list of all the available depexts. yes, all of them, no cap β¨env [OPTION]β¦ [PATH]β Print the environment of a directory. give it a PATH and it'll tell you the env, bestie πΈexternal-lib-deps [OPTION]β¦β Print out external libraries needed to build the project. heads up though: it's an approximated set of libraries. approx. not exact. don't come for me πinstalled-libraries [OPTION]β¦β Print out libraries installed on the system. the ones already on your machine, living their best life π§location [OPTION]β¦ PROGβ Print the path to the executable using the same resolution logic as[dune exec]. same brain, same logic, same answer πopam-files [OPTION]β¦β Print information about the opam files that have been discovered. the ones Dune found. like a little scavenger hunt π₯package-entries [OPTION]β¦β prints information about the entries per package. per package!! π¦pkg COMMAND β¦β Subcommands related to package management. it's the package management corner of the house πpp [OPTION]β¦ FILEβ Build a givenFILEand print the preprocessed output. build it, then show you the preprocessed glow-up βrules [OPTION]β¦ [TARGET]β¦β Dump rules. all the rules. dumped. πtargets [OPTION]β¦ [DIR]β¦β Print targets in a given directory. Works similarly tols. same energy asaliases, real ones know πtests [OPTION]β¦β Print out the tests defined in the project. β οΈ but the output format of this command is experimental and is subject to change without warning. like. don't build your whole pipeline on it. it's giving chaos πworkspace [OPTION]β¦ [DIRS]β¦β Print a description of the workspace's structure. And if some directories DIRS are provided, then only those directories of the workspace are considered. narrowing the scope, we love to see it β¨
πΈ ARGUMENTS πΈ
- DIRS β prints a description of the workspace's structure. If some directories DIRS are provided, then only those directories of the workspace are considered. yes it says the same thing as
workspaceup there. that's just how it is bestie π€·βοΈ
π OPTIONS π
--action-stderr-on-success=VALβ Same as--action-stdout-on-successbut for standard error instead of standard output. And listen: 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 girl aesthetic, but for builds β¨--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. those are the three (3) options, no more no less π--build-infoβ Show build information. the receipts π§Ύ--context=CONTEXT (absent=default)β Build context to use. if you don't say anything, it assumesdefaultπ--display-separate-messagesβ Separate error messages with a blank line. breathing room for your errors, honestly a mental health win π--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. pick your trauma timing bestie π-f,--forceβ Force actions associated to aliases to be re-executed even if their dependencies haven't changed. yes even then. forceful. we respect it π₯--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. you either let the machine watch, or you tell it yourself π--format=FORMAT (absent=sexp)βFORMATmust be eithersexporcsexp. those are the only two. don't try anything else π«--lang=VERSION (absent=0.1)β Behave the same as this version of Dune. it's a whole time machine vibe π°οΈ--no-recursiveβ Do not traverse subdirectories. Only consider the provided directories, or the workspace root when none are given. stay in your lane, literally πΈ--passive-watch-modeβ Similar to[--watch], but only start a build when instructed externally by an RPC. passive. waiting. main character energy that only moves when summoned π--sandbox=VAL (absent DUNE_SANDBOX env)β Set sandboxing mode. Some actions require a certain sandboxing mode, so they will ignore this setting. The allowed values are:none,symlink,copy,hardlink. four (4) values, and also heyyyy it reads theDUNE_SANDBOXenv var if you don't pass it π--sanitize-for-testsβ Sanitize the absolute paths in workspace items, and the associated UIDs, so that the output is reproducible. for reproducible output, as a treat π§--stop-on-first-errorβ Stop the build as soon as an error is encountered. no mercy. first error, we're out π€-w,--watchβ Instead of terminating build after completion, wait continuously for file changes. it just. keeps going. forever. watching. π--wait-for-filesystem-clockβ okay so: 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. And like β 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. it's an iykyk situation fr fr π--with-depsβ Whether the dependencies between modules should be printed. the module tea β--with-ppsβ Whether the dependencies towards ppx-rewriters (that are called at compile time) should be taken into account. ppx-rewriters, compile time, all of it, accounted for π¦
π«Ά okay that's part one bestie, but there's more coming β don't go anywhere π
π COMMON OPTIONS π
Okay bestie, these are the universal ones. Like, these work on every command, not just describe. Slay. π
--always-show-command-lineβ literally always show the full command lines of the programs dune runs. no hiding. π«Ά--auto-promoteβ auto-promote your files. it's basically the same as runningdune promoteright after the build. lowkey magic.--build-dir=FILE(absent β falls back to theDUNE_BUILD_DIRenv var) β the build directory you want. if you don't say anything it's_build. classic. β¨--cache=VAL(absent βDUNE_CACHEenv) β turn the Dune cache on or off. options aredisabled,enabled-except-user-rulesorenabled. the default?enabled-except-user-rules. she's the main character fr.--cache-check-probability=VAL(absent βDUNE_CACHE_CHECK_PROBABILITYenv) β check whether builds are reproducible by re-running randomly chosen rules and comparing their results to what's stored in the Dune cache. β οΈ note: the more you crank up this probability, the slower your build gets. default probability is zero, meaning nobody gets checked. zero thoughts, head empty.--cache-storage-mode=VAL(absent βDUNE_CACHE_STORAGE_MODEenv) β the Dune cache storage mode. one ofauto,hardlinkorcopy. default ishardlink. π--config-file=FILEβ load this config file instead of the default one. not like other configs.--debug-backtracesβ always print exception backtraces. for when you simply must know. π--debug-dependency-pathβ if something errors, print the dependency path all the way from the targets on the command line to the rule that failed. it's giving detective energy π--debug-package-logs(absent βDUNE_DEBUG_PACKAGE_LOGSenv) β always print the standard logs when building packages.--default-target=TARGET(absent =@@default) β set the default target used when you don't specify one todune build.--diff-command=VAL(absent βDUNE_DIFF_COMMANDenv) β the shell command used to diff files. pass-to disable printing the diff entirely. π--disable-promotion(absent βDUNE_DISABLE_PROMOTIONenv) β disable all promotion rules. nobody's promoting anything today, bestie.--display=MODEβ control how Dune displays stuff. checkdune-config(5)for the details. valid values areprogress,verbose,short,quietortui. pick your vibe π--dump-gc-stats=FILEβ dump the garbage collector stats to a file once the build is done. numbers, but make it fashion. β¨--help[=FMT](default=auto) β show this help in formatFMT.FMThas to be one ofauto,pager,grofforplain. withauto, the format ispagerorplainwhenever theTERMenv var isdumbor not set at all. she adapts. π--ignore-promoted-rulesβ ignore rules that have(mode promote), except the ones with(only ...). the variable%{ignoring_promoted_rules}in dune files reflects whether you passed this option or not. yep, she's watching. π--instrument-with=BACKENDS(absent βDUNE_INSTRUMENT_WITHenv) β enable instrumentation byBACKENDS.BACKENDSis a comma-separated list of library names, and every single one of them has to declare an instrumentation backend. no backend, no entry. π«-j JOBS(absent βDUNE_JOBSenv) β run no more thanJOBScommands at the same time.JOBShas to be a positive integer, orautoto auto-detect the number of cores (which is the default). auto-detect is so her. π§--no-bufferβ do not buffer the output of commands executed by dune. by default dune buffers subcommand output so nothing interleaves when multiple commands run in parallel. but that can be a whole issue when you're debugging long-running tests. with--no-buffer, the commands get direct access to the terminal. β οΈ heads up though: as a result their output won't be captured in the log file. you should use this option together with-j 1to avoid interleaving, and you should also use--verboseas well, to make sure commands are printed before they get executed. team work makes the dream work π«Ά--no-configβ don't load the configuration file. periodt.--no-print-directoryβ suppress theEntering directorymessages. quiet queen. π€«--only-packages=PACKAGESβ ignore any stanzas that refer to a package that's not inPACKAGES.PACKAGESis a comma-separated list of package names. note this does the exact same thing as deleting the relevant stanzas out of your dune files. it's mostly meant for releases. during development, what you probably actually 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, so that you only build what's necessary when your project has multiple packages, and so you get reproducible builds. yes, must. we don't make the rules (we do, actually, but still). π--pkg=VALβ enable or disable package management. the default behaviour depends on whether a lock directory exists. suspenseful.--profile=VAL(absent βDUNE_PROFILEenv) β pick the build profile, likedevorrelease. default isdev. πΈ--promote-install-files[=VAL](default=true) β promote any generated<package>.installfiles into the source tree.--releaseβ put dune into reproducible release mode. it's 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 for release builds β for instance, you must use it in your<package>.opamfiles. except if you already use-p, since-pimplies this option anyway. don't double up, bestie. π₯--require-dune-project-file[=VAL](default=true) β fail if adune-projectfile is missing. no file, no build. sorry. π--root=DIR(absent βDUNE_ROOTenv) β use this directory as the workspace root instead of guessing it. β οΈ note that this option does not change how targets given on the command line are interpreted. it's only meant for scripts. iykyk.--store-orig-source-dir(absent βDUNE_STORE_ORIG_SOURCE_DIRenv) β store the original source location in thedune-packagemetadata. receipts, kept. π§Ύ--target-exec=TOOLCHAIN=CMD(absent βDUNE_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 gets displayed on the console between rebuilds while you're in--watchmode. supported modes:preserve,clear-on-rebuild,clear-on-rebuild-and-flush-history.--trace-file=FILEβ output trace data in catapult format (compatible withchrome://tracing). fancy. β¨--verboseβ same as--display verbose. two ways, one vibe.--versionβ show version information.--watch-exclusions=REGEXβ adds a POSIX regular expression that excludes matching directories fromdune build --watch. you can repeat the--watch-exclusionsoption to add multiple exclusions, and semicolons work as a separator too. β οΈ here's the tea: if you provide no exclusions, a standard set gets used. but if you use one or more--watch-exclusions, none of the standard exclusions are used anymore. it's all or nothing, bestie. the standard exclusions are:^_opam /_opam ^_esy /_esy ^\.#.* /\.#.* ~$ ^#[^#]*#$ /#[^#]*#$ ^4913$ /4913$ /.git /.hg :/windows--workspace=FILE(absent βDUNE_WORKSPACEenv) β use this specific workspace file instead of looking one up.-x VAL(absent βDUNE_CROSS_TARGETenv) β cross-compile using this toolchain. π
π MORE HELP π
Need help with just one command? girly just run:
dune COMMAND --help
that's it. that's the whole tip. π
β EXIT STATUS β
dune describe exits with:
0β on success. we love a happy ending. π₯³1β if an error happened. π130β if it was interrupted by a signal. rip, she got interrupted mid-sentence. π
π¦ ENVIRONMENT π¦
these environment variables affect how describe runs, bestie. memorize them, or at least bookmark this. π
DUNE_BUILD_DIRβ specified build directory._buildif unspecified.DUNE_CACHEβ enable or disable the Dune cache (one ofdisabled,enabled-except-user-rulesorenabled). default isenabled-except-user-rules.DUNE_CACHE_CHECK_PROBABILITYβ check build reproducibility by re-executing randomly chosen rules and comparing their results with the ones stored in the Dune cache. β οΈ note: cranking this up slows your build down. the default probability is zero, i.e., no rules get checked.DUNE_CACHE_STORAGE_MODEβ Dune cache storage mode (one ofauto,hardlinkorcopy). default ishardlink.DUNE_CROSS_TARGETβ cross-compile using this toolchain.DUNE_DEBUG_PACKAGE_LOGSβ always print the standard logs when building packages.DUNE_DIFF_COMMANDβ shell command to diff files. use-to disable printing the diff.DUNE_DISABLE_PROMOTIONβ disable all promotion rules.DUNE_INSTRUMENT_WITHβ enable instrumentation byBACKENDS.BACKENDSis a comma-separated list of library names, each one of which must declare an instrumentation backend.DUNE_JOBSβ run no more thanJOBScommands simultaneously.JOBSmust be a positive integer orautoto auto-detect the number of cores (the default).DUNE_PROFILEβ build profile.devif unspecified, orreleaseif-pis set. πDUNE_ROOTβ 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's only intended for scripts.DUNE_SANDBOXβ sandboxing mode to use by default. (see--sandbox)DUNE_STORE_ORIG_SOURCE_DIRβ store original source location indune-packagemetadata.DUNE_TARGET_EXECβ wrapper command for running target binaries when cross-compiling. format:TOOLCHAIN=CMD(e.g.,windows=wine).DUNE_WORKSPACEβ use this specific workspace file instead of looking it up.
π«Ά BUGS π«Ά
found a bug? not cute. check bug reports at https://github.com/ocaml/dune/issues β the devs are literally so on it, fr fr. πβ¨
π SEE ALSO π
dune(1)β the main character herself.
<div align="center">
πβ¨ aaaand that's the whole page β¨π
sending you off with love from Dune 3.24.1, page DUNE-DESCRIBE(1) β go build something iconic, bestie. you got this. periodt. π
π¦πΈ
</div>
π¦ 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