DUNE-DESCRIBE(1)

NAME

dune-describe - Describe the workspace.

SYNOPSIS

dune describe [COMMAND] …

DESCRIPTION

Describe what is in the current workspace in either human or machine readable form. By default, this command output a human readable description of the current workspace. This output is aimed at human and is not suitable for machine processing. In particular, it is not versioned. 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 as well as the --lang option to get a stable output.

COMMANDS

aliases [OPTION]… [DIR]…
    Print aliases in a given directory. Works similarly to ls.

contexts [OPTION]…
    List the build contexts available in the workspace.

depexts [OPTION]…
    Print the list of all the available depexts

env [OPTION]… [PATH]
    Print the environment of a directory.

external-lib-deps [OPTION]…
    Print out external libraries needed to build the project. It's an approximated set of libraries.

installed-libraries [OPTION]…
    Print out libraries installed on the system.

location [OPTION]… PROG
    Print the path to the executable using the same resolution logic as [dune exec].

opam-files [OPTION]…
    Print information about the opam files that have been discovered.

package-entries [OPTION]…
    prints information about the entries per package.

pkg COMMAND …
    Subcommands related to package management

pp [OPTION]… FILE
    Build a given FILE and print the preprocessed output.

rules [OPTION]… [TARGET]…
    Dump rules.

targets [OPTION]… [DIR]…
    Print targets in a given directory. Works similarly to ls.

tests [OPTION]…
    Print out the tests defined in the project. The output format of this command is experimental and is subject to change without warning

workspace [OPTION]… [DIRS]…
    Print a description of the workspace's structure. If some directories DIRS are provided, then only those directories of the workspace are considered.

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.

OPTIONS

--action-stderr-on-success=VAL
    Same 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.

--context=CONTEXT (absent=default)
    Build context to use.

--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.

--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.

--format=FORMAT (absent=sexp)
    FORMAT must be either sexp or csexp

--lang=VERSION (absent=0.1)
    Behave the same as this version of Dune.

--no-recursive
    Do not traverse subdirectories. Only consider the provided directories, or the workspace root when none are given.

--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.

--sanitize-for-tests
    Sanitize the absolute paths in workspace items, and the associated UIDs, so that the output is reproducible.

--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.

--with-deps
    Whether the dependencies between modules should be printed.

--with-pps
    Whether the dependencies towards ppx-rewriters (that are called at compile time) should be taken into account.

COMMON OPTIONS

These options are common to all commands.

--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 describe exits with:

0   on success.

1   if an error happened.

130 if it was interrupted by a signal.

ENVIRONMENT

These environment variables affect the execution of describe:

DUNE_BUILD_DIR
    Specified build directory. _build if unspecified

DUNE_CACHE
    Enable or disable Dune cache (one of disabled, enabled-except-user-rules or enabled). Default is `enabled-except-user-rules'.

DUNE_CACHE_CHECK_PROBABILITY
    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.

DUNE_CACHE_STORAGE_MODE
    Dune cache storage mode (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

DUNE_DIFF_COMMAND
    Shell command to use to diff files. Use - to disable printing the diff.

DUNE_DISABLE_PROMOTION
    Disable all promotion rules

DUNE_INSTRUMENT_WITH
    Enable instrumentation by BACKENDS. BACKENDS is a comma-separated list of library names, each one of which must declare an instrumentation backend.

DUNE_JOBS
    Run no more than JOBS commands simultaneously. JOBS must be a positive integer or auto to auto-detect the number of cores (the default).

DUNE_PROFILE
    Build profile. dev if unspecified or release if -p is 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 is only intended for scripts.

DUNE_SANDBOX
    Sandboxing mode to use by default. (see --sandbox)

DUNE_STORE_ORIG_SOURCE_DIR
    Store original source location in dune-package metadata.

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

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

SEE ALSO

dune(1)