@@ -4,11 +4,11 @@ module Rule = Dune_engine.Rule
44
55module Promote = struct
66 let into_decode =
7- let + loc, dir = located relative_file in
8- { Rule .Promote.Into. loc; dir }
7+ let + loc, dir = located String_with_vars. decode in
8+ { Rule_mode .Promote.Into. loc; dir }
99 ;;
1010
11- let decode : Rule .Promote.t Decoder.t =
11+ let decode : Rule_mode .Promote.t Decoder.t =
1212 fields
1313 (let + until_clean =
1414 field_b " until-clean" ~check: (Syntax. since Stanza. syntax (1 , 10 ))
@@ -20,27 +20,27 @@ module Promote = struct
2020 Option. map only ~f: (fun only ->
2121 Predicate. create (Predicate_lang.Glob. test only ~standard: Predicate_lang. true_))
2222 in
23- { Rule .Promote. lifetime = (if until_clean then Until_clean else Unlimited )
23+ { Rule_mode .Promote. lifetime = (if until_clean then Until_clean else Unlimited )
2424 ; into
2525 ; only
2626 })
2727 ;;
2828end
2929
3030let mode_decoders =
31- [ " standard" , return Rule.Mode .Standard
32- ; " fallback" , return Rule.Mode .Fallback
31+ [ " standard" , return Rule_mode .Standard
32+ ; " fallback" , return Rule_mode .Fallback
3333 ; ( " promote"
3434 , let + p = Promote. decode in
35- Rule.Mode .Promote p )
35+ Rule_mode .Promote p )
3636 ; ( " promote-until-clean"
3737 , let + () =
3838 Syntax. deleted_in
3939 Stanza. syntax
4040 (3 , 0 )
4141 ~extra_info: " Use the (promote (until-clean)) syntax instead."
4242 in
43- Rule.Mode .Promote { lifetime = Until_clean ; into = None ; only = None } )
43+ Rule_mode .Promote { lifetime = Until_clean ; into = None ; only = None } )
4444 ; ( " promote-into"
4545 , let + () = Syntax. since Stanza. syntax (1 , 8 )
4646 and + () =
@@ -49,7 +49,7 @@ let mode_decoders =
4949 (3 , 0 )
5050 ~extra_info: " Use the (promote (into <dir>)) syntax instead."
5151 and + into = Promote. into_decode in
52- Rule.Mode .Promote { lifetime = Unlimited ; into = Some into; only = None } )
52+ Rule_mode .Promote { lifetime = Unlimited ; into = Some into; only = None } )
5353 ; ( " promote-until-clean-into"
5454 , let + () = Syntax. since Stanza. syntax (1 , 8 )
5555 and + () =
@@ -58,9 +58,9 @@ let mode_decoders =
5858 (3 , 0 )
5959 ~extra_info: " Use the (promote (until-clean) (into <dir>)) syntax instead."
6060 and + into = Promote. into_decode in
61- Rule.Mode .Promote { lifetime = Until_clean ; into = Some into; only = None } )
61+ Rule_mode .Promote { lifetime = Until_clean ; into = Some into; only = None } )
6262 ]
6363;;
6464
6565let decode = sum mode_decoders
66- let field = field " mode" decode ~default: Rule.Mode .Standard
66+ let field = field " mode" decode ~default: Rule_mode .Standard
0 commit comments