-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC 0180] Remove broken packages or unmaintained leaf packages #180
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
--- | ||
feature: broken-package-removal | ||
start-date: 2024-07-14 | ||
author: Jörg "Mic92" Thalheim | ||
co-authors: | ||
shepherd-team: "@emilazy @preisi @jopejoe1" | ||
shepherd-leader: "@jopejoe1" | ||
related-issues: | ||
--- | ||
|
||
# Summary | ||
|
||
[summary]: #summary | ||
|
||
This RFC defines conditions under which we remove broken packages or unmaintained leaf packages. | ||
The RFC does not aim to define all possible reasons for removing a package but instead focuses on simple, automatable rules. | ||
Since this document serves as a guideline for automatic package removal, it also allows for the possibility of removing a package earlier for other reasons. | ||
|
||
# Motivation | ||
|
||
[motivation]: #motivation | ||
|
||
Broken and unmaintained packages still consume valuable time. | ||
Broken packages need to be evaluated to some extent, and unmaintained packages might still need to be rebuilt when one of their dependencies changes. | ||
Removing unmaintained or unused code should improve overall package quality and help save resources. | ||
Since adding packages is easy, removing them should also be simple, ideally automated. | ||
|
||
# Detailed Design | ||
|
||
[design]: #detailed-design | ||
|
||
All broken packages or unmaintained leaf packages will be removed after a full NixOS release cycle. | ||
For example, if `hello-unmaintained` is marked as unmaintained in 23.11, it can be removed from master after the 24.05 release. | ||
|
||
If a NixOS module depends on any removed package and is non-functional without it, the module will be removed as well. | ||
In `pkgs/top-level/aliases.nix`, we can link to the pull request that removed the package, making it easier for users to recover the nix expression if needed. | ||
|
||
In the pull request that removes a package, the people who have substantially contributed to the package declaration before and have not left the project should be pinged. | ||
|
||
## Broken Packages | ||
Mic92 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Packages that are unconditionally marked as broken on all platforms are candidates for removal. | ||
If a package has dependent packages, those dependent packages will also be marked as indirectly broken. | ||
If the dependent packages cannot function without the broken package, they should also be removed. | ||
For example, if a library is broken and an application depends on it, the application will also be removed within the same time frame. | ||
|
||
## Unmaintained Packages | ||
|
||
We will add an "unmaintained" warning for all packages with an empty maintainer field that do not have any dependent packages with a maintainer. | ||
Ideally, we will have automation or semi-automation in place to create pull requests for this process (see future work). | ||
|
||
# Examples and Interactions | ||
|
||
[examples-and-interactions]: #examples-and-interactions | ||
|
||
- A release manager or another contributor marks `packageA` as broken in 23.11, notifying the maintainer. | ||
- They have one full release cycle, as described, to fix `packageA`. | ||
- After the 24.05 release, `packageA` can be automatically removed from the nixpkgs master branch, as outlined in this RFC. | ||
|
||
# Drawbacks | ||
|
||
[drawbacks]: #drawbacks | ||
|
||
Some unmaintained packages may still have users who will no longer be able to use them, but the hope is that removing unmaintained packages will encourage these users to step up as maintainers. | ||
In such cases, recovering the package from the git history should be relatively easy. | ||
|
||
# Alternatives | ||
|
||
[alternatives]: #alternatives | ||
|
||
- Keep all packages. | ||
- Archive removed nix expressions. Note that this RFC does not prevent this effort from being implemented in addition. | ||
|
||
# Prior Art | ||
|
||
[prior-art]: #prior-art | ||
|
||
- Most Linux distributions have rules for removing unmaintained packages, e.g.: | ||
- Debian: [Orphaning a package](https://www.debian.org/doc/manuals/developers-reference/developers-reference.en.html#orphaning-a-package). | ||
- Gentoo: | ||
- [Ebuild removal](https://devmanual.gentoo.org/ebuild-maintenance/removal/index.html). | ||
- [Treecleaner](https://wiki.gentoo.org/wiki/Project:Treecleaner) | ||
- [Treecleaner policy](https://wiki.gentoo.org/wiki/Project:Treecleaner/Policy) | ||
|
||
- [Nixpkgs eval time is increasing too fast](https://github.com/NixOS/nixpkgs/issues/320528): This issue discusses ways to improve evaluation time. | ||
- FreeBSD Porters Handbook: [13.15. Marking a Port for Removal](https://docs.freebsd.org/en/books/porters-handbook/book/#dads-deprecated) | ||
|
||
# Unresolved Questions | ||
|
||
[unresolved]: #unresolved-questions | ||
|
||
None. | ||
|
||
# Future Work | ||
|
||
[future]: #future-work | ||
|
||
- Develop automation that opens pull requests to remove packages. | ||
- Add deprecation warnings for packages scheduled for removal to notify potential users i.e. as described in [RFC0127 problems](https://github.com/NixOS/rfcs/blob/master/rfcs/0127-issues-warnings.md) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It says leaf packages here but later goes on to talk about dependant packages which is contradictory. I assume this was once started for leaf packages only but later widened in scope but you forgot to update the summary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broken packages with reverse dependencies will be removed. Unmaintained packages with (maintained) reverse dependencies will not. Perhaps the wording could be clarified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is not clear about this sentence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess people are interpreting the wording later on in the RFC as not referring solely to unmaintained leaf package, but I can’t speak for @Atemu :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As explained in my initial comments first sentence, that's indeed the source of my confusion. You would not need to handle reverse dependencies if it were only about leaf packages because leaf packages do not have reverse dependencies by definition.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading the RFC again, the later section only mentions removal of dependent packages of broken packages, not unmaintained packages. That's the source of my confusion.