Skip to content

Add a warning infrastructure #10281

Open
Open
@thufschmitt

Description

@thufschmitt

Is your feature request related to a problem? Please describe.

We have a bunch of behaviours (mostly in the evaluator, but probably not only) that we'd like to get rid of, but can't because of backwards-compatibility.

A good middle-ground solution is to keep them, but add a warning to prevent people from accidentally relying on them.
We currently never do that because doing so would require adding a way to opt-out easily, and

  1. We don't really want to do it in a, ad-hoc fashion
  2. We don't have infrastructure to do it in a principled fashion.

Describe the solution you'd like

Some infrastructure (similar to the experimental-features one?) allowing to declare warnings and expose a way to easily toggle them (or turn into hard errors) from the CLI or the configuration files.

Describe alternatives you've considered

Additional context

Random sampling of things that we might want to get warning for:

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    error-messagesConfusing messages and better diagnosticsfeatureFeature request or proposallanguageThe Nix expression language; parser, interpreter, primops, evaluation, etc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions