DUNE-PRINTENV(1)

πŸ’– DUNE-PRINTENV(1) πŸ’–

okay bestie, welcome to the dune-printenv(1) page β€” it's giving alias energy, and we're about to make it make sense. 🫢


✨ NAME ✨

dune-printenv β€” an alias for env. literally just a nickname situation. πŸ’…


🌈 SYNOPSIS 🌈

dune printenv [OPTION]… [PATH]

πŸ¦‹ DESCRIPTION πŸ¦‹

dune printenv is an alias for dune env. no cap. πŸ“–

For the full tea, see dune env --help. ✨


πŸ’… OPTIONS πŸ’…

  • --action-stderr-on-success=VAL β€” same vibe as --action-stdout-on-success but 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. 🧼
  • --action-stdout-on-success=VAL β€” specify how to deal with the standard output of actions when they succeed. Possible values are: print to just print it to Dune's output, swallow to completely ignore it and must-be-empty to enforce that the action printed nothing. With must-be-empty, Dune will consider that the action failed if it printed something to its standard output. The default is print. πŸ‘‘
  • --build-info β€” show build information. πŸ› οΈ
  • --display-separate-messages β€” separate error messages with a blank line. 🫧
  • --error-reporting=VAL (absent=deterministic) β€” controls when the build errors are reported. early reports errors as soon as they are discovered. deterministic reports errors at the end of the build in a deterministic order. twice reports each error twice: once as soon as the error is discovered and then again at the end of the build, in a deterministic order. 😭
  • -f, --force β€” force actions associated to aliases to be re-executed even if their dependencies haven't changed. πŸ”₯
  • --field=FIELD β€” only print this field. This option can be repeated multiple times to print multiple fields. 🌸
  • --file-watcher=VAL (absent=automatic) β€” mechanism to detect changes in the source. Automatic to make dune run an external program to detect changes. Manual to notify dune that files have changed manually. πŸ‘€
  • --passive-watch-mode β€” similar to [--watch], but only start a build when instructed externally by an RPC. πŸ“‘
  • --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. πŸ“¦
  • --stop-on-first-error β€” stop the build as soon as an error is encountered. βœ‹
  • -w, --watch β€” instead of terminating build after completion, wait continuously for file changes. πŸ”
  • --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. πŸ•°οΈ

πŸ›οΈ COMMON OPTIONS πŸ›οΈ

