Repository navigation
0.17.0
Pre-release
Pre-release
Changes
- Repository rules and macros have moved to
@io_bazel_rules_go//go:deps.bzlfromdef.bzl. This will allow Go rules to load symbols from external repositories. In particular, it will let us build a compatibility layer for supporting Bazel versions across incompatible API changes.- This change won't be backported to the 0.16 branch, so it's likely that Bazel 0.23 won't work with 0.16 unless Bazel compatibility flags are enabled.
go_proto_libraryhas several new features.- Code may be generated from multiple
proto_librarytargets, via the newprotosattribute. Thanks to @vam-google. proto_librarytargets with nosrcs, onlydepswill work.proto_librarytargets with adjusted import prefixes will work.
- Code may be generated from multiple
go_proto_compilerwill no longer pass the-import_pathoption by default. This should make generated package names consistent withprotocwhenoption go_packageis not set. Thanks to @blico.- nogo now supports fact serialization. This allows analyzers like
printfto store information for use in dependent packages. - nogo no longer invokes a separate vet binary when
vet = True. Instead, setting this attribute adds the safe set of vet analyzers todeps. - Improved runfiles support for windows, via
github.com/bazelbuild/rules_go/go/tools/bazel. Thanks to @jchv.
Updated dependencies
The following dependencies have been updated. See Overriding dependencies for instructions on how to override these with other versions.
com_google_protobufhas been updated tov3.6.1.3.com_github_gogo_protobufhas been updated tov1.2.0.org_golang_google_grpchas been updated tov1.17.0.go_googleapishas been updated tomasteras of 2019-01-15.org_golang_x_toolshas been updated tomasteras of 2019-01-15.org_golang_x_nethas been updated tomasteras of 2019-01-15.org_golang_x_syshas been updated tomasteras of 2019-01-15.
Deprecations
- The minimum supported version of Bazel is now 0.18.0.
- Go 1.9 support will be removed in the next major release.
- The
go_vet_testrule will be removed in the next major release. Please use nogo instead, which integrates vet functionality into the build.
WORKSPACE code
To use this release, add the code below to your WORKSPACE file.
NOTE: All workspace definitions have moved to @io_bazel_rules_go//go:deps.bzl from def.bzl.
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "io_bazel_rules_go",
urls = ["https://github.com/bazelbuild/rules_go/releases/download/0.17.0/rules_go-0.17.0.tar.gz"],
sha256 = "492c3ac68ed9dcf527a07e6a1b2dcbf199c6bf8b35517951467ac32e421c06c1",
)
load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()