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

go-task: 2.8.1 -> 3.0.0 #98959

Closed
wants to merge 1 commit into from
Closed

go-task: 2.8.1 -> 3.0.0 #98959

wants to merge 1 commit into from

Conversation

Parasrah
Copy link
Member

Motivation for this change

Update to the next major version of go-task

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Parasrah
Copy link
Member Author

This PR doesn't actually work, I'm the maintainer of this package and have been struggling to update it to the next major version for some time now. I admittedly don't know enough about golang, despite spending some time trying to dig into this and trying to understand it.

If this isn't the right medium to ask for help please let me know. I'd really appreciate someone who knows more about golang helping me understand why this is breaking.

I get the following error when attempting to install this:

installing 'go-task-3.0.0'
this derivation will be built:
  /nix/store/y8fk5nszhkxc7gh7l9h5h7jg74xw3dv0-go-task-3.0.0.drv
building '/nix/store/y8fk5nszhkxc7gh7l9h5h7jg74xw3dv0-go-task-3.0.0.drv'...
unpacking sources
unpacking source archive /nix/store/3knaxp8p7hs59yrgfkvsv6h2ksh7xk1j-source
source root is source
patching sources
configuring
building
Building subPackage ./cmd/task
internal/logger/logger.go:6:2: cannot find package "." in:
        /build/source/vendor/github.com/fatih/color
internal/templater/funcs.go:9:2: cannot find package "." in:
        /build/source/vendor/github.com/go-task/slim-sprig
internal/taskfile/read/taskfile.go:13:2: cannot find package "." in:
        /build/source/vendor/github.com/joho/godotenv
internal/status/glob.go:10:2: cannot find package "." in:
        /build/source/vendor/github.com/mattn/go-zglob
watch.go:14:2: cannot find package "." in:
        /build/source/vendor/github.com/radovskyb/watcher
cmd/task/task.go:17:2: cannot find package "." in:
        /build/source/vendor/github.com/spf13/pflag
task.go:22:2: cannot find package "." in:
        /build/source/vendor/golang.org/x/sync/errgroup
internal/taskfile/var.go:7:2: cannot find package "." in:
        /build/source/vendor/gopkg.in/yaml.v3
internal/execext/exec.go:11:2: cannot find package "." in:
        /build/source/vendor/mvdan.cc/sh/v3/expand
internal/execext/exec.go:12:2: cannot find package "." in:
        /build/source/vendor/mvdan.cc/sh/v3/interp
internal/execext/exec.go:13:2: cannot find package "." in:
        /build/source/vendor/mvdan.cc/sh/v3/shell
internal/execext/exec.go:14:2: cannot find package "." in:
        /build/source/vendor/mvdan.cc/sh/v3/syntax
error: --- Error -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-env
error: --- Error --- nix-daemon
builder for '/nix/store/y8fk5nszhkxc7gh7l9h5h7jg74xw3dv0-go-task-3.0.0.drv' failed with exit code 1; last 10 log lines:
  internal/taskfile/var.go:7:2: cannot find package "." in:
    /build/source/vendor/gopkg.in/yaml.v3
  internal/execext/exec.go:11:2: cannot find package "." in:
     /build/source/vendor/mvdan.cc/sh/v3/expand
  internal/execext/exec.go:12:2: cannot find package "." in:
        /build/source/vendor/mvdan.cc/sh/v3/interp
  internal/execext/exec.go:13:2: cannot find package "." in:
        /build/source/vendor/mvdan.cc/sh/v3/shell
  internal/execext/exec.go:14:2: cannot find package "." in:
         /build/source/vendor/mvdan.cc/sh/v3/syntax

Thanks in advance

@doronbehar
Copy link
Contributor

You should ask for help on discourse.

@Parasrah Parasrah closed this Dec 23, 2020
@wizeman
Copy link
Member

wizeman commented Mar 9, 2021

This PR didn't work because you didn't specify a valid hash in vendorSha256.

I'm guessing this used to work before because go-task used to bundle its dependencies in the source tarball.
But since recent go-task releases don't bundle the dependencies anymore, Nix has to download the dependencies separately and verify that the hash is correct.

See #115578 for a PR updating to the latest release.

@Parasrah
Copy link
Member Author

Parasrah commented Mar 9, 2021

Thank you @wizeman for explaining, I appreciate it

Edit: How did you get the valid vendorSha256?

@doronbehar
Copy link
Contributor

Edit: How did you get the valid vendorSha256?

Probably inserted there an incorrect hash of zeros, ran a nix-build and got the correct hash from the build error.

@wizeman
Copy link
Member

wizeman commented Mar 10, 2021

Probably inserted there an incorrect hash of zeros, ran a nix-build and got the correct hash from the build error.

Precisely.

@Parasrah Parasrah deleted the go-task branch April 17, 2021 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants