v0.32.0
This release brings many exciting changes
New features
gomock
rule is officially supported in rules_go (doc), replacing the original jmhodges/bazel_gomock repository. Thanks to @jmhodges for the original implementation.- rules_go now generates coverage reports in LCOV format by default (#3117), to be compatible with Bazel's
--combined_report=lcov
. To generate reports in the oldgo tool cover
format, please use--//go/config:cover_format=go_cover
. Thanks to @fmeum @abhinav - supporting windows/arm64 (#3072). Thanks to @nsait-linaro
- nogo config can now takes analyzer_flags (#3082), thanks to @navneethjayendran
Bug fixes
- Consider volatile and stable status files separately (#3079) Thanks to @siddharthab
- Reducing duplicate information passed by go_pkg_info_aspect (#3111)
- Fix include paths for CGo deps in external repositories (#3115) thanks to @fmeum
- Revert change to use resolved shared lib links (#2907), thanks to @glukasiknuro
- Fix lost x_defs on test execution (#3135), thanks to @bozaro
- Let go_binary's executable bit depend on linkmode (#3143) thanks to @fmeum
Deprecations
go_embed_data
and bindata
will be deprecated in rules_go 0.35.0. Users are encourage to migrate to go:embed
and embedsrcs
.
Other changes
- Use output dir for empty packages to be hermetic (#3098), thanks to @joeljeske
- Prevent downgrading platforms (#3076), thanks to @cpsauer
- Doc improvements (#3100), thanks to @sluongng
- Remove legacy proto code for Bazel < 0.21 (#3099), thanks to @cpsauer
- Remove unused coverage code (#3118), thanks to @fmeum
- Moving tests for go_embed_data and gomock to tests/extras (#3122)
- Add command line copts/cxxopts to Cgo compile flags (#3126), thanks to @dchen496
- Reset Go settings for protoc dependencies (#3005), thanks to @fmeum
- Trim transitioned Go settings on non-Go dependencies (#3108), thanks to @fmeum
Updated dependencies
As always, you can use higher versions of rules_go's dependencies by declaring
them in WORKSPACE before calling go_rules_dependencies. Lower versions may
work but are not supported.
org_golang_google_protobuf
updated to v1.28.0org_golang_x_sys
,org_golang_x_xerrors
,org_golang_google_genproto
andgo_googleapis
updated tomaster
, as of 2022-05-09
WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
sha256 = "ab21448cef298740765f33a7f5acee0607203e4ea321219f2a4c85a6e0fb0a27",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.32.0/rules_go-v0.32.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.32.0/rules_go-v0.32.0.zip",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains(version = "1.18.2")