You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: build tags don't respect the go version in go.mod #47259
This mainly applies to dev.typeparams since everything breaks if you use generics and go.mod isn't set to 1.18, however I tested with tip and go1.16 and the same issue happens.
To reproduce:
go.mod
modulexgo1.15
main.go
package main
funcmain() {
println(Version)
}
main_go115.go
//go:build !go1.16// +build !go1.16package main
constVersion="1.15"
main_go116.go
//go:build go1.16// +build go1.16package main
constVersion="1.16"
changed the title [-]cmd/compile: dev.typeparams the compiler ignores go version in go.mod when parses build tags.[/-][+]cmd/compile: dev.typeparams the compiler ignores go version in go.mod and build tags.[/+]on Jul 16, 2021
changed the title [-]cmd/compile: dev.typeparams the compiler ignores go version in go.mod and build tags.[/-][+]cmd/compile: build tags don't respect the go version in g.mod[/+]on Jul 16, 2021
changed the title [-]cmd/compile: build tags don't respect the go version in g.mod[/-][+]cmd/compile: build tags don't respect the go version in go.mod[/+]on Jul 16, 2021
The build tags are chosen by the version of the toolchain used, not the the go directive (if it was it would be redundant)
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
Activity
[-]cmd/compile: dev.typeparams the compiler ignores go version in go.mod when parses build tags.[/-][+]cmd/compile: dev.typeparams the compiler ignores go version in go.mod and build tags.[/+][-]cmd/compile: dev.typeparams the compiler ignores go version in go.mod and build tags.[/-][+]cmd/compile: build tags don't respect the go version in g.mod[/+][-]cmd/compile: build tags don't respect the go version in g.mod[/-][+]cmd/compile: build tags don't respect the go version in go.mod[/+]seankhliao commentedon Jul 16, 2021
The build tags are chosen by the version of the toolchain used, not the the
godirective (if it was it would be redundant)Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions