Skip to content

(include_subdirs qualified) clashes with nested Menhir parsers #7610

@Niols

Description

@Niols

Expected Behavior

I would expect that using (include_subdirs qualified) would not clash with using Menhir in other places than the top-level (which I call “nested” but I'm not sure it is a good word).

Actual Behavior

Dune does not seem to find the module corresponding to the Menhir parser. If I put the (menhir) stanza in a Dune file near the parser (eg. (menhir (module baz))) I get:

File "bar/dune", line 1, characters 0-23:
1 | (menhir
2 |  (modules baz))
Error: I can't determine what library/executable the files produced by this
stanza are part of.

but it doesn't look like there is much I can add to the (menhir) stanza to help it.

Reproduction

Specifications

  • Version of dune (output of dune --version): 3.7.1
  • Version of ocaml (output of ocamlc --version): 4.14.1
  • Operating system (distribution and version): NixOS unstable on x86_64-linux. I use:
    $ nix shell github:nixos/nixpkgs/0a0f9e92d#ocamlPackages.{ocaml,dune_3,findlib}
    

Additional information

cf also #1372 that had the same problem for (include_subdirs unqualified).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions