Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bad interaction between menhir and --ignored-promoted-rules #1917

Merged
1 commit merged into from Mar 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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