Skip to content

Raise an error when building a defined but empty package #2882

@kit-ty-kate

Description

@kit-ty-kate

From a beginner point of vu, it seems a bit odd to not get any errors when building a project that doesn't install anything due to a lack of (public_name ...) or other things.

For instance, see the PR of someone who made the mistake and would have been unnoticed if I hadn't looked at the project more in details: ocaml/opam-repository#15262

For example, if you define a project as such:

$ echo '(library (name some_package))' > dune
$ touch some_package.opam

dune build -p some_package doesn't do build anything but produces some_package.install which doesn't install anything (except an empty META file). This is prone to mistake from beginners trying to release their first package in opam and I think dune should raise an error to avoid this type of mistake.

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