Skip to content

[RFC] Opt-in generation of empty interfaces of modules without .mli ? #4952

@nojb

Description

@nojb

When a module is used solely for their side-effects, one typically wants to add an empty interface file to benefit from the various "unused" warnings, faster incremental compilation, etc.

In our case we have some libraries where we have dozens and dozens of such files. It would be nice if we could have dune generate the empty interface files on demand, eg having a field (modules_without_interface ...) that would tell dune to generate empty interface files for the listed modules (both in libraries and executables).

(In case you are curious, we currently patch the compiler to avoid having to actually create all these empty interfaces, but it seems like a task that would fit nicely to Dune.)

Opinions?

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