Skip to content

EOL package removal for nodejs-16_x causes hard failures without deprecation path #357971

Closed

Description

@markshust

Describe the bug

The removal of nodejs-16_x with a direct throw statement causes existing configurations to fail abruptly without providing a deprecation warning or migration path. This breaks the principle of graceful degradation and makes upgrades more difficult than necessary.

Steps To Reproduce

  1. Have a configuration that uses pkgs.nodejs-16_x (common in templates like Symfony Flex's devenv)
languages.javascript = {
  enable = lib.mkDefault true;
  package = lib.mkDefault pkgs.nodejs-16_x;
};
  1. Run any nix command that evaluates this configuration
devenv up
  1. Encounter hard failure:
error: nodejs_16 has been removed as it is EOL.

Expected behavior

When encountering an EOL package:

  1. Show deprecation warnings before removal
  2. Provide clear upgrade paths in messages (e.g., "Please upgrade to nodejs_18 or nodejs_20")
  3. Consider graceful fallback to latest LTS version (Node.js 20)
  4. Only throw hard errors after sufficient deprecation period

Screenshots

N/A

Additional context

This affects many existing templates and configurations in the ecosystem:

  • Symfony Flex's current devenv template
  • Potentially other project templates using Node.js 16
  • Custom user configurations

The current approach of immediate throw creates unnecessary friction during upgrades and goes against standard package management practices of graceful deprecation.

Current implementation in nixpkgs:

nodejs_16 = throw "nodejs_16 has been removed as it is EOL.";

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.6.0, macOS 14.6.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.25.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Notify maintainers

@edolstra @NixOS/nodejs-maintainers


Note for maintainers: Please tag this issue in your PR.

Activity

  1. added
    0.kind: bug
    on Nov 21, 2024
  2. vcunat commented on Jan 5, 2025

    @vcunat
    Member

    The listed maintainer for nodejs is @aduh95.

    I'm not a nodejs person, but this ticket feels excessive to me:

    • nodejs announces upstream EOLs, so removal from unstable nixpkgs shouldn't be surprising (and you could use stable nixpkgs to somewhat reduce this friction; we have it even for darwin)
    • you specified nodejs-16_x, so silent automatic upgrade to a different nodejs branch seems worse than a throw. You could use nodejs (without version spec) to get auto-upgraded regularly, if that's what you want.
    • as for the throw message, I don't think people would read it like "nixpkgs removed all nodejs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions