Skip to content

Commit 989f67e

Browse files
authored
refactor: remove unused extra_bindings argument (#13507)
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent 72c2d3f commit 989f67e

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

src/dune_rules/simple_rules.ml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ let add_user_rule
8888
Super_context.add_rule_get_targets sctx ~dir ~mode ~loc:rule.loc action
8989
;;
9090

91-
let user_rule sctx ?extra_bindings ~dir ~expander (rule : Rule_conf.t) =
91+
let user_rule sctx ~dir ~expander (rule : Rule_conf.t) =
9292
Expander.eval_blang expander rule.enabled_if
9393
>>= function
9494
| false ->
@@ -115,11 +115,6 @@ let user_rule sctx ?extra_bindings ~dir ~expander (rule : Rule_conf.t) =
115115
in
116116
Targets_spec.Static { multiplicity; targets }
117117
in
118-
let expander =
119-
match extra_bindings with
120-
| None -> expander
121-
| Some bindings -> Expander.add_bindings expander ~bindings
122-
in
123118
let* action =
124119
let chdir = Expander.dir expander in
125120
Action_unexpanded.expand
@@ -286,7 +281,7 @@ let copy_files sctx ~dir ~expander ~src_dir (def : Copy_files.t) =
286281
| false -> Memo.return Path.Set.empty
287282
;;
288283

289-
let alias sctx ?extra_bindings ~dir ~expander (alias_conf : Alias_conf.t) =
284+
let alias sctx ~dir ~expander (alias_conf : Alias_conf.t) =
290285
let alias = Alias.make ~dir alias_conf.name in
291286
let loc = alias_conf.loc in
292287
Alias_rules.check_empty ~loc ~dir alias
@@ -300,11 +295,6 @@ let alias sctx ?extra_bindings ~dir ~expander (alias_conf : Alias_conf.t) =
300295
Rules.Produce.Alias.add_deps alias ~loc builder
301296
| Some (action_loc, action) ->
302297
let action =
303-
let expander =
304-
match extra_bindings with
305-
| None -> expander
306-
| Some bindings -> Expander.add_bindings expander ~bindings
307-
in
308298
let chdir = Expander.dir expander in
309299
Action_unexpanded.expand_no_targets
310300
action

src/dune_rules/simple_rules.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ end
1616
(** Interpret a [(rule ...)] stanza and return the targets it produces, if any. *)
1717
val user_rule
1818
: Super_context.t
19-
-> ?extra_bindings:Value.t list Pform.Map.t
2019
-> dir:Path.Build.t
2120
-> expander:Expander.t
2221
-> Rule_conf.t
@@ -34,7 +33,6 @@ val copy_files
3433
(** Interpret an [(alias ...)] stanza. *)
3534
val alias
3635
: Super_context.t
37-
-> ?extra_bindings:Value.t list Pform.Map.t
3836
-> dir:Path.Build.t
3937
-> expander:Expander.t
4038
-> Alias_conf.t

0 commit comments

Comments
 (0)