!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

225 Members
72 Servers

Load older messages


SenderMessageTime
19 Nov 2024
@sternenseemann:systemli.orgsterniand often you'd need to test cross anyways, then it makes no difference anyways14:23:32
@emilazy:matrix.orgemily I don't think hacks like #351768 are cleaner than int main(int argc, char **argv) { execvp(argv[1], argv+1) }. 14:24:12
@sternenseemann:systemli.orgsterni but yeah vendoring exec(1) is also an option, but it's also kind of silly 14:24:15
@emilazy:matrix.orgemilyI think adding >100 builds to the cycle time of testing compiler changes is painful14:24:43
@emilazy:matrix.orgemilyit's not about "emulator tests"14:25:02
@emilazy:matrix.orgemilythe emulator is used so that the cc-wrapper tests support both cross and native14:25:10
@emilazy:matrix.orgemilythere's nothing to skip14:25:22
@emilazy:matrix.orgemily needing logic to conditionalize it to be something that isn't painful to include in the closure defeats the whole point of having a NOP .emulator for when one platform can execute the other 14:25:44
@sternenseemann:systemli.orgsternithe silly thing is probably having the noop emulator15:28:35
@emilazy:matrix.orgemily why? it lets you uniformly handle native and cross. e.g. https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/ju/jujutsu/package.nix#L95-L107 or gobject-introspection stuff. we should use it more over canExecute if anything. 15:29:50
@sternenseemann:systemli.orgsterniit's an emulator that isn't an emulator15:30:55
@sternenseemann:systemli.orgsterni pkgs.writeShellScript "exec" "exec \"$@\"" 15:31:25
@emilazy:matrix.orgemilyit's the base case of emulation. handling native and cross uniformly is a good thing15:38:09
@emilazy:matrix.orgemilylooks like the shell script approach goes from 330 to 332 builds, so I guess that way is fine15:38:22
@emilazy:matrix.orgemilyI'll PR that instead15:38:26
@sternenseemann:systemli.orgsterniemulation shouldn't be a part of cross compilation, honestly, that's the root problem15:43:36
@emilazy:matrix.orgemily how would you prefer to handle things like gobject-introspection and anything else that requires running the produced binary to end up with a correct build of the resulting package? 15:44:39
@emilazy:matrix.orgemilyopened https://github.com/NixOS/nixpkgs/pull/357309, will test it now15:45:02
@sternenseemann:systemli.orgsterniWell I don't deny that it's sometimes necessary, but we shouldn't write emulator-first code since emulation is a crutch for packages that can't be cross-compiled properly.15:55:38
@emilazy:matrix.orgemilyit's increasingly common to do things like have binaries generate their own shell completion stuff15:56:24
@emilazy:matrix.orgemilyfor better or worse15:56:27
@emilazy:matrix.orgemilyideally those would be split out into separate derivations or something and we'd integrate emulators at the Nix level though15:56:38
@emilazy:matrix.orgemilybut that's a tall order when we haven't even separated out tests :/15:56:46
@sternenseemann:systemli.orgsterni for that I think you can just depend on yourself from buildPackages 15:56:49
@sternenseemann:systemli.orgsterniif your completions are target specific you deserve it15:57:11
@emilazy:matrix.orgemilydoesn't really work for tests though (but admittedly emulation is complicated there too)15:57:39
@emilazy:matrix.orgemily I don't love the buildPackages solution since it basically doubles all your builds 15:58:00
@sternenseemann:systemli.orgsterniyou build that anyways…15:58:59
@emilazy:matrix.orgemily what do you mean? jujutsu certainly doesn't depend on buildPackages.jujutsu 16:01:02
@emilazy:matrix.orgemilythough if you mean in the sense that Hydra builds most things for common platforms then sure16:01:10

Show newer messages


Back to Room ListRoom Version: 9