Skip to content

Commit

Permalink
fix: disable menhir deprecations (#2758)
Browse files Browse the repository at this point in the history
* fix: disable menhir deprecations

* wip
  • Loading branch information
anmonteiro authored Jul 20, 2024
1 parent 37fbb2d commit fb0b60c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/opam-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
run: opam exec -- dune build -p reason,rtop

- name: Test
run: opam exec -- dune runtest
run: opam exec -- dune runtest -p reason,rtop

- name: Save cache when not Windows
uses: actions/cache/save@v3
Expand Down
2 changes: 1 addition & 1 deletion src/menhir-recover/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let () =
fprintf ppf " - on %a, reduce %d:\n %a\n"
Print.terminal t
(p :> int) Print.production p
) (Lr1.reductions st);
) (Lr1.reductions st [@alert "-deprecated"]);
);
Production.iter (fun (p : production) ->
fprintf ppf "\n# Production p%d\n%a"
Expand Down
2 changes: 1 addition & 1 deletion src/menhir-recover/synthesis.ml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ struct
const bottom
else if pos = prod_len then
let can_reduce = List.exists
(fun (_,prods) -> List.mem prod prods) (Lr1.reductions st)
(fun (_,prods) -> List.mem prod prods) (Lr1.reductions st [@alert "-deprecated"])
in
const (if can_reduce
then (cost_of_prod prod, [Reduce prod])
Expand Down
2 changes: 1 addition & 1 deletion src/reason-parser/menhir_error_processor.ml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ let states_transitioning_on pred =
let keep_state lr1 =
(* There are two kind of transitions (leading to SHIFT or REDUCE), detect
those who accept identifiers *)
List.exists (fun (term, _) -> pred (T term)) (Lr1.reductions lr1) ||
List.exists (fun (term, _) -> pred (T term)) (Lr1.reductions lr1 [@alert "-deprecated"]) ||
List.exists (fun (sym, _) -> pred sym) (Lr1.transitions lr1)
in
(* Now we filter the list of all states and keep the interesting ones *)
Expand Down

0 comments on commit fb0b60c

Please sign in to comment.