Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nix] update build-go-cache usage #266

Merged
merged 1 commit into from
May 21, 2024
Merged

[nix] update build-go-cache usage #266

merged 1 commit into from
May 21, 2024

Conversation

ryantm
Copy link
Collaborator

@ryantm ryantm commented May 21, 2024

Why

  • build-go-cache stopped working if you pass vendorHash without also passing proxyVendor:
… while calling the 'derivationStrict' builtin
     at <nix/derivation-internal.nix>:9:12:
        8|
        9|   strict = derivationStrict drvAttrs;
         |            ^
       10|
… while evaluating derivation 'upm-0.0.0-dirty'
     whose name attribute is located at /nix/store/xxg0317r42hi568l55dvilyn92kgdrd0-source/pkgs/stdenv/generic/make-derivation.nix:300:7
… while evaluating attribute 'buildInputs' of derivation 'upm-0.0.0-dirty'
     at /nix/store/xxg0317r42hi568l55dvilyn92kgdrd0-source/pkgs/stdenv/generic/make-derivation.nix:347:7:
      346|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
      347|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
         |       ^
      348|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: cannot coerce null to a string: null

What changed

  • Pin build-go-cache to the version we are using in other projects, and the version that broke things
  • Pass proxyVendor = true

Test plan

  • nix build worked

Why
===
* build-go-cache stopped working if you pass vendorHash without also
passing proxyVendor:
```
… while calling the 'derivationStrict' builtin
     at <nix/derivation-internal.nix>:9:12:
        8|
        9|   strict = derivationStrict drvAttrs;
         |            ^
       10|
… while evaluating derivation 'upm-0.0.0-dirty'
     whose name attribute is located at /nix/store/xxg0317r42hi568l55dvilyn92kgdrd0-source/pkgs/stdenv/generic/make-derivation.nix:300:7
… while evaluating attribute 'buildInputs' of derivation 'upm-0.0.0-dirty'
     at /nix/store/xxg0317r42hi568l55dvilyn92kgdrd0-source/pkgs/stdenv/generic/make-derivation.nix:347:7:
      346|       depsHostHost                = lib.elemAt (lib.elemAt dependencies 1) 0;
      347|       buildInputs                 = lib.elemAt (lib.elemAt dependencies 1) 1;
         |       ^
      348|       depsTargetTarget            = lib.elemAt (lib.elemAt dependencies 2) 0;
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: cannot coerce null to a string: null
```

What changed
===
* Pin build-go-cache to the version we are using in other projects,
and the version that broke things
* Pass proxyVendor = true

Test plan
===
* `nix build` worked
@ryantm ryantm requested a review from a team as a code owner May 21, 2024 00:33
@ryantm ryantm requested review from airportyh and removed request for a team May 21, 2024 00:33
@ryantm ryantm merged commit 7e6609e into main May 21, 2024
3 checks passed
@ryantm ryantm deleted the rtm-05-20-proxyvendor branch May 21, 2024 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants