File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
test/blackbox-tests/test-cases Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -131,10 +131,16 @@ let user_rule sctx ?extra_bindings ~dir ~expander (rule : Rule_conf.t) =
131
131
Some targets
132
132
| Aliases_only aliases ->
133
133
let + () =
134
- let action = interpret_and_add_locks ~expander rule.locks action.build in
135
- Memo. parallel_iter aliases ~f: (fun alias ->
136
- let alias = Alias. make ~dir alias in
137
- Alias_rules. add sctx ~alias ~loc: rule.loc action)
134
+ match List. map ~f: (Alias. make ~dir ) aliases with
135
+ | [] -> Code_error. raise " empty list of aliases" []
136
+ | alias :: extra_aliases ->
137
+ let loc = rule.loc in
138
+ interpret_and_add_locks ~expander rule.locks action.build
139
+ |> Alias_rules. add sctx ~alias ~loc
140
+ >>> Memo. parallel_iter extra_aliases ~f: (fun extra_alias ->
141
+ Dep. alias alias
142
+ |> Action_builder. dep
143
+ |> Rules.Produce.Alias. add_deps ~loc extra_alias)
138
144
in
139
145
None )
140
146
;;
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ Updating the dune-project file to use dune 3.5 allows the build to succeed:
64
64
$ dune build @a
65
65
I have run
66
66
$ dune build @b
67
- I have run
68
67
69
68
Also note having both the alias and aliases fields in the same rule stanza is
70
69
not allowed
@@ -112,7 +111,6 @@ Building both aliases at the same time should only run the action once
112
111
$ dune clean
113
112
$ dune build @a @b
114
113
I have run
115
- I have run
116
114
117
115
A similar test with a rule that produces a target
118
116
$ cat > dune << EOF
You can’t perform that action at this time.
0 commit comments