amazon-ecs-agent icon indicating copy to clipboard operation
amazon-ecs-agent copied to clipboard

Go mod update to fix the make gogenerate failure

Open Realmonia opened this issue 2 years ago • 0 comments

Summary

The hard coded golang.org/x/sys version in replace section is outdated for latest go version. When run make gogenerate we see a lot of errors like this:

# golang.org/x/sys/unix
/Users/hanhm/go/pkg/mod/golang.org/x/[email protected]/unix/zsyscall_darwin_amd64.go:28:3: //go:linkname must refer to declared function or variable

The issue is a common error reported here - https://github.com/golang/go/issues/51706. The idea I get from that issue is to pull in a newer golang.org/x/sys package.

Remove the line and run go mod download golang.org/x/sys under /agent directory.

After this package is updated, the above error goes away.

Implementation details

Testing

New tests cover the changes: No. N/A.

Description for the changelog

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Realmonia avatar Oct 12 '22 22:10 Realmonia