alias¶
- (alias ...)
Add dependencies to an alias.
Aliases do not need to be explicitly created, adding to a new name will “create” an alias. An alias with name
x
can be built by runningdune build @x
. See Aliases.The common use of the
alias
stanza is make an alias depend on other ones:(alias (name runtest) (deps (alias test-unit) (alias test-integration)))
Warning
In previous versions of the dune language, it was also possible to specify an action to run to construct the alias. Please use a rule stanza with the
alias
field instead.This stanza supports the following fields:
- (name <name>)
An alias name.
Attaching dependencies to
(name x)
will ensure they are built bydune build @x
.This field is required.
- (deps <deps-conf list)
Specifies the dependencies of the alias.
See Dependency Specification for more details.
This field is required.
- (enabled_if <blang expression>)
Specifies the Boolean condition that must be true for the tests to run.
The condition is specified using the Boolean Language, and the field allows for Variables to appear in the expressions.
- (action <action>)
Removed in version 2.0: use rule with the
alias
field instead.An action for constructing the alias.
- (package <name>)
Indicates that this alias stanza is part of package
<name>
and should be filtered out if<name>
is filtered out from the command line, either with--only-packages <pkgs>
or-p <pkgs>
.
- (locks (<lock-names>))
Specifies that the action must be run while holding the following locks. See Locks for more details.