This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
(rule (action (system "something")))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.11)
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
When the rule action targets cannot be inferred by dune, we should make it explicit
|
||||
in the error message:
|
||||
|
||||
$ dune build
|
||||
File "dune", line 1, characters 0-36:
|
||||
1 | (rule (action (system "something")))
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Error: Rule has no targets specified
|
||||
[1]
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
(rule
|
||||
(action (write-file b "It should work as well!")))
|
||||
|
||||
(alias
|
||||
(name infer)
|
||||
(deps b)
|
||||
(action (cat %{deps})))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.11)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
But should work with the long form as well:
|
||||
|
||||
$ dune build @infer
|
||||
It should work as well!
|
||||
|
|
@ -0,0 +1 @@
|
|||
(rule (action (echo "something")))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.11)
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
When an action has no targets, an helpful error message is displayed:
|
||||
|
||||
$ dune build
|
||||
File "dune", line 1, characters 0-34:
|
||||
1 | (rule (action (echo "something")))
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Error: Rule has no targets specified
|
||||
[1]
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
(rule (write-file b "It worked!"))
|
||||
|
||||
(alias
|
||||
(name infer)
|
||||
(deps b)
|
||||
(action (cat %{deps})))
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.11)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
When a rule target can be be inferred from the rule action, the target or
|
||||
targets field can be omitted. This works with the short form of the rule
|
||||
stanza:
|
||||
|
||||
$ dune build @infer
|
||||
It worked!
|
||||
Loading…
Add table
Add a link
Reference in a new issue