Skip to content

Enable "-warn-error +partial-match" by default (except for the toplevel) #12475

Description

@kit-ty-kate

I feel like it would be beneficial to enable +partial-match (warning 8) as an error by default for ocamlopt and ocamlc (but not in the toplevel because it's useful for quick testing purpose).

Take for example a library a, which provides a parser for a certain format. If the library adds a new node to the AST or splits an existing node into 2, consumers of the library might not notice their code is half broken until it break at runtime, or even in more mysterious ways if the exception that triggered happened to have been caught by a misplaced try ... with _ -> ....

Apologies if that has already been proposed somewhere, i couldn't find any discussion related to this in the issue tracker.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions