Hello everyone,
I would like to start a discussion about a recurring and painful problem in nixpkgs, which we recently faced with the langchain update. I propose we consider a formalized process for handling such situations to make the ecosystem more resilient and reduce the burden on maintainers.
Problem Description
Periodically, a critical library update in nixpkgs introduces breaking API/ABI changes (for example, libfoo from 1.x to 2.0). This leads to a cascade of build failures for all packages that depend on it (A, B, C, ā¦).
Current Consequences:
Master branch blockage: The dependent package tree fails to build for several days or even weeks.
Rushed āHacksā: Maintainers of dependent packages are forced to quickly create fragile patches to unblock the build, which is a temporary and unreliable solution.
Proposed Solution: Temporary āLegacyā Packages
I propose introducing a formalized process for creating temporary legacy packages during the transition period.
How it should work:
Trigger: The process is activated when a maintainer plans an update that breaks ABI/API and is expected to affect more than N packages (for example, N=5).
Action: Along with the commit updating the main package (libfoo to 2.0), a new package (libfoo-prev_semver) is added in the same PR.
This package contains the previous stable version (1.x).
It should be marked with a special attribute, for example: meta.isTemporaryLegacy = true;.
Legacy Package Lifecycle (Key Point):
Automatic Expiration: The package is assigned a lifespan (EOL), for example, 3-6 months from creation.
Automated Reminders: The CI system or a bot can automatically create Issues/PRs to remind about the need to remove the package after its EOL.
Marking as Outdated: One month before removal, the package is automatically marked as insecure to encourage migration away from it.
Adapting Dependent Packages: Maintainers of packages A, B, C can quickly and safely switch their dependencies to libfoo-1, immediately unblocking the master branch. This gives them time to properly adapt to the new libfoo 2.0 version.
Advantages of This Approach
Unblocks Master: The build is restored within hours, not days/weeks.
Continuous Security Updates: Critical fixes continue to flow into nixpkgs.
Reduced Stress and Load: Maintainers donāt have to work in emergency mode and can plan their work.
Prevents āPackage Pollutionā: A formalized and automated lifecycle directly addresses the main concern about repository āpollutionā. The temporary package wonāt be forgotten and wonāt remain in the system forever.
Clear Path for Upstream Interaction: Creates a clear signal for upstream developers: you have several months to adapt, after which the old version will no longer be supported in Nixpkgs =)
Open Questions for Discussion
What should the activation threshold be (number of broken packages)?
Who is responsible for creating the legacy package ā the author of the main update or a dedicated team?
What is the optimal lifespan for such packages? 3 or 6 months?
Which naming scheme is preferable (pkgname-prev_semver, pkgname_legacy)?
I am confident that introducing such a process will make nixpkgs a healthier and more predictable project for both maintainers and end users.
What does the community think?