dune
dune copied to clipboard
Cannot befriend Menhir and ocamllex with `include_subdirs unqualified`
My lib/dune
is the following:
(library (name foo))
(include_subdirs unqualified)
(menhir
(modules parser)
(flags --explain --dump))
(ocamllex lexer)
But the issue is that I have parser.mly
and lexer.mll
in the surface/
directory. When running dune build
, I receive the following error:
File "lib/dune", line 16, characters 0-52:
16 | (menhir
17 | (modules parser)
18 | (flags --explain --dump))
Error: No rule found for lib/parser.mly
File "lib/dune", line 20, characters 0-16:
20 | (ocamllex lexer)
^^^^^^^^^^^^^^^^
Error: No rule found for lib/lexer.mll
How do I tell Dune that it should search for parser.mly
and lexer.mll
in lib/surface/
, not lib/
?
My Dune version is 3.14.2
.
I'm a bit surprised to see menhir pop up here because it should have been fixed in #8949. I'll try to repro, thanks.
added a reproduction here https://github.com/ocaml/dune/pull/10371