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

[coq] Display coq env flags in dune printenv #4767

Merged
merged 1 commit into from
Jun 23, 2021
Merged
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
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -153,6 +153,8 @@ Unreleased
- Fix `root_module` when used with preprocessing (#4683, fixes #4682,
@rgrinberg, @CraigFe)

- Display Coq profile flags in `dune printenv` (#4767, @ejgallego)

2.9.0 (unreleased)
------------------

7 changes: 6 additions & 1 deletion src/dune_rules/super_context.ml
Original file line number Diff line number Diff line change
@@ -402,6 +402,7 @@ let dump_env t ~dir =
let ocaml_flags = get_node t ~dir >>= Env_node.ocaml_flags in
let foreign_flags = get_node t ~dir >>| Env_node.foreign_flags in
let menhir_flags = get_node t ~dir >>| Env_node.menhir_flags in
let coq_flags = get_node t ~dir >>= Env_node.coq in
let open Action_builder.O in
let+ o_dump =
let* ocaml_flags = Action_builder.memo_build ocaml_flags in
@@ -417,8 +418,12 @@ let dump_env t ~dir =
let+ flags = Action_builder.memo_build_join menhir_flags in
[ ("menhir_flags", flags) ]
|> List.map ~f:Dune_lang.Encoder.(pair string (list string))
and+ coq_dump =
let+ flags = Action_builder.memo_build_join coq_flags in
[ ("coq_flags", flags) ]
|> List.map ~f:Dune_lang.Encoder.(pair string (list string))
in
List.concat [ o_dump; c_dump; menhir_dump ]
List.concat [ o_dump; c_dump; menhir_dump; coq_dump ]

let resolve_program t ~dir ?hint ~loc bin =
let t = t.env_tree in
1 change: 1 addition & 0 deletions test/blackbox-tests/test-cases/workspaces.t/run.t
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@ Workspaces also allow you to set the env for a context:
(c_flags ())
(cxx_flags ())
(menhir_flags ())
(coq_flags (-q))

$ dune build --root multiple-merlin-contexts
Entering directory 'multiple-merlin-contexts'