21 Oct 2024 |
Sandro 🐧 | we can't do reflection, so we probably should adapt the python script | 12:41:31 |
Fabián Heredia | In reply to @emilazy:matrix.org so the idea is that we have to go alias → alias with warning → throw → removal? alias with warn (now that warn exists) -> throw -> removal | 17:02:00 |
emily | hm, what do you mean "now that warn exists"? | 17:02:15 |
Fabián Heredia | skipping the first one | 17:02:16 |
Fabián Heredia | of only alias without warn | 17:02:22 |
Fabián Heredia | There was a time when aliases couldn't warn not too long ago if I recall correctly | 17:02:50 |
Fabián Heredia | about 2-3 releases ago | 17:03:00 |
emily | right | 17:03:12 |
Fabián Heredia | and previous flow was to directly throw on aliases that were going to be removed / had a planned removal. | 17:03:41 |
emily | I was thinking we could just lib.mapAttrs (k: v: lib.warn "hey man stop using ${k}" v) the aliases.nix attrset | 17:03:42 |
emily | I don't know if that's crazy or not. | 17:03:54 |
emily | maybe even do a tryEval dance so it'll only warn on things that aren't already throws | 17:04:14 |
Fabián Heredia | But not all aliases there are intended to be removed, there is a top level comment on the syntax of comments to avoid auto move to throw/auto removal from the prune script | 17:04:29 |
Fabián Heredia | # A script to convert old aliases to throws and remove old
# throws can be found in './maintainers/scripts/remove-old-aliases.py'
| 17:05:15 |
Fabián Heredia | # Add 'preserve, reason: reason why' after the date if the alias should not be removed.
# Try to keep them to a minimum.
| 17:05:39 |
emily | well, we could separate out the ones not to be removed into another section. | 17:05:47 |
emily | { …preserve… } // lib.mapAttrs … | 17:05:53 |
emily | that's probably a good thing anyway | 17:05:58 |
emily | since it lets us see which ones are more load-bearing | 17:06:04 |
emily | FWIW there's only 4 of them. | 17:06:39 |
emily | and a couple of them I find dubious, but that's another matter | 17:06:53 |
Fabián Heredia | https://github.com/NixOS/nixpkgs/pull/350289 | 17:14:37 |
emily | shouldn't the cut-off be 24.05? | 17:17:47 |
emily | since everything it removed would have been throwing for an entire release cycle? | 17:17:56 |
Fabián Heredia | yeah | 17:18:00 |
Fabián Heredia | but this does mean that those weren't removed the previous cycle | 17:18:17 |
emily | hmm | 17:19:09 |
emily | Download image.png | 17:19:14 |
emily | should probably make it 2023-11 at least | 17:19:17 |
emily | (does the script handle aliases-to-throws, I wonder…) | 17:19:40 |