| 28 Jan 2024 |
K900 | I don't think it runs tests for anything in vendor at least | 16:01:45 |
@qbit:tapenet.org | it does in my experience | 16:02:44 |
@qbit:tapenet.org | well - builds.. so I assume tests as well | 16:03:08 |
K900 | Hmm | 16:03:25 |
K900 | I'm rerunning it with -parallel now | 16:03:37 |
K900 | We'll see where that goes | 16:03:40 |
Paul Meyer (katexochen) | In reply to @k900:0upti.me https://github.com/NixOS/nixpkgs/blob/1e5988ee34cb0c0c5d0db9594f51841455730f54/pkgs/build-support/go/module.nix#L276-L278 This is terrible in general, I'm working on a general rework on how packages to build and test are discovered. | 16:07:25 |
@qbit:tapenet.org | go test $(go list ./... | grep -v /vendor/) would probably be a good thing to have | 16:09:08 |
Paul Meyer (katexochen) | In reply to @qbit:tapenet.org it does in my experience It definitely shouldn't. https://github.com/NixOS/nixpkgs/blob/e4b4793ffe04112a121d0a23e2010c576bddefdd/pkgs/build-support/go/module.nix#L235 | 16:09:26 |
@qbit:tapenet.org | nice | 16:09:55 |
Paul Meyer (katexochen) | In reply to @qbit:tapenet.org
go test $(go list ./... | grep -v /vendor/) would probably be a good thing to have yes, my solution uses go list (but is a bit more sophisticated). | 16:10:10 |
@qbit:tapenet.org | so find should be go list there probably | 16:10:10 |
@qbit:tapenet.org | sweet | 16:10:25 |
Paul Meyer (katexochen) | but it will cause a lot of built failures | 16:10:46 |
Paul Meyer (katexochen) | as the current way excludes tests in most cases | 16:11:08 |
Paul Meyer (katexochen) | you can check the following for a preview ;)
https://github.com/katexochen/nixpkgs/commits/buildGoModule/tests/ | 16:11:49 |
@qbit:tapenet.org | nice | 16:12:07 |
Paul Meyer (katexochen) | While I still have some work to do, I think I will just open a draft PR now | 16:12:14 |
K900 | go: flag needs an argument: -parallel (from $GOFLAGS) | 16:28:13 |
K900 | Huh | 16:28:15 |
Paul Meyer (katexochen) | That should already be done here, shouldn't it?
https://github.com/NixOS/nixpkgs/blob/e4b4793ffe04112a121d0a23e2010c576bddefdd/pkgs/build-support/go/module.nix#L209 | 16:34:21 |
Paul Meyer (katexochen) | Ah, -p is not short for -parallel. But
By default, -parallel is set to the value of GOMAXPROCS.
| 16:36:30 |
Paul Meyer (katexochen) | GOMAXPROCS might be the thing we actually want to set. | 16:37:19 |
Paul Meyer (katexochen) | Draft for the go list thing: https://github.com/NixOS/nixpkgs/pull/284568 | 16:39:48 |
| 31 Jan 2024 |
| @federicodschonborn:matrix.org changed their profile picture. | 03:36:40 |
| @federicodschonborn:matrix.org changed their profile picture. | 06:22:16 |
| 6 Feb 2024 |
@qbit:tapenet.org | the other bummer about our build for go stuff is that we can't take advantage of a global build cache | 15:26:06 |
@qbit:tapenet.org | i don't know how it possibly could... just a bummer for speed | 15:27:23 |
Paul Meyer (katexochen) | Well, I think the way Bazel handles this is by not using the higher level go "build" command but the lower level commands to build each package in separate to get a linkable archive, then invoke the linker on those archives when building the final binary. | 15:47:09 |
@qbit:tapenet.org | interesting | 16:23:44 |