Changes
//go:embed
directives are supported in Go 1.16. Patterns are matched against both static and generated files, including directory artifacts. Embeddable files must be listed in the newembedsrcs
attribute. Gazelle v0.23.0 will generate these attributes automatically.go_binary
now providesCcInfo
in thec-archive
andc-shared
link modes. This should letcc_library
and other rules reference these targets throughdeps
directly. Thanks @steeve.TEST_TMPDIR
is no longer set toTMPDIR
in tests. Thanks @mikedanese.- Several small improvements in error and diagnostic output.
Compatibility
- Bazel 3.5.0 is now required. The previous minimum version was 3.4.0.
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.
platforms
is updated to0.0.4
.rules_cc
is updated tomaster
as of 2021-03-05.org_golang_x_tools
is updated tomaster
as of 2021-03-05.org_golang_google_genproto
is updated tomaster
as of 2021-03-05.go_googleapis
is updated tomaster
as of 2021-03-05.
WORKSPACE
code
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
sha256 = "7c10271940c6bce577d51a075ae77728964db285dac0a46614a7934dc34303e6",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.26.0/rules_go-v0.26.0.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.26.0/rules_go-v0.26.0.tar.gz",
],
)
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
go_rules_dependencies()
go_register_toolchains(version = "1.16")