Skip to content

Commit

Permalink
Fix bad interaction between menhir and --ignored-promoted-rules (#1917)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <[email protected]>
  • Loading branch information
jeremiedimino committed Mar 7, 2019
1 parent 6c8874e commit 9204f6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------

Expand Down
3 changes: 2 additions & 1 deletion src/dune_load.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9204f6d

Please sign in to comment.