!OqhvaDMJdKYUicLDiE:nixos.org

Nixpkgs Stdenv

225 Members
72 Servers

Load older messages


SenderMessageTime
19 Nov 2024
@emilazy:matrix.orgemily
In reply to @emilazy:matrix.org
the hack works, but it seems basically suboptimal that switching from canExecute to the more general and capable emulator stuff brings in a bunch of stuff, especially in weird platform/cross scenarios
(well specifically cross scenarios are fine because they'd be picking another emulator I guess…)
13:57:14
@emilazy:matrix.orgemily I don't necessarily think execline should have to be held to the standard of having a reasonable closure although it is a sufficiently simple package that it doesn't seem overly burdensome 13:57:47
@emilazy:matrix.orgemily but like if it suddenly started depending on ShellCheck or something that would be quite awful for the return value of the nop case of a core lib function 13:58:10
@reckenrode:matrix.orgRandy EckenrodeIf we do switch to emulators for things, that would open up using Rosetta 2 for aarch64- to x86_64-darwin cross. (I have started and stopped adding it several times, but it always seems pointless if it can’t be used to run tests.)14:06:48
@emilazy:matrix.orgemilytests are harder I think14:07:47
@emilazy:matrix.orgemilybut it's used for some things in the tree14:07:51
@emilazy:matrix.orgemilye.g. completions14:08:14
@emilazy:matrix.orgemily and gobject-introspection nonsense 14:08:27
@sternenseemann:systemli.orgsterni emily: but we always pull in a bunch of stuff for cross, I don't understand the concern?! 14:18:29
@sternenseemann:systemli.orgsterniyou always need to bootstrap the full native stdenv for cross tools14:19:09
@emilazy:matrix.orgemily sorry, I misspoke; I think the problem is more non-cross. if you change something in stdenv and want to verify tests.cc-wrapper.default, then it's 100 more rebuilds with current execline unless it's hacked around in those tests, just to fetch manpages etc. 14:20:03
@emilazy:matrix.orgemily which we've hacked around in tests.cc-wrapper.default, but it just in general seems bad for a basic lib function that is trying to accomplish literally a NOP to pull in all that stuff, when it was only switched to execline in the first place because "well, it's already there so why duplicate it?". 14:20:33
@emilazy:matrix.orgemilyto which the answer is, now it means the bootstrap chain for basic tests is a bunch longer, unless we hack around it or strip down the closure14:20:57
@sternenseemann:systemli.orgsterniyou don't need to use canExecute there, just don't test emulator if hostPlatform == buildPlatform if you really care about the speed of the tests14:20:58
@emilazy:matrix.orgemily but the whole point of having a NOP emulator is that you can just use it without needing to replicate that logic everywhere. 14:21:24
@emilazy:matrix.orgemily(that wouldn't work for i686 anyway I think)14:21:36
@sternenseemann:systemli.orgsterniI think it's worse to have like weird code for no reason that relies on bootstrapping logic14:21:56
@sternenseemann:systemli.orgsternithat's always a recipe for having to debug some eval problem for a week down the road14:22:17
@emilazy:matrix.orgemilyok. then can we go back to just vendoring a 5-line C program?14:22:17
@emilazy:matrix.orgemilythat would solve all the issues and be even fewer builds14:22:26
@emilazy:matrix.orgemily and execline can do whatever 14:22:32
@sternenseemann:systemli.orgsternino I'd say just use buildPackages.execline honestly, it's the simplest and cleanest14:22:48
@sternenseemann:systemli.orgsternithe problem just affects nixpkgs developers and we can just split the tests up, so you don't run the emulator tests if you're in a hurry, right?14:23:15
@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

Show newer messages


Back to Room ListRoom Version: 9