github bazel-contrib/rules_go 0.17.0

latest releases: v0.50.1, v0.50.0, v0.49.0...
pre-release5 years ago

Changes

  • Repository rules and macros have moved to @io_bazel_rules_go//go:deps.bzl from def.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_library has several new features.
    • Code may be generated from multiple proto_library targets, via the new protos attribute. Thanks to @vam-google.
    • proto_library targets with no srcs, only deps will work.
    • proto_library targets with adjusted import prefixes will work.
  • go_proto_compiler will no longer pass the -import_path option by default. This should make generated package names consistent with protoc when option go_package is not set. Thanks to @blico.
  • nogo now supports fact serialization. This allows analyzers like printf to 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 to deps.
  • 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_protobuf has been updated to v3.6.1.3.
  • com_github_gogo_protobuf has been updated to v1.2.0.
  • org_golang_google_grpc has been updated to v1.17.0.
  • go_googleapis has been updated to master as of 2019-01-15.
  • org_golang_x_tools has been updated to master as of 2019-01-15.
  • org_golang_x_net has been updated to master as of 2019-01-15.
  • org_golang_x_sys has been updated to master as 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_test rule 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()

Don't miss a new rules_go release

NewReleases is sending notifications on new releases.