15 May 2024 |
raboof | github.com/aws/aws-sdk-go-v2/aws/protocol/xml indeed isn't in go.sum, even after go mod tidy | 12:36:45 |
katexochen | In reply to @raboof:matrix.org
github.com/aws/aws-sdk-go-v2/aws/protocol/xml indeed isn't in go.sum, even after go mod tidy Well, that's not a module but a package, right? https://github.com/aws/aws-sdk-go-v2/tree/v1.26.1/aws/protocol/xml Seems to belong to the module github.com/aws/aws-sdk-go-v2 | 12:46:41 |
raboof | gotcha - sorry, my go is rusty (no pun intended 😆). that's a good lead, digging further. | 13:05:20 |
raboof | https://github.com/nix-community/gomod2nix/pull/158 🎉 | 14:07:48 |
16 May 2024 |
| Frédéric Christ changed their display name from Frédéric Christ to Frédéric Christ 🌴 17.05.. | 14:30:07 |
| @anjoletto:matrix.org left the room. | 21:04:56 |
17 May 2024 |
hexa | does the go builder have an interface for disabling tests? | 08:21:48 |
hexa | I've usually gone and just yeeted individual test files, which seems rather coarse | 08:22:04 |
katexochen | https://nixos.org/manual/nixpkgs/unstable/#ssec-skip-go-tests | 08:22:47 |
katexochen | Not really, but letting Go skip test cases is slightly cleaner and less error prone than removing test files. | 08:23:48 |
katexochen | Already thought about moving that into an input, but not sure it is worth it. | 08:24:44 |
katexochen | * hexa: https://nixos.org/manual/nixpkgs/unstable/#ssec-skip-go-tests | 08:25:06 |
hexa | ah neat, thanks for pointing that out | 08:25:32 |
hexa | and yeah, if that code is well tested, port it into the builder | 08:36:40 |
hexa | makes people less likely to apply crude hacks | 08:37:06 |
hexa | in python we have pytestFlagsArray and on top of that disabledTests and disabledTestsPath fwiw | 08:37:44 |
hexa | that would map to checkFlags and skippedTests | 08:37:58 |
18 May 2024 |
| easel set a profile picture. | 12:27:42 |
20 May 2024 |
| Kamilla 'ova joined the room. | 23:24:04 |
21 May 2024 |
| @bumperboat:matrix.org changed their display name from bumperboat (UTC+8) to bumperboat (UTC+7). | 04:34:16 |
| Frédéric Christ changed their display name from Frédéric Christ 🌴 17.05. to Frédéric Christ. | 06:41:53 |
22 May 2024 |
| @bullet-bending-koala:matrix.org joined the room. | 03:26:46 |
@bullet-bending-koala:matrix.org | Hey! I'm new to the nix build game and trying to get over an error I'm having when attempting to build a go project. I've already posted on the discord with no response(just impatient), but thought to post here as well:
I just started running into an issue referenced here: https://github.com/nix-community/gomod2nix/issues/98
I'm on go 1.22 and not sure how to resolve this issue during the buildPhase. Here is a snippet of how I'm running my phases:
preBuild = ''
go work sync
go vet server/
go vet infra/
'';
buildPhase = ''
go build -v -o $out/bin/bin_result .
chmod +x $out/bin/bin_result
'';
checkPhase = ''
go test -v server/
go test -v infra/
'';
I've been trying different ways of getting it build such as vendoring prior and generating and having no real success. Here's the error:
Running phase: buildPhase go: inconsistent vendoring in /private/tmp/nix-build-my-project-0.1.0.drv-1/v94xsm9rfafqgqhmf975928jbhfwyz4b-source: github.com/jmoiron/sqlx@v1.4.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt github.com/pulumi/pulumi-azure-native-sdk/resources/v2@v2.42.0: is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt
I've already synced, deleted cache, re-vendored and added the -mod=vendor flags when running commands. This is the first time trying out a build step using nix, so any help would be really appreciated.
There are a few things which I just might not be cognisant of when it comes to behaviour - such as what happens during the preBuild and buildPhase for it error out like that and that even though I'm synced, it still prompts this error
| 03:32:41 |
| NixOS Moderation Botchanged room power levels. | 15:25:59 |
| NixOS Moderation Botchanged room power levels. | 15:28:13 |
| @drupol:matrix.org joined the room. | 16:18:39 |
@drupol:matrix.org | How can I have the binary godotenv available through nativeBuildInputs ? | 16:19:04 |
@drupol:matrix.org | Context: https://github.com/NixOS/nixpkgs/pull/313713 | 16:19:57 |
@drupol:matrix.org | Never mind ;) got it working I think | 16:56:15 |
23 May 2024 |
jrick | what is the buildGoModule way of making a race-enabled build? | 17:08:42 |