pquerna / ffjson

faster JSON serialization for Go
Apache License 2.0
2.97k stars 234 forks source link

golang 1.16: fs.FileMode undefined (type *v1.FFLexer has no field or method FileMode) #262

Open cevich opened 3 years ago

cevich commented 3 years ago

On a Fedora 34 VM with golang 1.16, the ffjson generated code (archive_ffjson.go) fails to compile:

GO111MODULE=on go build -mod=vendor -compiler gc -tags "  "  ./cmd/containers-storage
# github.com/containers/storage/pkg/archive
pkg/archive/archive_ffjson.go:13:2: imported and not used: "io/fs"
pkg/archive/archive_ffjson.go:1652:17: fs.FileMode undefined (type *v1.FFLexer has no field or method FileMode)
make: *** [Makefile:54: containers-storage] Error 2

I do not have this problem on my Ubuntu VM using golang 1.15 on the same code.

I tried with the "latest" ffjson commit aa0246cd15f7