This commit is contained in:
swrup 2025-11-11 02:07:51 +01:00
parent aa2ff7b2f0
commit 2f3113f55d
11742 changed files with 1223940 additions and 0 deletions

View file

@ -0,0 +1 @@
(rule (action (system "something")))

View file

@ -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]

View file

@ -0,0 +1,7 @@
(rule
(action (write-file b "It should work as well!")))
(alias
(name infer)
(deps b)
(action (cat %{deps})))

View file

@ -0,0 +1,4 @@
But should work with the long form as well:
$ dune build @infer
It should work as well!

View file

@ -0,0 +1 @@
(rule (action (echo "something")))

View file

@ -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]

View file

@ -0,0 +1,6 @@
(rule (write-file b "It worked!"))
(alias
(name infer)
(deps b)
(action (cat %{deps})))

View file

@ -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!