How to use `menhir --explain` with dune?

I use the (menhir) stanza in dune to compile grammars, but I don’t know how to conveniently use the menhir --explain feature.

The naïve approach of using (flags --explain) used to work before the level of sandboxing introduced in dune.3.0 (at that time, *.conflicts files were generated in _build/$profile), but since dune 3.0, I don’t know how to keep and where to find these files: currently, I circumvent the problem by running menhir --explain manually, and remove the generated file from the source tree when conflicts are solved, but that is not very convenient!

Hi @thierry-martinez, that’s an excellent question. I am not sure either this is currently possible.
Could you please create an issue on dune’s github? This will increase the chance of solving this issue, or of adding the missing bits to the documentation.

Indeed it would be great to have first class support for this in dune.

I just wanted to be sure not to miss something obvious before filling an issue. There is now a github issue for that: Using `menhir --explain` · Issue #6865 · ocaml/dune · GitHub . Thanks to both of you, @esope and @rgrinberg !