Skip to content

Error if packages are removed without adding a corresponding alias #175

@philiptaron

Description

@philiptaron

Removing a package without adding an alias is an immediate breaking change that we discourage in Nixpkgs. Automatically detecting this situation is possible using the before/after structure that nixpkgs-vet already has.

  • Add aliases to the Nixpkgs metadata structure
  • Detect package removals (currently, they are dropped on the floor)
  • Detect alias additions
  • If removal, have a corresponding addition, otherwise error with "Removals need to be paired with an alias additions"

In my view, it's fine to separate this into two halves: top-level package additions and removals, and everything else (Python packages being the majority "other" case.)

There is a small complication that throw will need to be able to be rebound in aliases.nix but sadly or happily this is possible.

{ throw ? throw }: msg: throw msg

See NixOS/nixpkgs#440457.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request
    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