!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

951 Members
For people hacking on the Nix package manager itself200 Servers

Load older messages


SenderMessageTime
21 Dec 2024
@stablejoy:matrix.org@stablejoy:matrix.org left the room.05:08:10
@dmiskovic:matrix.org@dmiskovic:matrix.org left the room.05:14:07
@stablejoy:matrix.org@stablejoy:matrix.org joined the room.06:42:34
@dimitarnestorov:matrix.orgDimitar joined the room.19:39:17
22 Dec 2024
@drewrypope:matrix.orgDrewry Pope why aren't shallow clones the default? 11:30:43
@stablejoy:matrix.org@stablejoy:matrix.org left the room.13:25:36
@allrealmsoflife:matrix.orgallrealmsoflife joined the room.13:57:42
23 Dec 2024
@joerg:thalheim.ioMic92I think they don't have a revision count, which is unfortunately a feature.09:23:20
@joerg:thalheim.ioMic92But I think we could still use this for github/gitlab fetchers.09:24:56
@drewrypope:matrix.orgDrewry Pope ahhhhHHHHHHHHHH ok thank you 09:30:59
@xiaoxiangmoe:matrix.org@xiaoxiangmoe:matrix.org left the room.14:09:42
@fgrsnau:matrix.orgStefan changed their display name from fgrsnau to Stefan.23:41:15
24 Dec 2024
@trofi:matrix.orgtrofi postgresql_14 fails the build with the following cryptic error: error: derivation contains an illegal reference specifier 'man'. What does it mean? One of the outputs is not supposed to have man reference, but does? But it does not say which output It is. Is it something else? 22:20:06
@trofi:matrix.orgtrofi

Surprisingly adding a no-op change like:

--- a/pkgs/servers/sql/postgresql/generic.nix
+++ b/pkgs/servers/sql/postgresql/generic.nix
@@ -447,0 +448,2 @@ let
+      FOO = "42";
+

fixes the build. As if there is some ordering issue in nix to discover known outputs.

22:25:47
@matthewcroughan:defenestrate.itmatthewcroughanThere is currently no way to pass auth headers into filetransfer.cc, open PRs/Issues about it, years of history about authentication being unsolved, how come?22:29:02
@matthewcroughan:defenestrate.itmatthewcroughanhttps://ec.haxx.se/libcurl-http/auth.html#bearer22:29:16
@matthewcroughan:defenestrate.itmatthewcroughan All that must be done is passing CURLOPT_XOAUTH2_BEARER when present 22:29:31
@matthewcroughan:defenestrate.itmatthewcroughanyet this is only supported for gitlab fetches22:29:47
25 Dec 2024
@ananya.kaligal:matrix.orgAnanya S Kaligal joined the room.13:20:21
@tanja:catgirl.cloudTanja (she/her) changed their display name from Tanja (she/her) to Tanja (she/her) [DECT 6929].14:48:10
@chukfinley:matrix.orghackerman_1337 changed their display name from hackerman to hackerman_1337.19:06:51
@trofi:matrix.orgtrofi Attempted to improve an error message as https://github.com/NixOS/nix/pull/12105. Looks like nix losk man output when built a goal with man output. I wonder if outputChecks does not specify some kind of dependency for string references luke plain "man". 22:07:02
@trofi:matrix.orgtrofi * Attempted to improve an error message as https://github.com/NixOS/nix/pull/12105. Looks like nix lotk man output when built a goal with man output. I wonder if outputChecks does not specify some kind of dependency for string references luke plain "man". 22:07:19
26 Dec 2024
@10leej:matrix.org@10leej:matrix.org left the room.01:41:45
@gasu:matrix.orggasu joined the room.05:33:52
@trofi:matrix.orgtrofi Fun fact: -D_GLIBCXX_DEBUG crashes nix-env as std::stable_sort predicate does not maintain !(a < a) property: https://github.com/NixOS/nix/issues/12106 07:46:10
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)

What should builtins.sort (a: b: true) [ 1 2 3 ]even do? Should this be a nix language-level UB? Currently manual does not provide any preconditions https://nix.dev/manual/nix/2.25/language/builtins.html?highlight=builtins.sort#builtins-sort.

This would be a tricky thing to fix. Failing gracefully would require validating the strict weak ordering or using sorting algorithms that do not explode when the comparator is broken. std::sort can easily explode since it's something like qsort. stable_sort is actually a combination of insertion sort with merge sort on top. https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a01347.html#l03409

I think using a custom merge sort would be safe even for broken predicates and won't crash nix evaluator, but this would still need to be nix UB (such calls to sort are ill-formed and diagnosing it is prohibitively expensive).

Either way this calls for a custom sorting implementation that does not assume that the provided predicate is strict weak ordering.

10:17:33
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)What's more worrying is the fact that somewhere in nixpkgs there are broken comparator predicates.10:27:59
@aloisw:julia0815.de@aloisw:julia0815.de
In reply to @xokdvium:matrix.org

What should builtins.sort (a: b: true) [ 1 2 3 ]even do? Should this be a nix language-level UB? Currently manual does not provide any preconditions https://nix.dev/manual/nix/2.25/language/builtins.html?highlight=builtins.sort#builtins-sort.

This would be a tricky thing to fix. Failing gracefully would require validating the strict weak ordering or using sorting algorithms that do not explode when the comparator is broken. std::sort can easily explode since it's something like qsort. stable_sort is actually a combination of insertion sort with merge sort on top. https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.4/a01347.html#l03409

I think using a custom merge sort would be safe even for broken predicates and won't crash nix evaluator, but this would still need to be nix UB (such calls to sort are ill-formed and diagnosing it is prohibitively expensive).

Either way this calls for a custom sorting implementation that does not assume that the provided predicate is strict weak ordering.

It currently triggers C++ UB.
10:29:30
@xokdvium:matrix.orgSergei Zimmerman (xokdvium)

Yup, that's clearly a huge problem and this should be fixed by not using standard sorting algorithms:

Either way this calls for a custom sorting implementation that does not assume that the provided predicate is strict weak ordering.

What I'm trying to say is that this should still be UB in the nix language, but not crash and burn the evaluator.

10:31:14

Show newer messages


Back to Room ListRoom Version: 6