-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Description
What version of Go are you using (go version)?
$ go version go version go1.17 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/tnozicka/.cache/go-build" GOENV="/home/tnozicka/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/tnozicka/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/tnozicka/go" GOPRIVATE="" GOPROXY="direct" GOROOT="/home/tnozicka/lib/go1.17" GOSUMDB="off" GOTMPDIR="" GOTOOLDIR="/home/tnozicka/lib/go1.17/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.17" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/tnozicka/go/src/github.com/scylladb/scylla-operator/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build318278898=/tmp/go-build -gno-record-gcc-switches"
What did you do?
Updated go from 1.16.7 to 1.17 and the following code stopped compiling
var (
//go:embed "basic.scyllacluster.yaml"
BasicScyllaCluster ScyllaCluster
)
type ScyllaCluster []byte
func (sc ScyllaCluster) ReadOrFail() *scyllav1.ScyllaCluster {
obj, _, err := scheme.Codecs.UniversalDeserializer().Decode(sc, nil, nil)
o.Expect(err).NotTo(o.HaveOccurred())
return obj.(*scyllav1.ScyllaCluster)
}
What did you expect to see?
No compile error as it was with 1.16.7 (and previous versions).
What did you see instead?
go:embed cannot apply to var of type ScyllaCluster
zimnx, TheDevMinerTV, beoran and Splizard
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.Feedback is required from experts, contributors, and/or the community before a change can be made.