!lymvtcwDJ7ZA9Npq:lix.systems

Lix Development

415 Members
(Technical) development of Lix, the package manager, a Nix implementation. Please be mindful of ongoing technical conversations in this channel.139 Servers

Load older messages


SenderMessageTime
28 Jul 2025
@esperlily:matrix.orgEsperLily [she/her] the code that installs the certs calls pathAccessible(settings.caFile) first, that's the thing that I said needs to be pathAccessible(settings.caFile, true). But if that returns false, the code then checks if pathExists(settings.caFile) in order to throw a warning that the path exists but is inaccessible. Unfortunately if the path isn't accessible because of a permissions problem, then the pathExists call will throw an exception. So that pathExists should be pathAccessible(settings.caFile, false) (or pathAccessible(settings.caFile)), so that way a permissions problem just turns into false 02:37:35
@esperlily:matrix.orgEsperLily [she/her]oops that was supposed to be a replyto this02:37:50
@esperlily:matrix.orgEsperLily [she/her]* oops that was supposed to be a reply to this02:37:54
@raitobezarius:matrix.orgraitobezarius
In reply to @esperlily:matrix.org
the code that installs the certs calls pathAccessible(settings.caFile) first, that's the thing that I said needs to be pathAccessible(settings.caFile, true). But if that returns false, the code then checks if pathExists(settings.caFile) in order to throw a warning that the path exists but is inaccessible. Unfortunately if the path isn't accessible because of a permissions problem, then the pathExists call will throw an exception. So that pathExists should be pathAccessible(settings.caFile, false) (or pathAccessible(settings.caFile)), so that way a permissions problem just turns into false
well spotted
02:38:05
@raitobezarius:matrix.orgraitobezariusthis is also a problem for other code paths02:38:10
@raitobezarius:matrix.orgraitobezariusthank you :)02:38:13
@esperlily:matrix.orgEsperLily [she/her]it bothers me how many of our filesystem helpers just happily throw exceptions without necessarily being obvious from the function call that it's going to do that. In many cases yeah a permissions problem should turn into a hard error, but in other cases it shouldn't, and because this is done with exceptions it's a silent problem and too easy to miss02:40:30
@raitobezarius:matrix.orgraitobezariusi mean the technical debt in this codebase is what it is02:41:28
@raitobezarius:matrix.orgraitobezariusmy biggest nightmares right now are really the StorePath class02:41:55
@raitobezarius:matrix.orgraitobezariusand how it goes from StorePath to string02:42:01
@raitobezarius:matrix.orgraitobezariusand what a disaster it is wrt to chroot, not chroot, sandbox, not sandbox, linux, not linux, etc.02:42:12
@raitobezarius:matrix.orgraitobezariusand I think I'm going to tackle this at some point02:42:29
@esperlily:matrix.orgEsperLily [she/her]that sounds like a mess02:42:47
@jade_:matrix.orgjade_i think i found a bug in the nix store delete error message related to said stringification. headache inducing.02:42:57
@raitobezarius:matrix.orgraitobezariusyeah02:43:09
@raitobezarius:matrix.orgraitobezariusrepairing chroot stores meant that i had to sprinkle a bunch of toRealPath(s) while not being certain all the time02:43:21
@raitobezarius:matrix.orgraitobezarius and we have APIs that accepts only logical paths 02:43:27
@raitobezarius:matrix.orgraitobezariusso if you give it a physical path, it will err out02:43:40
@raitobezarius:matrix.orgraitobezariusand it trickles down to the CLI02:43:48
@jade_:matrix.orgjade_also what exactly CanonPath means or what constructing one means is Non Obvious02:43:52
@raitobezarius:matrix.orgraitobezariusso sometimes you need to do nix $COMMAND $PHYSICAL_PATH --store $CHROOT_STORE or substitute $PHYSICAL_PATH for $LOGICAL_PATH02:44:15
@raitobezarius:matrix.orgraitobezariusand there's absolutely NO documentation on which command requires what02:44:25
@raitobezarius:matrix.orgraitobezariusbut this needs to stop02:44:39
@raitobezarius:matrix.orgraitobezariuswe need to stop having to use toRealPath manually02:44:43
@jade_:matrix.orgjade_yessss02:44:47
@raitobezarius:matrix.orgraitobezariustype safety needs to fix that02:44:49
@jade_:matrix.orgjade_ also --store throwing an assert for a relative path. headache! 02:45:09
@jade_:matrix.orgjade_also "chroot stores" are a misnomer because they work on macOS but just cant do builds02:45:26
@raitobezarius:matrix.orgraitobezariusthe concept of chroot stores as a duplicated piece of code should die02:45:31
@jade_:matrix.orgjade_yes02:45:37

Show newer messages


Back to Room ListRoom Version: 10