!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

236 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.50 Servers

Load older messages


SenderMessageTime
28 Jan 2024
@katexochen:matrix.orgPaul 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@qbit:tapenet.orgnice16:09:55
@katexochen:matrix.orgPaul 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@qbit:tapenet.org so find should be go list there probably 16:10:10
@qbit:tapenet.org@qbit:tapenet.orgsweet16:10:25
@katexochen:matrix.orgPaul Meyer (katexochen)but it will cause a lot of built failures16:10:46
@katexochen:matrix.orgPaul Meyer (katexochen)as the current way excludes tests in most cases16:11:08
@katexochen:matrix.orgPaul Meyer (katexochen)you can check the following for a preview ;) https://github.com/katexochen/nixpkgs/commits/buildGoModule/tests/16:11:49
@qbit:tapenet.org@qbit:tapenet.orgnice16:12:07
@katexochen:matrix.orgPaul Meyer (katexochen)While I still have some work to do, I think I will just open a draft PR now16:12:14
@k900:0upti.meK900go: flag needs an argument: -parallel (from $GOFLAGS)16:28:13
@k900:0upti.meK900Huh16:28:15
@katexochen:matrix.orgPaul Meyer (katexochen)That should already be done here, shouldn't it? https://github.com/NixOS/nixpkgs/blob/e4b4793ffe04112a121d0a23e2010c576bddefdd/pkgs/build-support/go/module.nix#L20916:34:21
@katexochen:matrix.orgPaul Meyer (katexochen)

Ah, -p is not short for -parallel. But

By default, -parallel is set to the value of GOMAXPROCS.

16:36:30
@katexochen:matrix.orgPaul Meyer (katexochen)GOMAXPROCS might be the thing we actually want to set.16:37:19
@katexochen:matrix.orgPaul Meyer (katexochen) Draft for the go list thing: https://github.com/NixOS/nixpkgs/pull/284568 16:39:48
31 Jan 2024
@federicodschonborn:matrix.orgFederico Damián Schonborn changed their profile picture.03:36:40
@federicodschonborn:matrix.orgFederico Damián Schonborn changed their profile picture.06:22:16
6 Feb 2024
@qbit:tapenet.org@qbit:tapenet.orgthe 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@qbit:tapenet.orgi don't know how it possibly could... just a bummer for speed15:27:23
@katexochen:matrix.orgPaul 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@qbit:tapenet.orginteresting16:23:44
@katexochen:matrix.orgPaul Meyer (katexochen)https://github.com/bazelbuild/rules_go/blob/07317c7ce2ae6e6cda269c0c3ec7eac171363936/go/tools/builders/compilepkg.go#L538-L56016:34:07
@msanft:matrix.orgMoritz Sanft set a profile picture.17:17:54
@sandro:supersandro.deSandro 🐧Bazel also thought it would be a good idea to vendor all kinds of libraries and copy their build systems...17:40:41
@sandro:supersandro.deSandro 🐧and fetch archives against GitHub recommendations in the docs and completely breaking when they updated git-archive17:41:17
@katexochen:matrix.orgPaul Meyer (katexochen) Sandro 🐧: not sure how that is related to their mechanism of building Go code. 18:12:52
@katexochen:matrix.orgPaul Meyer (katexochen)I think if you really want to break up Go builds into multiple derivations (which is nothing I propose here), the Bazel approach sounds more reasonable and correct to me than somehow injecting build cache.18:16:15
8 Feb 2024
@symys:dailyaslbot.twilightparadox.comsymys joined the room.18:50:55
10 Feb 2024
@anthr76:mozilla.organthr76 joined the room.14:32:02

Show newer messages


Back to Room ListRoom Version: 9