!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

233 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.51 Servers

Load older messages


SenderMessageTime
28 Jan 2024
@k900:0upti.meK900But it still has to build them, link them and run the resulting binary just for it to print "oops no tests lol"15:46:24
@k900:0upti.meK900Or run like one test in like 0.1 seconds15:46:29
@qbit:tapenet.org@qbit:tapenet.orgwell, a number of the tests can be done in parallel: https://github.com/search?q=repo%3Agrafana%2Fgrafana+parallel+path%3Atest&type=code15:59:02
@qbit:tapenet.org@qbit:tapenet.orgso it would probably speed things up by adding it15:59:08
@k900:0upti.meK900You know what16:00:07
@k900:0upti.meK900I have cycles16:00:09
@k900:0upti.meK900I can try it16:00:10
@qbit:tapenet.org@qbit:tapenet.org also maybe try setting subPackages to just grafana stuff 16:00:38
@k900:0upti.meK900It is all grafana stuff16:00:50
@k900:0upti.meK900Is the problem16:00:51
@qbit:tapenet.org@qbit:tapenet.orgthat will exclude tests in the vendor dir (which is dumb to test anyway)16:00:52
@qbit:tapenet.org@qbit:tapenet.orgit has no deps? 16:01:21
@qbit:tapenet.org@qbit:tapenet.orgi highly doubt that16:01:26
@k900:0upti.meK900I don't think it runs tests for anything in vendor at least16:01:45
@qbit:tapenet.org@qbit:tapenet.orgit does in my experience16:02:44
@qbit:tapenet.org@qbit:tapenet.orgwell - builds.. so I assume tests as well16:03:08
@k900:0upti.meK900Hmm16:03:25
@k900:0upti.meK900I'm rerunning it with -parallel now16:03:37
@k900:0upti.meK900We'll see where that goes16:03:40
@katexochen:matrix.orgPaul 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@qbit:tapenet.org go test $(go list ./... | grep -v /vendor/) would probably be a good thing to have 16:09:08
@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

Show newer messages


Back to Room ListRoom Version: 9