| 30 Jan 2023 |
K900 | All the errors bubble up to main and THEN panic | 13:55:13 |
K900 | So the backtrace will look exactly like this every time | 13:55:23 |
K900 | But the error object itself will preserve context | 13:55:35 |
Sandro 🐧 | In reply to @k900:0upti.me Oh wow how did you even do that run it as normal user through envfs | 14:03:09 |
K900 | Oh | 14:03:13 |
K900 | Yeah that makes sense | 14:03:16 |
K900 | The very first thing it does is open /dev/kmsg | 14:03:25 |
K900 | Because that's pretty much the only place we can log to that is reasonably user-accessible | 14:03:51 |
K900 | And this is also the only place we panic | 14:04:29 |
K900 | If anything after this fails, it goes into kmsg | 14:04:42 |
K900 | Actually maybe we should make the shim explode if it's not running as pid1 | 14:06:14 |
K900 | Also I just realized this isn't entirely accurate | 14:06:57 |
K900 | We can also panic if there's no argv[0] | 14:07:06 |
K900 | But that should definitely never happen if we're init | 14:07:12 |
Sandro 🐧 | Do we still need https://github.com/nix-community/NixOS-WSL/blob/main/modules/wsl-distro.nix#L65-L68 ?
For me wslpath from /bin is used | 14:09:33 |
K900 | Probably not | 14:10:08 |
K900 | https://github.com/nix-community/NixOS-WSL/blob/main/modules/wsl-distro.nix#L103 | 14:10:08 |
K900 | Though I guess you could technically not have /bin on PATH at all | 14:10:55 |
Sandro 🐧 | In reply to @k900:0upti.me Actually maybe we should make the shim explode if it's not running as pid1 I would suggest to add some helpful message that the binary should not be run manually and things are different from what we expect | 14:11:33 |
K900 | Sounds good to me | 14:11:56 |
K900 | Want to PR it? I feel like complete shit so I probably won't get to it until tomorrow | 14:12:45 |
Sandro 🐧 | https://github.com/nix-community/NixOS-WSL/pull/209 | 14:12:55 |
Sandro 🐧 | Can we easily make https://github.com/nix-community/NixOS-WSL/blob/main/modules/wsl-distro.nix#L31-L35 available to envfs? | 14:54:16 |
Sandro 🐧 | I guess thgrough an internal option | 14:54:31 |
K900 | I don't think we want to | 14:55:37 |
K900 | That whole thing is one big hack to make WSL's init happy | 14:55:54 |
Sandro 🐧 | I need it for envfs at evaluation time | 14:59:48 |
Sandro 🐧 | I'll make it readOnly and internal so no one can see it | 14:59:58 |
Sandro 🐧 | Also FYI I am probably doing a PR to convert the options to mdDoc in the future for a side project | 15:00:34 |
| 31 Jan 2023 |
Arson Copperflame | In reply to @sandro:supersandro.de Also FYI I am probably doing a PR to convert the options to mdDoc in the future for a side project I wanted to put something like Antora UI in there, but I haven't gotten around to that yet. What is your plan exactly? | 00:08:47 |