!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

232 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
13 Dec 2023
@infinisil:matrix.orginfinisil 9999years: But yeah, having https://github.com/NixOS/nixpkgs/pull/270537 won't prevent such a standardisation in the future. I don't think new approaches should be introduced when there's already an existing one. But in this case there isn't an existing approach, so I don't want to block that. 23:56:37
14 Dec 2023
@9999years:matrix.org9999years maybe we could merge it with callPackage and then adapt it to use packageFromDirectory in the future (and add an assert that only one is supplied)...? 00:02:34
@infinisil:matrix.orginfinisil Not sure what you mean by merging it with callPackage 00:14:38
@9999years:matrix.org9999years

i.e. merging #270537 with { callPackage, ... }: as the argument, and then later doing something like

{
  callPackage,
}:
00:18:17
@9999years:matrix.org9999years *

i.e. merging #270537 with { callPackage, ... }: as the argument, and then later doing something like

{
  callPackage,
  packageFromDirectory ? path: callPackage path {},
}:
00:18:32
@infinisil:matrix.orginfinisil
In reply to @philiptaron:matrix.org
infinisil: I love pkgs/by-name and I write Rust at work. I'd be glad to be code reviewer when you're ready.
I just cleaned up the PR and marked it as ready to review, it would be great if you could take a look now! Best reviewed commit-by-commit, they all come with comments: https://github.com/NixOS/nixpkgs/pull/272395
03:10:34
@infinisil:matrix.orginfinisil
In reply to @philiptaron:matrix.org
infinisil: I love pkgs/by-name and I write Rust at work. I'd be glad to be code reviewer when you're ready.
* I just cleaned up the PR and marked it as ready to review, it would be great if you could take a look now! Best reviewed commit-by-commit, they all come with commit messages: https://github.com/NixOS/nixpkgs/pull/272395
03:14:08
@infinisil:matrix.orginfinisil
In reply to @9999years:matrix.org

i.e. merging #270537 with { callPackage, ... }: as the argument, and then later doing something like

{
  callPackage,
  packageFromDirectory ? path: callPackage path {},
}:
Hmm not sure. The reason why I proposed packageFromDirectory is to make the function interface not more complicated than it has to be. But yeah I can see the argument that callPackage is fairly well-known, so it might be nice to have that as an argument, even though the second argument doesn't really make sense for the function as is.
03:17:57
@infinisil:matrix.orginfinisil 9999years: Posted a comment: https://github.com/NixOS/nixpkgs/pull/270537#discussion_r1426132656 03:24:34
@infinisil:matrix.orginfinisil
In reply to @infinisil:matrix.org
I just cleaned up the PR and marked it as ready to review, it would be great if you could take a look now! Best reviewed commit-by-commit, they all come with commit messages: https://github.com/NixOS/nixpkgs/pull/272395
We could also pair-review this on a call if you want. Also I think Wanja Hentze might be interested in taking a look
03:41:10
@philiptaron:matrix.orgPhilip Taron (UTC-8)Taking a look. I could pair review on a call. It's 19:45 PST and I'm available for another 45 minutes. :-)03:46:28
@philiptaron:matrix.orgPhilip Taron (UTC-8)Redacted or Malformed Event03:46:37
@philiptaron:matrix.orgPhilip Taron (UTC-8) * I've got Zoom if that works for you. 03:47:06
@jonringer:matrix.org@jonringer:matrix.org Alternative to callPackage, instead allow for simple "smart" function application through callFunction :) https://github.com/NixOS/nixpkgs/pull/274179 08:41:58
@nbp:mozilla.orgnbp
In reply to @infinisil:matrix.org
So we could have e.g. a module.nix file that specifies a NixOS module (or home-manager module, or some abstract module, ..)
If we do so, I urge that we also think about making it discoverable, like NixOS options are today.
10:17:12
@whentze:matrix.orgWanja Hentzenot too much time for this atm, but can perhaps fit it in tomorrow13:14:23
@infinisil:matrix.orginfinisil
In reply to @philiptaron:matrix.org
Taking a look. I could pair review on a call. It's 19:45 PST and I'm available for another 45 minutes. :-)
Oh yeah that was at 5am for me, maybe that won't work that well
14:22:22
@infinisil:matrix.orginfinisil
In reply to @philiptaron:matrix.org
Taking a look. I could pair review on a call. It's 19:45 PST and I'm available for another 45 minutes. :-)
* Oh yeah that was at 5am for me, maybe that won't work that well haha
14:22:31
@philiptaron:matrix.orgPhilip Taron (UTC-8)
In reply to @infinisil:matrix.org
Oh yeah that was at 5am for me, maybe that won't work that well haha

I did end up taking a look through the PR. It all looks sane. I have various code organization suggestions, but the current organization isn't bad at all and I would definitely accept it.

Most of the code organization suggestions end up being "make a method on NixpkgsProblem named for the condition that will be created", and returning Option<Self>. That would make check_values look super sleek by sequencing together all the various checks, rather than bulky due to having the checks inlined.

One "rusty" nit is to have the various things accepting &Vec<Something> accept instead the slice &[Something]. That's both lower power and more general.

Thanks for doing this work! Big win across the board already, and more to come.

17:18:27
15 Dec 2023
@philiptaron:matrix.orgPhilip Taron (UTC-8)
In reply to @infinisil:matrix.org
I just cleaned up the PR and marked it as ready to review, it would be great if you could take a look now! Best reviewed commit-by-commit, they all come with commit messages: https://github.com/NixOS/nixpkgs/pull/272395
OK, want me to run the tests and call it a day for acceptance?
00:11:59
@infinisil:matrix.orginfinisil Philip Taron: That would be great! Just wrote a top-level comment too :) https://github.com/NixOS/nixpkgs/pull/272395#issuecomment-1857050220 00:12:48
@philiptaron:matrix.orgPhilip Taron (UTC-8)Have you read this? https://qntm.org/ratchet00:16:49
@infinisil:matrix.orginfinisil Philip Taron: No but I'll take a look now, seems relevant! 00:18:47
@infinisil:matrix.orginfinisilDone, yeah that's the general idea :D00:22:40
@philiptaron:matrix.orgPhilip Taron (UTC-8)I find the name really great. At work, we write these kind of "ratchet linters" all the time. Usually just a sqlite database + some regexs. It helps having a concept for them, since they're strictly speaking not really a test (pass / fail) they're.. their own thing.00:23:57
@infinisil:matrix.orginfinisilAh yeah, the name is really great, I guess it would be nice to change the name of the concept in the by-name tool!00:25:20
@philiptaron:matrix.orgPhilip Taron (UTC-8)Gave you a ✅ after reading through the code.00:26:53
@infinisil:matrix.orginfinisil

Btw the RFC specifies to do it in a different way, but the basic idea is the same:

All satisfying definitions that can't be automatically migrated due to the above restrictions will be added to a CI exclusion list. CI is added to ensure that all satisfying definitions except the CI exclusion list must be using the new directory structure. This means that the new directory structure becomes mandatory for new satisfying definitions after this PR. The CI exclusion list should be removed eventually once the non-automatically-migratable satisfying definitions have been manually migrated. Only in very limited circumstances is it allowed to add new entries to the CI exclusion list.

00:27:33
@philiptaron:matrix.orgPhilip Taron (UTC-8)I'm all about the spirit dominating the letter.00:28:27
@infinisil:matrix.orginfinisilI'm planning to merge https://github.com/NixOS/nixpkgs/pull/272395 once CI passes so I can move onto the follow-up PR16:48:29

Show newer messages


Back to Room ListRoom Version: 9