Skip to content

3.22.0 regression: error about non-existent excluded module from (select) in a different stanza #14085

@sim642

Description

@sim642

Expected Behavior

dune build succeeds.
This was the case before 3.22.0.

Admittedly, I only started using this combination very recently (goblint/analyzer#1980), so I'm not sure if it has always worked or not.

Actual Behavior

dune build errors with:

File "dune", line 3, characters 28-40:
3 |  (modules :standard \ myexe myexe_select))
                                ^^^^^^^^^^^^
Error: Module Myexe_select is excluded but it doesn't exist.

This started happening on 3.22.0.

Reproduction

(library
 (name mylib)
 (modules :standard \ myexe myexe_select))

(executable
 (name myexe)
 (modules myexe myexe_select)
 (libraries mylib
  (select myexe_select.ml from
   (-> myexe_select.fallback.ml))))

All the source files (mylib.ml, myexe.ml and myexe_select.fallback.ml) can be empty.

Specifications

  • Version of dune (output of dune --version): 3.22.0 (vs 3.21.1)
  • Version of ocaml (output of ocamlc --version): 5.4.1
  • Operating system (distribution and version): Ubuntu 24.04.4

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions