!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

683 Members
Rust154 Servers

Load older messages


SenderMessageTime
26 Jul 2025
@emilazy:matrix.orgemily
In reply to @niklaskorz:matrix.org
no need to change the default value
I think the default value breaks ?? actually I guess it probably doesn't
10:04:23
@emilazy:matrix.orgemilyattrsets so weird10:04:28
@emilazy:matrix.orgemilyanyway do whatever, it's all nitpicking :P10:04:40
@emilazy:matrix.orgemilyeven the warning is automated nitpicking 😆10:04:56
@niklaskorz:matrix.orgniklaskorz
nix-repl> ({ useFetchCargoVendor ? true } @ attrs: attrs ? useFetchCargoVendor) { }
false

nix-repl> ({ useFetchCargoVendor ? true } @ attrs: attrs ? useFetchCargoVendor) { useFetchCargoVendor = true; }
true
10:05:23
@emilazy:matrix.orgemilyI'm not even sure we should ship it in the final release since it's probably annoying for users with epsilon benefit but meh10:05:25
@emilazy:matrix.orgemily right, because attrs is the unprocessed value. brain was just off for a second 10:05:53
@niklaskorz:matrix.orgniklaskorzheh it’s a common nix trap I think10:06:18
@emilazy:matrix.orgemily
In reply to @emilazy:matrix.org
we leave a TODO saying to do that and then forget about it
(wish: bot that finds # TODO(25.11): and opens issues pinging the author and a tracking issue to group them on branch-off)
10:07:01
@niklaskorz:matrix.orgniklaskorzuh where do I put the warnIf without triggering another indentation level...10:08:17
@emilazy:matrix.orgemily
In reply to @niklaskorz:matrix.org
heh it’s a common nix trap I think
this is the kind of FP thing that I pride myself on not finding confusing at all so my only excuse is that functions of attrsets are so magical in Nix that I can't think of them as just normal pattern matching :p
10:08:22
@emilazy:matrix.orgemily(because e.g. you can introspect what a function matches on which is nuts)10:08:36
@emilazy:matrix.orgemily
In reply to @niklaskorz:matrix.org
uh where do I put the warnIf without triggering another indentation level...
assert
10:08:42
@emilazy:matrix.orgemily assert fooIf ... true; is how we add new constructs to the language these days 😅 10:09:18
@emilazy:matrix.orgemily we should ideally have things with the true baked in 10:09:34
@emilazy:matrix.orgemily like assertMsg 10:09:43
@emilazy:matrix.orgemily assertWarn or something 10:09:58
@emilazy:matrix.orgemily (hot take: I actually kind of love Nix's keyword foo; bar expression pattern. I wish let did one variable and had no in) 10:10:54
@emilazy:matrix.orgemily (second wish: do a; b as seq a b so we didn't have to use assert for indentation) 10:11:50
@niklaskorz:matrix.orgniklaskorzok I adjusted the message for the error after all: https://github.com/NixOS/nixpkgs/pull/42856510:15:17
@niklaskorz:matrix.orgniklaskorz
oh why did the checks fail

ah right
10:17:06
@niklaskorz:matrix.orgniklaskorzso uh, I’ll go ahead with merging Toma’s treewide then, rebase the warning PR, and undraft it10:18:24
@niklaskorz:matrix.orgniklaskorz sweats 10:18:27
@niklaskorz:matrix.orgniklaskorzunless someone shouts in the next 5 minutes10:18:51
@tomasajt:matrix.orgTomaLet me check one thing beforehand10:21:31
@tomasajt:matrix.orgTomaOkay, it's fine I think. Also: you're using the wrong nixfmt for the followup PR :)10:25:06
@niklaskorz:matrix.orgniklaskorzoh yup, oops10:26:39
@fxomt:pub.solar@fxomt:pub.solar left the room.11:07:41
@glepage:matrix.orgGaétan Lepage Any opinion on the rustfmt fix for x86_64-darwin on nixos-25.05?
https://github.com/NixOS/nixpkgs/pull/427702
13:00:45
@ed209a:matrix.orged209 joined the room.13:15:43

Show newer messages


Back to Room ListRoom Version: 6