Closed marcov closed 5 years ago
Can you clarify what prompted you to propose this change? I'd probably rather return errors than break compilation all together.
Can you clarify what prompted you to propose this change? I'd probably rather return errors than break compilation all together.
@mdlayher It's the fact that a program using this package can build just fine with an old version of Go, but then it would not work as expected. So I thought it's better to break compilation altogether.
I've applied https://github.com/mdlayher/vsock/commit/7b7533a7ca4eba7dd23dab2de70e25ca6eecf7e2 to solve this problem, as it provides a more informative error output and better documents the expectations of this package:
✔ ~/src/github.com/mdlayher/vsock [master|⚑ 1]
11:32 $ go1.10.8 build
# github.com/mdlayher/vsock
./goversion_unsupported.go:8:2: undefined: UpgradeGoCompilerToUseThisPackage
Require a compile time check of the Go compiler version, to avoid situations where a binary using this package is generated but not working properly.