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
- 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;
};
- Run any nix command that evaluates this configuration
- Encounter hard failure:
error: nodejs_16 has been removed as it is EOL.
Expected behavior
When encountering an EOL package:
- Show deprecation warnings before removal
- Provide clear upgrade paths in messages (e.g., "Please upgrade to nodejs_18 or nodejs_20")
- Consider graceful fallback to latest LTS version (Node.js 20)
- 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.
Describe the bug
The removal of
nodejs-16_xwith a directthrowstatement 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
pkgs.nodejs-16_x(common in templates like Symfony Flex's devenv)Expected behavior
When encountering an EOL package:
Screenshots
N/A
Additional context
This affects many existing templates and configurations in the ecosystem:
The current approach of immediate
throwcreates unnecessary friction during upgrades and goes against standard package management practices of graceful deprecation.Current implementation in nixpkgs:
Metadata
Notify maintainers
@edolstra @NixOS/nodejs-maintainers
Note for maintainers: Please tag this issue in your PR.