!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

228 Members
https://github.com/nixpkgs-architecture, weekly public meetings on Wednesday 15:00-16:00 UTC at https://meet.jit.si/nixpkgs-architecture53 Servers

Load older messages


SenderMessageTime
8 Feb 2024
@infinisil:matrix.orginfinisil Philip Taron (UTC-8): Nice, thanks for the quick review 01:31:53
@infinisil:matrix.orginfinisil * Philip Taron (UTC-8): Nice, thanks for the quick review! 01:31:55
@philiptaron:matrix.orgPhilip Taron (UTC-8)
In reply to @infinisil:matrix.org
Philip Taron (UTC-8): Nice, thanks for the quick review!
And ✅ again.
01:40:13
@infinisil:matrix.orginfinisil❤️01:40:25
@infinisil:matrix.orginfinisil Philip Taron (UTC-8): Btw the ratchet stuff allows some really nice follow ups for the automated migration 01:40:58
@infinisil:matrix.orginfinisil Currently this ToNixpkgsProblem trait only has one method to compare two Nixpkgs versions against each other (or rather, give an appropriate error for that): https://github.com/NixOS/nixpkgs/blob/master/pkgs/test/nixpkgs-check-by-name/src/ratchet.rs#L77-L88 01:41:58
@infinisil:matrix.orginfinisil To implement migration, we can just add another method to the trait, which gets the value of a single Loose ratchet, which are exactly the ones that can be migrated! 01:43:09
@infinisil:matrix.orginfinisilSo effectively all the checking code doesn't need to change, and we can use it both to check that new code doesn't use outdated patterns, and to figure out where outdated patterns are that can be migrated!01:44:10
@philiptaron:matrix.orgPhilip Taron (UTC-8)That's really nifty.01:45:54
@infinisil:matrix.orginfinisilA bit hard to explain in text though, I'll make a PR to implement this soon :D01:45:59
@philiptaron:matrix.orgPhilip Taron (UTC-8)Are you imagining an "autofix" mode?01:46:49
@infinisil:matrix.orginfinisil Philip Taron (UTC-8): Yup! 01:47:23
@philiptaron:matrix.orgPhilip Taron (UTC-8)I love to see it. Every lint and vet tool needs one. 😀01:47:41
@infinisil:matrix.orginfinisilOn one hand, it can try to automatically migrate as much as possible for https://github.com/NixOS/nixpkgs/pull/21183201:47:59
@philiptaron:matrix.orgPhilip Taron (UTC-8) (And yeah, ratchet-style checks are always set up to make autofix easier than the pass/fail linters.) 01:48:14
@infinisil:matrix.orginfinisilWhich then also means people can reproduce that PR and don't have to review it entirely01:48:20
@infinisil:matrix.orginfinisilBut also, some things can't be migrated automatically, but the tool can give you a hint what needs to be done manually01:48:46
@infinisil:matrix.orginfinisilSo you can use this to generate a TODO list to complete the migration!01:49:17
13 Feb 2024
@9999years:matrix.org9999years

it would be nice to have a "generic" variant of lib.makeOverridable that uses a different attribute name, to replace functions like overrideCabal and overridePythonAttrs, and to make it easier to write equivalent functions for other derivation-creation-functions.

here's my sketch of an implementation, i think it's 80% or 90% of the way there but it doesn't quite work. the code makes my head hurt. i'm done for the day but others might be interested in trying to get this working
https://github.com/NixOS/nixpkgs/pull/288431

01:28:24
@9999years:matrix.org9999years in the meantime, i've got a copy/paste of lib.makeOverridable into the rust packaging functions to make it possible to override cargoHash and similar attributes (currently it's basically impossible to upgrade a rust package's version in an overrideAttrs function)
https://github.com/NixOS/nixpkgs/pull/288430
01:29:31
@9999years:matrix.org9999years i was also somewhat disappointed to realize that the code for overrideCabal and overridePythonAttrs are very different, despite accomplishing basically the same thing. this lack of consistency makes it very challenging to move from one part of the nixpkgs codebase to another 01:30:19
@tomberek:matrix.orgtomberekStandardize the package sets! https://github.com/nixpkgs-architecture/issues/issues/2102:24:01
@toonn:matrix.orgtoonn Yes, please. Yesterday, rather than today. 11:03:54
@toonn:matrix.orgtoonn This is the only reason I've been looking at dream2nix. 11:04:10
@9999years:matrix.org9999yearswhat's blocking this PR? it seems like most of the comments are pretty minor https://github.com/NixOS/nixpkgs/pull/23465117:28:53
@qyliss:fairydust.spaceAlyssa Rosswell the merge conflicts can't be helping17:58:30
@infinisil:matrix.orginfinisilI should really take a look at that PR, but it's really hard to get motivated for that :/18:18:46
@infinisil:matrix.orginfinisilI generally want to invest my time into fixing the root of problems, and I'm not really convinced that's it.18:19:46
@infinisil:matrix.orginfinisil * I generally want to invest my time into fixing the root of problems, and I'm not really convinced that PR's a case of that18:19:59
@infinisil:matrix.orginfinisil 9999years: ^ 18:20:01

Show newer messages


Back to Room ListRoom Version: 9