These options are common to all commands. periodt. πŸ’–

  • --always-show-command-line β€” always show the full command lines of programs executed by dune. πŸ“œ
  • --auto-promote β€” automatically promote files. This is similar to running dune promote after the build. πŸš€
  • --build-dir=FILE (absent DUNE_BUILD_DIR env) β€” specified build directory. _build if unspecified. πŸ“
  • --cache=VAL (absent DUNE_CACHE env) β€” enable or disable Dune cache (one of disabled, enabled-except-user-rules or enabled). Default is `enabled-except-user-rules'. πŸ’Ύ
  • --cache-check-probability=VAL (absent DUNE_CACHE_CHECK_PROBABILITY env) β€” 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. 🎲
  • --cache-storage-mode=VAL (absent DUNE_CACHE_STORAGE_MODE env) β€” Dune cache storage mode (one of auto, hardlink or copy). Default is `hardlink'. πŸ—„οΈ
  • --config-file=FILE β€” load this configuration file instead of the default one. βš™οΈ
  • --debug-backtraces β€” always print exception backtraces. πŸ›
  • --debug-dependency-path β€” in case of error, print the dependency path from the targets on the command line to the rule that failed. 🧭
  • --debug-package-logs (absent DUNE_DEBUG_PACKAGE_LOGS env) β€” always print the standard logs when building packages. πŸ“¦
  • --default-target=TARGET (absent=@@default) β€” set the default target that is used when none is specified to dune build. 🎯
  • --diff-command=VAL (absent DUNE_DIFF_COMMAND env) β€” shell command to use to diff files. Use - to disable printing the diff. πŸ”
  • --disable-promotion (absent DUNE_DISABLE_PROMOTION env) β€” disable all promotion rules. 🚫
  • --display=MODE β€” control the display mode of Dune. See dune-config(5) for more details. Valid values for this option are progress, verbose, short, quiet or tui. πŸ–₯️
  • --dump-gc-stats=FILE β€” dump the garbage collector stats to a file after the build is complete. πŸ—‘οΈ
  • --help[=FMT] (default=auto) β€” show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined. πŸ†˜
  • --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 (absent DUNE_INSTRUMENT_WITH env) β€” enable instrumentation by BACKENDS. BACKENDS is a comma-separated list of library names, each one of which must declare an instrumentation backend. πŸŽ›οΈ
  • -j JOBS (absent DUNE_JOBS env) β€” run no more than JOBS commands simultaneously. JOBS must be a positive integer or auto to auto-detect the number of cores (the default). 🧡
  • --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 --verbose as well, to make sure that commands are printed before they are being executed. 🚨
  • --no-config β€” do not load the configuration file. πŸ™…β€β™€οΈ
  • --no-print-directory β€” suppress "Entering directory" messages. 🀫
  • --only-packages=PACKAGES β€” ignore stanzas referring to a package that is not in PACKAGES. PACKAGES is 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>.install target. πŸŽ€
  • -p PACKAGES, --for-release-of-packages=PACKAGES (required) β€” shorthand for --release --pkg=disabled --only-packages PACKAGE. You must use this option in your <package>.opam files, in order to build only what's necessary when your project contains multiple packages as well as getting reproducible builds. πŸ’―
  • --pkg=VAL β€” enable or disable package management. The default behaviour depends on whether a lock directory exists. πŸ”
  • --profile=VAL (absent DUNE_PROFILE env) β€” select the build profile, for instance dev or release. The default is dev. 🌱
  • --promote-install-files[=VAL] (default=true) β€” promote any generated <package>.install files 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>.opam files. Except if you already use -p, as -p implies this option. 🏁
  • --require-dune-project-file[=VAL] (default=true) β€” fail if a dune-project file is missing. πŸ“„
  • --root=DIR (absent DUNE_ROOT env) β€” 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. 🌲
  • --store-orig-source-dir (absent DUNE_STORE_ORIG_SOURCE_DIR env) β€” store original source location in dune-package metadata. πŸ“Œ
  • --target-exec=TOOLCHAIN=CMD (absent DUNE_TARGET_EXEC env) β€” 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 --watch mode. Supported modes: preserve, clear-on-rebuild, clear-on-rebuild-and-flush-history. πŸ–ΌοΈ
  • --trace-file=FILE β€” output trace data in catapult format (compatible with chrome://tracing). πŸ“Š
  • --verbose β€” same as --display verbose. πŸ—£οΈ
  • --version β€” show version information. 🏷️
  • --watch-exclusions=REGEX β€” adds a POSIX regular expression that will exclude matching directories from dune build --watch. The option --watch-exclusions can 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-exclusions are used, none of the standard exclusions are used. The standard exclusions are: ^_opam /_opam ^_esy /_esy ^\.#.* /\.#.* ~$ ^#[^#]*#$ /#[^#]*#$ ^4913$ /4913$ /.git /.hg :/windows. 🚫
  • --workspace=FILE (absent DUNE_WORKSPACE env) β€” use this specific workspace file instead of looking it up. πŸ—‚οΈ
  • -x VAL (absent DUNE_CROSS_TARGET env) β€” cross-compile using this toolchain. πŸ”€

πŸ“¬ MORE HELP πŸ“¬

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


🚦 EXIT STATUS 🚦

dune printenv exits with:

  • 0 on success. βœ…
  • 1 if an error happened. ❌
  • 130 if it was interrupted by a signal. ⚑

🌸 ENVIRONMENT 🌸

okay bestie, this is the part where the environment gets to have opinions πŸ’… these env vars all change how printenv runs, so listen up:

  • DUNE_BUILD_DIR β€” tells Dune where the build directory lives. if you don't say anything, it's just _build, no biggie.
  • DUNE_CACHE β€” turns the Dune cache on or off. you pick one of disabled, enabled-except-user-rules or enabled. the default is enabled-except-user-rules ✨
  • DUNE_CACHE_CHECK_PROBABILITY β€” checks whether builds are reproducible by re-running randomly chosen rules and comparing the results to what's already stored in the Dune cache. ⚠️ heads up though: the higher you crank this probability, the slower your build gets. default is zero, aka no rules get checked at all.
  • DUNE_CACHE_STORAGE_MODE β€” how the Dune cache stores stuff. one of auto, hardlink or copy. default is hardlink 🫢
  • DUNE_CROSS_TARGET β€” cross-compile using this toolchain.
  • DUNE_DEBUG_PACKAGE_LOGS β€” always print the standard logs when building packages. yes ma'am, always. 😌
  • DUNE_DIFF_COMMAND β€” the shell command used to diff files. use - to disable printing the diff entirely.
  • DUNE_DISABLE_PROMOTION β€” disables all promotion rules. all of them. gone. πŸ’€
  • DUNE_INSTRUMENT_WITH β€” enable instrumentation by BACKENDS. BACKENDS is a comma-separated list of library names, and every single one of them has to declare an instrumentation backend.
  • DUNE_JOBS β€” run no more than JOBS commands at the same time. JOBS has to be a positive integer, or auto to auto-detect the number of cores (which is the default, bestie 🧚).
  • DUNE_PROFILE β€” the build profile. dev if you didn't specify anything, or release if -p is set.
  • DUNE_ROOT β€” use this directory as the workspace root instead of letting Dune guess it. ngl, this one's a little specific: it does not change how targets given on the command line get interpreted. it's only meant for scripts. πŸ“œ
  • DUNE_SANDBOX β€” the sandboxing mode to use by default. (go peek at --sandbox for the deets πŸ‘€)
  • DUNE_STORE_ORIG_SOURCE_DIR β€” store the original source location in dune-package metadata.
  • DUNE_TARGET_EXEC β€” a wrapper command for running target binaries when you're cross-compiling. format is TOOLCHAIN=CMD (like, for example, 'windows=wine').
  • DUNE_WORKSPACE β€” use this specific workspace file instead of looking one up. main character energy, honestly πŸ‘‘

πŸ› BUGS πŸ›

found something cursed? check the bug reports at https://github.com/ocaml/dune/issues β€” the devs wanna hear it fr fr πŸ™ˆ


πŸ‘€ SEE ALSO πŸ‘€


okay that's the whole page bestie, you ate that πŸ’– this was DUNE-PRINTENV(1) from Dune 3.24.1 β€” go forth and print your environment variables like the iconique queen you are πŸ‘‘βœ¨ periodt.

πŸ“¦ where this page comes from