!9IQChSjwSHXPPWTa:lix.systems

Lix

708 Members
Lix user channel. Feel free to discuss on-topic issues here and give each other help. For matrix.to links to the rest of the Lix channels, see: https://wiki.lix.systems/books/lix-organisation/page/matrix-rooms216 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
6 Nov 2024
@lexi:kescher.atlexi are there any plans to make builtins.addErrorContext a bit better? this one has been messing around with it a bit to at least make errors a bit more readable, and has had moderate success but only with ugly ugly hacks that should rather be a language feature. especially the fact that it isn't recursive (or at least not an option to make it recursive) is pretty annoying. for example, (builtins.addErrorContext "context" { abc.def = throw "oops"; }).abc.def just does not print any context. this can more or less be worked around inside the language, but it's quite annoying, and it also has the huge downside that while making it more readable with the context, it makes it less readable by adding unnecessary noise into the stack trace, especially when using a wrapper around addErrorContext (to make it recursive for example). it would be very useful in some cases to remove the next/previous N stack frames from the trace sometimes, and doing that without actual language support is extremely hacky. this could probably be implemented completely backwards-compatible with just string prefixes like builtins.trace "-2,+2,rec (actual context here)" as "remove two stack frames in each direction and make it recursive". would someone more experienced in C++ be interested in potentially implementing something like that? 22:43:33
@lexi:kescher.atlexi * are there any plans to make builtins.addErrorContext a bit better? this one has been messing around with it a bit to at least make errors a bit more readable, and has had moderate success but only with ugly ugly hacks that should rather be a language feature. especially the fact that it isn't recursive (or at least not an option to make it recursive) is pretty annoying. for example, (builtins.addErrorContext "context" { abc.def = throw "oops"; }).abc.def just does not print any context. this can more or less be worked around inside the language, but it's quite annoying, and it also has the huge downside that while making it more readable with the context, it makes it less readable by adding unnecessary noise into the stack trace, especially when using a wrapper around addErrorContext (to make it recursive for example). it would be very useful in some cases to remove the next/previous N stack frames from the trace sometimes, and doing that without actual language support is extremely hacky. this could probably be implemented completely backwards-compatible with just string prefixes like builtins.addErrorContext "-2,+2,rec (actual context here)" as "remove two stack frames in each direction and make it recursive". would someone more experienced in C++ be interested in potentially implementing something like that? 22:45:47
7 Nov 2024
@piegames:flausch.socialpiegames
In reply to @lexi:kescher.at
are there any plans to make builtins.addErrorContext a bit better? this one has been messing around with it a bit to at least make errors a bit more readable, and has had moderate success but only with ugly ugly hacks that should rather be a language feature. especially the fact that it isn't recursive (or at least not an option to make it recursive) is pretty annoying. for example, (builtins.addErrorContext "context" { abc.def = throw "oops"; }).abc.def just does not print any context. this can more or less be worked around inside the language, but it's quite annoying, and it also has the huge downside that while making it more readable with the context, it makes it less readable by adding unnecessary noise into the stack trace, especially when using a wrapper around addErrorContext (to make it recursive for example). it would be very useful in some cases to remove the next/previous N stack frames from the trace sometimes, and doing that without actual language support is extremely hacky. this could probably be implemented completely backwards-compatible with just string prefixes like builtins.addErrorContext "-2,+2,rec (actual context here)" as "remove two stack frames in each direction and make it recursive". would someone more experienced in C++ be interested in potentially implementing something like that?
Possibly, but this probably needs some more design work first
00:01:04
@hexa:lossy.networkhexacan we have https://github.com/NixOS/nix/pull/9280 in lix?00:28:43
@hexa:lossy.networkhexaasking for om-nom-nom00:28:55
@ma27:nicht-so.sexyma27ohhh does this fix the reporting in nom when doing remote builds? :o09:38:26
@vigress9:matrix.orgV. 🏳️‍⚧️Now that the static build works, can we get binary releases?09:56:53
@kfears:matrix.orgKFears (annoying)Vaguely related q: how long have static builds been broken for?10:02:24
@kfears:matrix.orgKFears (annoying)Maybe there's space for improving installer since we have static builds now10:02:45
@k900:0upti.meK900I do wonder if we can/should just do non-NixOS installs by just dropping a static binary somewhere yeah10:04:05
@kfears:matrix.orgKFears (annoying)Btw, assuming we want to install static binary into the Nix store, there are no runtime dependencies right? Just the CA certs?10:06:38
@kfears:matrix.orgKFears (annoying)(I do think dropping a static binary somewhere is a much better approach than using Nix store for this btw)10:07:15
@kfears:matrix.orgKFears (annoying)That would also make upgrading extremely smooth10:07:54
@kfears:matrix.orgKFears (annoying)Like, the whole upgrade procedure would just come down to replacing the binary with a newer version10:08:27
@atemu12:matrix.orgAtemuLix is more than a single binary10:09:39
@atemu12:matrix.orgAtemuYou need integrations with the system such as users, groups and shell hooks10:10:00
@atemu12:matrix.orgAtemuAnd the nix-daemon if course10:10:14
@atemu12:matrix.orgAtemuAnd even mounting the Nix store on some systems10:11:12
@vigress9:matrix.orgV. 🏳️‍⚧️ Yeah but point is, it is dramatically simpler 10:11:28
@kfears:matrix.orgKFears (annoying)Yeah, I might have given off the wrong impression, I don't try to say that we'll be able to drop installer and just distribute ready-to-go binaries, nuh-uh10:12:03
@kfears:matrix.orgKFears (annoying)We'll still need the installer10:12:09
@kfears:matrix.orgKFears (annoying)But the part that handles installing the package will be so much simpler, it's very nice10:12:58
@k900:0upti.meK900
In reply to @atemu12:matrix.org
Lix is more than a single binary
Yes, but upgrading a single binary is a lot easier
10:14:37
@kfears:matrix.orgKFears (annoying)Currently, Lix installation part of the installer is straight up miserable, we bundle a tarball with like manually copied Nix store paths with Lix, glibc, aws-sdk-cpp, curl and so much more10:15:17
@kfears:matrix.orgKFears (annoying) And we like do a whole backflip to set up Lix to manage itself with those store paths, which means we hard depend on nix upgrade-nix or doing even more crimes to upgrade Lix using the installer 10:16:08
@kfears:matrix.orgKFears (annoying)And the alternative (which has a submitted CL) is basically re-implementing parts of the substitution process in Rust by hand ("parts" because doing the whole thing is miserable)10:17:20
@kfears:matrix.orgKFears (annoying)And it's like a +800 LoC diff10:17:32

Show newer messages


Back to Room ListRoom Version: 10