Skip to content

An empty directory in the plugin directory makes load_all fail #10457

@shym

Description

@shym

The dune-site plugin system expects all the entries of the plugin directory to be directories, each of which should contain a META file.
Unfortunately, we can end up with an empty directory there in a rather normal course of actions, after removing a package that provides a plugin.

Here is a small scenario that shows the problem. First, the following commands exhibit the intended behaviour:

$ opam install ortac-core
[...]

$ ortac
ortac: error: no plugin is available, please install at least one

$ opam install ortac-qcheck-stm
[...]

$ ortac
ortac: error: missing command
Usage: ortac [COMMAND] …
Try 'ortac --help' for more information.

But removing the second package breaks the first:

$ opam remove ortac-qcheck-stm
[...]

$ ortac
Fatal error: exception The plugin "qcheck-stm" can't be found in the search paths "%{prefix}%/lib/ortac-core/plugins".

where one would expect the initial behaviour (no plugin is available...).

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