!djTaTBQyWEPRQxrPTb:nixos.org

Nixpkgs Architecture Team

229 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 Aug 2023
@infinisil:matrix.orginfinisil Robert Hensing (roberth): John Ericson: Ping 14:33:01
@Ericson2314:matrix.orgJohn Ericsonsorry! On the west coast but was up in term, not sure how I missed the ping16:36:06
@Ericson2314:matrix.orgJohn Ericson I am not sure if I am reading https://discourse.nixos.org/t/2023-08-08-nixpkgs-architecture-team-meeting-42/31454 right on drvPath, but did we agree that regardless of who is deprecating what, it would be nice to have this builtin? 22:18:22
@Ericson2314:matrix.orgJohn EricsonIMO saying Nixpkgs is blocked on Nix, and Nix is blocked on Nixpkgs is not the best state of affairs22:18:47
@Ericson2314:matrix.orgJohn Ericson the general approach Robert Hensing (roberth) and I have discussed is Nix and Nixpkgs being increasingly willing to do chart their own paths 22:19:32
@Ericson2314:matrix.orgJohn EricsonI think the unit files is a good example of this, and decoupling "package from derivation" https://github.com/NixOS/nix/issues/6507 is also a good example22:20:22
@hsngrmpf:matrix.orgDavHauThe factor of 5-7 is correct for the current benchmark. Though, I expect the impact on real world use cases to be lower. One reason is that the module system does have defaults for each individual option, vs. the package func doesn't. Once more options are used, the ration should get lower. But this is just speculation. For sure there is room for optimization. Let's continue the discussion here: https://github.com/nixpkgs-architecture/issues/issues/2222:22:28
@hsngrmpf:matrix.orgDavHauOk, I now re-ran the benchmark passing 100 env variables to each derivation. Now the result looks much better. The modules are between 1.6 to 2 times slower than pkg-funcs.22:42:13
@infinisil:matrix.orginfinisil John Ericson: We can't change drvPath behavior without breaking compatibility, which we shouldn't do for such a core part. So the only alternative is to slowly deprecate it by introducing another say drvPathNew that doesn't have the problem. But it doesn't make sense to do that in Nixpkgs, because drvPath is effectively exclusively used by Nix itself. In addition it's Nix itself that produces drvPath in the first place, it should really be Nix's responsibility to deprecate or fix it. 23:13:44
@infinisil:matrix.orginfinisil The idea of keeping Nix stable and changing Nixpkgs instead only really works for things like wrappers of builtin functionality that people are using instead, such as stdenv.mkDerivation 23:18:07
@infinisil:matrix.orginfinisilYes Nix doesn't have a good way to deprecate things yet, but that isn't Nixpkgs' problem :)23:23:15
@infinisil:matrix.orginfinisil * Yes Nix doesn't have a good way to deprecate things yet, but that isn't Nixpkgs' problem :) 23:23:31
9 Aug 2023
@Ericson2314:matrix.orgJohn Ericson infinisil I think there is a misunderstanding of what is affected by this change. "Regular" usage that treats the output of `builtins.derivation` as a black box is not affected. Only usage that explicitly pulls out `drvPath` and splices that (into strings, ultimately into another derivation) is affected. Only *user* code does this. 01:54:54
@infinisil:matrix.orginfinisilYeah I get that, still, it's a breaking change01:56:47
@Ericson2314:matrix.orgJohn EricsonI believe based on my recollection of experiments, nix in fact hardly cares what the contents of `drvPath` is. It might just check that there is a string with that key.01:58:01
@Ericson2314:matrix.orgJohn EricsonIt is a breaking change, but it's Nixpkgs's breaking change01:58:17
@Ericson2314:matrix.orgJohn Ericson Robert Hensing (roberth)'s issue from a "nuts and bolts" perspective is to decouple what `derivation` produces from what the CLI or anything else expects 01:59:15
@Ericson2314:matrix.orgJohn EricsonRight now those things sort of match up, but it's somewhat a coincidence that they do01:59:51
@Ericson2314:matrix.orgJohn EricsonWe've been considering not doing deprecation cycles individual fields, but like a `derivationSuperStrict` that02:00:51
@Ericson2314:matrix.orgJohn Ericson* We've been considering not doing deprecation cycles individual fields, but like a `derivationSuperStrict`02:00:58
@infinisil:matrix.orginfinisilReally not sure why that should concern Nixpkgs though02:01:26
@Ericson2314:matrix.orgJohn EricsonAnd behind that is allowing individual projects to pick and choose their own stability / manage their own deprecation cycle02:01:37
@Ericson2314:matrix.orgJohn EricsonWith Nix just saying "here's what I produce, here's what I expect, between those is a lot of flexibility you do what you want"02:02:08
@Ericson2314:matrix.orgJohn EricsonAlso, a nix-based deprecation cycle means the same version of Nixpkgs evaluated with different Nixes gives different stuff (baring more language version machiner)02:04:09
@infinisil:matrix.orginfinisilI really only care about not having breaking changes without warning02:04:27
@infinisil:matrix.orginfinisilIn Nixpkgs (but Nix should care about that too)02:04:49
@Ericson2314:matrix.orgJohn EricsonI have 0 problem with Nixpkgs choosing to introduce a new attribute :)02:04:56
@Ericson2314:matrix.orgJohn EricsonDoing the warnings, etc.02:05:18
@infinisil:matrix.orginfinisil
In reply to @Ericson2314:matrix.org
Also, a nix-based deprecation cycle means the same version of Nixpkgs evaluated with different Nixes gives different stuff (baring more language version machiner)
There's minver.nix for that
02:05:26
@infinisil:matrix.orginfinisil
In reply to @Ericson2314:matrix.org
I have 0 problem with Nixpkgs choosing to introduce a new attribute :)
The problem is that Nix itself continues using drvPath. There needs to be an alternative that doesn't make everybody have warnings when they use e.g. the nix repl to evaluate derivations
02:07:09

Show newer messages


Back to Room ListRoom Version: 9