Nomad 0.10.0 FTBFS on codecgen invocation (by go generate):
~~~~
codecgen error: error running 'go run codecgen-main-102.generated.go': exit status 2, console: # github.com/hashicorp/nomad/vendor/github.com/ugorji/go/codec
../../vendor/github.com/ugorji/go/codec/binc.go:810:14: undefined: fastpathTV
../../vendor/github.com/ugorji/go/codec/cbor.go:539:14: undefined: fastpathTV
../../vendor/github.com/ugorji/go/codec/decode.go:2383:11: undefined: fastpathAV
../../vendor/github.com/ugorji/go/codec/decode.go:2387:11: undefined: fastpathAV
../../vendor/github.com/ugorji/go/codec/decode.go:2686:7: undefined: fastpathDecodeSetZeroTypeSwitch
../../vendor/github.com/ugorji/go/codec/decode.go:2762:14: undefined: fastpathDecodeTypeSwitch
../../vendor/github.com/ugorji/go/codec/encode.go:1635:14: undefined: fastpathEncodeTypeSwitch
../../vendor/github.com/ugorji/go/codec/gen.go:816:13: undefined: fastpathAV
../../vendor/github.com/ugorji/go/codec/gen.go:830:6: undefined: fastpathAV
../../vendor/github.com/ugorji/go/codec/gen.go:1108:37: undefined: genEncChanTmpl
../../vendor/github.com/ugorji/go/codec/gen.go:1108:37: too many errors
../../vendor/github.com/hashicorp/go-msgpack/codec/binc.go:810:14: undefined: fastpathTV
../../vendor/github.com/hashicorp/go-msgpack/codec/cbor.go:539:14: undefined: fastpathTV
../../vendor/github.com/hashicorp/go-msgpack/codec/decode.go:2383:11: undefined: fastpathAV
../../vendor/github.com/hashicorp/go-msgpack/codec/decode.go:2387:11: undefined: fastpathAV
../../vendor/github.com/hashicorp/go-msgpack/codec/decode.go:2686:7: undefined: fastpathDecodeSetZeroTypeSwitch
../../vendor/github.com/hashicorp/go-msgpack/codec/decode.go:2762:14: undefined: fastpathDecodeTypeSwitch
../../vendor/github.com/hashicorp/go-msgpack/codec/encode.go:1635:14: undefined: fastpathEncodeTypeSwitch
../../vendor/github.com/hashicorp/go-msgpack/codec/gen.go:816:13: undefined: fastpathAV
../../vendor/github.com/hashicorp/go-msgpack/codec/gen.go:830:6: undefined: fastpathAV
../../vendor/github.com/hashicorp/go-msgpack/codec/gen.go:1108:37: undefined: genEncChanTmpl
../../vendor/github.com/hashicorp/go-msgpack/codec/gen.go:1108:37: too many errors
src/github.com/hashicorp/nomad/client/structs/structs.go:3: running "codecgen": exit status 1
~~~~
Release 0.9.6 had no such problem.
Also it looks like ugorji/go/codec is not vendored by release and vendored github.com/hashicorp/go-msgpack is something very different from latest released version 0.5.5.
Please vendor carefully.
Hi @onlyjob ! Thanks for reaching out. I believe you need to upgrade codecgen binary by running scripts/install-codegen.sh [1]. codecgen needs to be the same version used by nomad.
In the 0.10.0 cycle, we have upgraded ugorji/go dependencies and go-msgpack (along with it) so it's the latest that maintained backward compatibility. You can see some context in [2][3] on why/how the dependency version is chosen.
[1] https://github.com/hashicorp/nomad/blob/v0.10.0/scripts/install-codecgen.sh
[2] https://github.com/hashicorp/nomad/pull/5676
[3] https://github.com/hashicorp/nomad/commit/a8e6c2845fb2aed236437f5a30c6356aa876b288
I'm using _latest_ released codecgen 1.1.7.
I know what you did and it was done _sloppy_. I hope it will be corrected in the next release and I also wish that such things never happen again.
Downstream we can not download on build... Using random commits in between releases of 3rd party libraries causes a lot of grief to package maintainers and make compilation very difficult.
Even when Nomad itself compiled with a particular version of _codecgen_ the compilation of Nomad dependencies such as nomad-driver-podman remains broken with FTBFS in nomad/structs/structs.generated.go.
This is a very serious interoperability issue that should be fix in minor release hopefully soon.