-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
top-level/aliases: split into files by release #441492
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
Conversation
Mostly adding dates where they were missing, but also smaller fixes like punctuation, so that remove-old-aliases.py works correctly.
This contains all aliases created in the 24.05 cycle.
This contains all aliases created in the 24.11 cycle.
This contains all aliases created in the 25.05 cycle.
This contains all aliases created in the 25.11 cycle.
The scripts were not able to move these automatically.
The move to alias/drop files split up the `steamPackages` attrset, which would shadow some of the aliases. This fixes it by turning the warnings into throws (it's time!) and then keeping the respective throws twice, so that they work right now - and keep working when 26.06 is dropped.
This converts all warnings that were added before the 25.11 cycle into throws.
This drops all aliases created in the 24.05 cycle.
b82f344 to
62cfe2f
Compare
|
I’d thought about this. My hesitance is that we don’t want all aliases to be in these files, because package sets exist, so there are always going to be inline aliases, so we need a solution for those. Of course handling the common case is nice, too… I suppose as long as we get a way to have CI fail when there are aliases that should be removed anywhere, having a script that handles the common case and doing the rest manually is an improvement. So, yes, I think this is an incremental improvement. I have more fleshed out ideas for how to handle the You will want to adjust/remove/whatever My biggest nit to pick: let’s key the files on the release they were added, not removed; Also the comment in
Personally I think one stable release is fine, but I’m not picky. I guess this is the “upgrading from oldstable during the overlapping support window” thing. |
That was my first idea, too, but this will make it very annoying to backport things - the file in which you'd need to add an alias would always change. However, with this approach here, backports would use exactly the same files on both branches. Edit: Also, it will allow better error messages, because we can fill these structured aliases with the info "will be dropped in XX.YY" in one go.
That's just an intermediate thing right now. I would like to add warnings to the newest drop file (one newer than currently exists - Edit: Or the newest one currently available? Couldn't make my mind up, yet), but I had to stop somewhere reasonable at this stage. |
|
Another approach entirely: If we provide the various { mkRenameAlias, renamed-package }:
mkRenameAlias "25.11" renamed-packageThis would also be considerably simpler to maintain script-wise, because "delete the whole folder" is rather simple to do, compared to dealing with these comments and replacement and whatnot. Also, do we really want that huge |
Usually you shouldn’t be backporting an alias like that, though? Like, for instance, we should not backport an alias that adds a warning to a stable branch. For things like renames, it actually makes sense to have an “aliases added in 25.11” file on the 25.05 branch, that explicitly omits the warning on 25.05, because the release is lower than when the deprecation period started.
With my idea, they’d be under You actually want to use a string for the rename, because the warning/ |
Merge conflicts are one thing, yes. But we should really try to put them into the general
I thought so, too, but then I looked at https://github.com/NixOS/nixpkgs/commits/release-25.05/pkgs/top-level/aliases.nix.
That.. sounds sensible. |
Sure, makes sense to me. Standard Scattered thoughts:
|
|
Superseded by #442066, which I like a lot more. |
This is a first step towards better aliases. With this split, it will be dead-simple to drop all aliases created in a certain release at once - no need for a fancy script anymore. The script is still kept, because it should also work on other, non-migrated, alias files, I assume.
The idea is to:
lib.warnOnInstantiatefor max 1 cycle and convert to a throw afterwards.Addresses a tiny bit of #441108 (comment), aka only the "date vs release" thing.
This step should play nicely with both the current style of aliases as well as "structured aliases" described in the linked comment.
@emilazy WDYT?
Things done
Add a 👍 reaction to pull requests you find important.