diff --git a/CHANGES.md b/CHANGES.md index e49c0c69bf4..8ea14ed7614 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -39,6 +39,9 @@ - Configurator: deprecated `query_expr` and introduced `query_expr_err` which is the same but with a better error in case it fails. (#1886, @ejgallego) +- Make sure `(menhir (mode promote) ...)` stanzas are ignored when + using `--ignore-promoted-rules` or `-p` (#1917, @diml) + 1.7.3 (27/02/2019) ------------------ diff --git a/src/dune_load.ml b/src/dune_load.ml index 73c7ae11b00..fba84c69d89 100644 --- a/src/dune_load.ml +++ b/src/dune_load.ml @@ -15,7 +15,8 @@ module Dune_file = struct let stanzas = if ignore_promoted_rules then List.filter stanzas ~f:(function - | Rule { mode = Promote _; _ } -> false + | Rule { mode = Promote _; _ } + | Dune_file.Menhir.T { mode = Promote _; _ } -> false | _ -> true) else stanzas