Hacker News new | ask | show | jobs
by epage 679 days ago
As someone who was advocating for a similar warning in Rust (finally added to clippy in 1.78), I'm glad to see this improvement in `go vet`

> The go vet subcommand now includes the stdversion analyzer, which flags references to symbols that are too new for the version of Go in effect in the referring file. (The effective version is determined by the go directive in the file’s enclosing go.mod file, and by any //go:build constraints in the file.) > > For example, it will report a diagnostic for a reference to the reflect.TypeFor function (introduced in go1.22) from a file in a module whose go.mod file specifies go 1.21.

1 comments

Don't most Rust crates solve this by running MSRV builds/tests?

Or is the goal to catch it eg. in precommit hook?

Clippy is both faster in the CI and can be integrated into an IDE feedback