Skip to content

Commit 6097f8b

Browse files
Mic92GetPsyched
andcommitted
[RFC 0180] Remove broken and unmaintained leaf packages
Update rfcs/0180-broken-package-removal.md Co-authored-by: Priyanshu Tripathi <priyanshu@getpsyched.dev>
1 parent 62d1245 commit 6097f8b

1 file changed

Lines changed: 97 additions & 0 deletions

File tree

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
---
2+
feature: broken-package-removal
3+
start-date: 2024-07-14
4+
author: Jörg "Mic92" Thalheim
5+
co-authors:
6+
shepherd-team:
7+
shepherd-leader:
8+
related-issues:
9+
---
10+
11+
# Summary
12+
13+
[summary]: #summary
14+
15+
This RFCs defines under what conditions we remove broken and unmaintained leaf packages.
16+
The RFC does not have the ambition to define all reasons to remove a package but
17+
instead focuses on simple rules that can be automated.
18+
19+
# Motivation
20+
21+
[motivation]: #motivation
22+
23+
Broken and unmaintained packages still cost us valuable time.
24+
Broken packages still have to be evaluated to some extent
25+
and unmaintained packages might still have to rebuild when one of their dependencies changes.
26+
Removing unmaintained/unused code hopefully increases the overall package quality and helps us
27+
to save resources.
28+
Because it is easy to add packages, it should be also easy to remove them, ideally automated.
29+
30+
# Detailed design
31+
32+
[design]: #detailed-design
33+
34+
All packages marked as broken/unmaintained will be removed after a full NixOS release.
35+
For example `hello-unmaintained` will be marked as unmaintained in 23.11 then once we
36+
have 24.05, we can remove it from master.
37+
38+
## Broken Packages
39+
40+
Packages that are marked as broken unconditionally platforms should are canidates for removal.
41+
If the package had dependencies, those dependencies are also marked as indirectly broken.
42+
If they are not functional without the broken package, they should be removed as well.
43+
44+
## Unmaintained packages
45+
46+
We add an unmaintained warning for all packages, with an empty maintainer field that do not have packages depending on it.
47+
Ideally we have an automation or semi-automation that creates pull requests for that (see future work).
48+
49+
If a NixOS module depends on any of removed package, this module gets removed as well, if it is non-functional without the package.
50+
In `pkgs/top-level/aliases.nix` we can link to the pull request that removed the package,
51+
to make it easier for people to recover the nix expression.
52+
53+
In the pull request that removes a package, we also will ping people that have modified/updated the package excluding those that only
54+
touched the package as part of treewide.
55+
56+
# Examples and Interactions
57+
58+
[examples-and-interactions]: #examples-and-interactions
59+
60+
-
61+
62+
# Drawbacks
63+
64+
[drawbacks]: #drawbacks
65+
66+
Some maintained packages might still have users that won't be able to use the package,
67+
but the hope is that the removal of unmaintained package will lead to these people
68+
stepping up as a maintainer. Recovering from the git history should be easy in that case.
69+
70+
# Alternatives
71+
72+
[alternatives]: #alternatives
73+
74+
- Keep all packages.
75+
- Put removed nix expressions in an archive. Note that the this RFC
76+
does not stop this effort from beeing implemented additionally.
77+
78+
# Prior art
79+
80+
[prior-art]: #prior-art
81+
82+
- Most Linux distributions have rules around removing unmaintained packages i.e. Debian.
83+
- [Nixpkgs eval time is increasing too fast](https://github.com/NixOS/nixpkgs/issues/320528):
84+
This issue discusses how we can improve the evaluation time.
85+
86+
# Unresolved questions
87+
88+
[unresolved]: #unresolved-questions
89+
90+
?
91+
92+
# Future work
93+
94+
[future]: #future-work
95+
96+
- Write automation that will open pull request to remove packages.
97+
- Add deprecation warnings for packages that are about to become removed, so that potential users are notified

0 commit comments

Comments
 (0)