Skip to content

Documentation missing on when to add a warning to aliases #493853

Description

@quantenzitrone

Reviewers have been giving conflicting reviews on package renaming PRs.

@gepbird @Hythera @magnetophon @wolfgangwalther @teto & @qweered have been telling to add warnAlias straight away:

@bjornfor has been telling, warnAlias should be added after one release cycle or after renames have been backported to stable:

Arguments for adding warnAlias directly:

  • faster deprecation

    • Counter: deprecation is too quick
  • Context of alias gets lost when aliases are converted to warnAlias
    manual rename message could be (e.g. source-highlight: rename from sourceHighlight, enable structuredAttrs #489656)

    "'foo' has been renamed to 'bar'"

    or (example from xdg-terminal-exec-mkhl: drop #480126)

    "'foo' has been removed due to reason, use 'bar' instead."

    automatic rename message would always be

    "'foo has been renamed to/replaced by 'bar'"

    -> the manual message is more clear

    • Counter: automatic message is clear enough
      second example pr doesn't create an unactionable warning so it doesn't count

Arguments for not adding warnAlias straight away:

  • When unstable has a warnAlias and stable does not have the new package name, one cannot have a configuration or nixos module that works for both stable and unstable without having countless warnings on unstable.
    -> warnings are not actionable without breaking stable
    • Counter: you can just ignore the warnings
  • @bjornfor remembers that in the beginning (when they started using NixOS) there were aliases, and eventually they became warnings/errors (after at least one release period). There even exists maintainers/scripts/remove-old-aliases.py, which is built upon the "alias -> warning -> error" flow. As far as they can tell, aliases were never meant to be direct warnings. Going straight to warning for aliases feels to them like some recent development, presumably by people running nixpkgs-unstable exclusively?

Additional Context

What now

I don't care a lot about whether aliases should be warnAliases or not, but getting conflicting reviews on PRs is shitty and creates a deadlock situation.
So either we come to some solution here together or we have to ask the nixpkgs core team or the SC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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