!QCCCSJHEsTIfozrZxz:nixos.org

Nix + Go

109 Members
Go packaging for and with Nixpkgs. | Be excellent to each other.32 Servers

Load older messages


SenderMessageTime
3 Apr 2024
@jrick:zettaport.comjrick
[jrick@elsa:~/nixos/tmp/source]$ go test -c -ldflags=-linkmode=external ./internal/staging/primitives/

[jrick@elsa:~/nixos/tmp/source]$ ./primitives.test 
PASS
18:15:48
@jrick:zettaport.comjrickso ldflags in the attrset is being ignored when building tests, only the regular commands in the build stage18:16:37
@jrick:zettaport.comjricki uh.. not sure how to fix that. i don't think you can pass along ldflags in GOFLAGS can you?18:17:33
@jrick:zettaport.comjrickguess you can18:18:28
@jrick:zettaport.comjrickyeah, there's nothing like https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/go/module.nix#L218 for the checkPhase18:22:21
@jrick:zettaport.comjrickhmm what's a trivial go module to include for the repro writeup :)18:38:27
@jrick:zettaport.comjrickcan't use net or cgo18:38:43
@qbit:tapenet.orgqbit Mmmm 18:43:00
@jrick:zettaport.comjrickhuh, ok false alarm. i saw this because i was writing my own checkPhase18:51:21
4 Apr 2024
@jrick:zettaport.comjrickit looks like some .info files are missing with proxyVendor for transitive module requirements that aren't actually imported at all18:03:28
@jrick:zettaport.comjrickthis breaks go list -m all18:03:36
@diamondburned:matrix.orgDiamond (it/she) changed their profile picture.18:30:18
@jrick:zettaport.comjrickhmm, and i don't think overrideAttrs are passed through to the buildGoModule argument. or at least not all of them are18:52:10
@jrick:zettaport.comjricki'm too new to nix to know if that's a bug or not :)18:52:36
@jrick:zettaport.comjricki can override checkPhase with it, which makes sense because that comes from mkDerivation, but i can't pass in proxyVendor=true for example, which is unique to buildGoModule18:55:55
@qbit:tapenet.orgqbitwonder if https://github.com/NixOS/nixpkgs/pull/284568 helps with it at all? 20:16:35
@qbit:tapenet.orgqbitwhat is it you are doing? can you paste the codes? 20:16:45
@jrick:zettaport.comjrickcan in a sec, that pr looks promising20:17:28
@jrick:zettaport.comjrickthese are the logs i see though, https://gist.githubusercontent.com/jrick/4987872fdb5293bdbab73388566cbb22/raw/16a6c270d39d7bdb90e5220361f8a7d57864cd2a/gistfile1.txt has the errors (i expected i would need to patch out the tests, but it seems this bug is doing that for me :D), and https://gist.githubusercontent.com/jrick/1465c134f98334d6651e4912a8f94ef4/raw/656bc1a204665d2702ab69cd1afc407cae65d69e/gistfile1.txt shows all the files in the proxy'd module cache. note how there are missing .info files but only for modules this project doesn't import packages from20:18:44
@jrick:zettaport.comjrick * these are the logs i see though, https://gist.githubusercontent.com/jrick/4987872fdb5293bdbab73388566cbb22/raw/16a6c270d39d7bdb90e5220361f8a7d57864cd2a/gistfile1.txt has the errors (i expected i would need to patch out the lints, but it seems this bug is doing that for me :D), and https://gist.githubusercontent.com/jrick/1465c134f98334d6651e4912a8f94ef4/raw/656bc1a204665d2702ab69cd1afc407cae65d69e/gistfile1.txt shows all the files in the proxy'd module cache. note how there are missing .info files but only for modules this project doesn't import packages from20:19:08
@jrick:zettaport.comjrickpackage derivation https://gist.githubusercontent.com/jrick/f5212605c04e4ef0f3de1bcd8d15a469/raw/b3ece32ee7bf3e7aba6a7d65738356e9eb9573c4/gistfile1.txt20:21:48
@jrick:zettaport.comjrick run_test.sh calls go list -m all since the lint tool being used doesn't understand ./... 20:23:09
@jrick:zettaport.comjrickso it is picking up transitive modules that don't appear in the import graph20:23:31
@qbit:tapenet.orgqbitheh, it built fine for me20:26:15
@qbit:tapenet.orgqbitthis 23.11? 20:26:20
@jrick:zettaport.comjrickunstable20:26:29
@jrick:zettaport.comjrickit builds fine, but check the log20:26:34
@jrick:zettaport.comjrick if go list -m all worked properly during check phase it should have errored for missing linter tools not being installed 20:27:35
@jrick:zettaport.comjrickbut because this script is not dying on that error, it ends up linting nothing, and passes checks20:27:53
@jrick:zettaport.comjricki'm less sure about that PR now, doesn't seem like it would change what gets placed in the proxied module cache20:48:59

There are no newer messages yet.


Back to Room ListRoom Version: 9