!bxVOQwsVoHhZcmNDGw:nixos.org

Nix + dotnet

121 Members
24 Servers

Load older messages


SenderMessageTime
28 Jun 2025
@mattsturg:matrix.orgMatt Sturgeon

If it was out of memory it would have to be using a lot of memory to be reproducible on my desktop machine.

Good point, I have 64GB and was reproducing the issue fairly regularly. I take it there's no artificial memory limit from dotnet or the build sandbox?

Maybe it's hitting a file handle ulimit or something?

Could be something like that. Or could just be random segfaults in buggy software... 🤔

It would be nice to know more about the child process invocation (args, output, exit code).

Anything specific you want me to test, other than just time -v?

20:49:59
@corngood:corngood.comCorngoodIf it's building in the sandbox and under the systemd daemon, it might have different limits than dev shell. The nuclear logging option is probably `strace -f`. That's going to be a lot of output though. Maybe I'll see if I can find anything useful in `VSTestTask`21:00:06
30 Jun 2025
@mattsturg:matrix.orgMatt Sturgeon

I'm wondering if it is practical to move the tests into a passthru.tests derivation 🤔

That way 1) end-users wouldn't need to run the tests to build the unfree package, 2) intermittent tests wouldn't cause build failures on hydra.

I'd still like to uncover the actual issue, but I'm curious if extracting the tests to a separate derivation is possible?

I guess the test derivation would need the same src as the main package, to access the test cases and relevant build properties. It'd also need the main package as an input, to get the built binaries.

That sounds reasonable, but what I'm unsure of is how easy it'd be to tell dotnet test to run the local test cases against the pre-built binaries from the main package?

12:19:21
@mattsturg:matrix.orgMatt Sturgeon

Maybe I'll see if I can find anything useful in VSTestTask

Looks like the impl is here: https://github.com/dotnet/dotnet/blob/main/src/vstest/src/Microsoft.TestPlatform.Build/Tasks/VSTestTask.cs

There's a note about the "Task returned false but did not log an error." error at line 69.

Other than that, I nothing is jumping out at me 🤔

Also: I noticed that the Test host process crashed and "VSTestTask" task returned false but did not log an error. errors also appear in normal (failing) build logs, even without -v:diag. We just need to scroll up to find them, as they're usually not at the end of the logs.

12:39:42
@mattsturg:matrix.orgMatt Sturgeon It looks like the same errors occasionally shows up in upstream's CI too. E.g. here 17:35:27
@mattsturg:matrix.orgMatt Sturgeon * It looks like the same (or similar) errors occasionally shows up in upstream's CI too. E.g. here 17:39:46
1 Jul 2025
@corngood:corngood.comCorngood
In reply to @mattsturg:matrix.org

I'm wondering if it is practical to move the tests into a passthru.tests derivation 🤔

That way 1) end-users wouldn't need to run the tests to build the unfree package, 2) intermittent tests wouldn't cause build failures on hydra.

I'd still like to uncover the actual issue, but I'm curious if extracting the tests to a separate derivation is possible?

I guess the test derivation would need the same src as the main package, to access the test cases and relevant build properties. It'd also need the main package as an input, to get the built binaries.

That sounds reasonable, but what I'm unsure of is how easy it'd be to tell dotnet test to run the local test cases against the pre-built binaries from the main package?

One way to do this would be to disable tests and just put an override with them enabled in passthru.tests.

Is it consistently crashing in certain tests? Maybe we can get away with disabling only certain tests or projects?

01:19:19
@mattsturg:matrix.orgMatt Sturgeon

One way to do this would be to disable tests and just put an override with them enabled in passthru.tests.

Good idea. I've opened https://github.com/NixOS/nixpkgs/pull/421459

Overriding is a simple solution, but it means building the app twice... I was hoping we'd be able to reuse the binaries from the main package, as an input for the test package.

Is it consistently crashing in certain tests? Maybe we can get away with disabling only certain tests or projects?

I'm not sure; I don't think it prints which test failed in the logs. It might be hidden in the v:diag logs somewhere though. I also suspect it is a specific test or project, so if we can identify it we can disable it and report the issue upstream.

10:37:33
6 Jul 2025
@jammie:matrix.orgJamieMagee joined the room.02:25:27
11 Jul 2025
@felschr:matrix.orgfelschr left the room.16:52:34
14 Jul 2025
@znaniye:matrix.orgznaniye joined the room.13:17:33
@znaniye:matrix.orgznaniye Hey, what can i do if i need to overrideAttrs nugetDeps? Has anyone here ever been in this situation? 16:59:18
@k900:0upti.meK900Why?17:19:22
@corngood:corngood.comCorngoodIs it definitely broken? I'd like it to work.17:21:19
@znaniye:matrix.orgznaniye

Due to this, i mean.

Overriding nugetDeps is just one example that caused issue. For example overriding projectFile wouldn't work either...

17:33:00
@znaniye:matrix.orgznaniyeOr any other attribute from that list17:34:14
@corngood:corngood.comCorngoodI guess we either need to pass all these attributes through, or add something like `overridePythonAttrs`. I don't love either of those options 18:03:47
@gggkiller:matrix.orgGGG probably something like overrideDotnetAttrs 18:04:18
@gggkiller:matrix.orgGGG making it works with plain overrideAttrs would require to move any and all logic done in nix in buildDotnetModule over to bash which would make it much worse 18:05:04
@corngood:corngood.comCorngoodIt doesn't actually have to be in bash, but it needs to use finalAttrs, and stuff would get leaked into bash 18:24:14
@gggkiller:matrix.orgGGGthat feels like it'd end up being a major mess18:24:38
@gggkiller:matrix.orgGGG a mix of finalAttrs and non-finalAttrs usage or some other type of hack 18:25:04
@znaniye:matrix.orgznaniye By removing line 215 locally, shouldn't I then be able to override nugetDeps properly with overrideAttrs? 18:30:36
@corngood:corngood.comCorngood Possibly not, if it's not using finalAttrs.nugetDeps 18:31:01
@znaniye:matrix.orgznaniyejust to see things working18:31:04
@gggkiller:matrix.orgGGGno, because what you want to affect is on line 23318:31:15
@znaniye:matrix.orgznaniyeoh, i see18:31:34
@corngood:corngood.comCorngood Here's an issue about python moving away from overridePythonAttrs to overrideAttrs: https://github.com/NixOS/nixpkgs/issues/379602 18:32:02
@gggkiller:matrix.orgGGG it'd only work if it was something like inherit (finalAttrs) nugetDeps; 18:32:02
@gggkiller:matrix.orgGGG I see, I didn't know overridePythonAttrs was discouraged 18:32:45

Show newer messages


Back to Room ListRoom Version: 9