github bazelbuild/rules_go 0.12.0

latest releases: v0.47.0, v0.46.0, v0.45.1...
pre-release5 years ago

New features

  • Go 1.10.2 and 1.9.6 are now supported.
  • Preliminary support for Objective C code in cgo srcs and cdeps.
    objc = True must be set in go_library to use this. It will only
    work on macOS, since it requires an Apple toolchain.
  • go_binary and go_test once again support importpath attributes. These
    targets are not importable, but go_path and other rules can use these to
    place source files in appropriate directories.
  • Build ids are no longer written into compiled standard library packages. This
    improve reproducibility.

Notes

  • Some important bug fixes have landed in Gazelle around proto dependency
    resolution. rules_go declares a @bazel_gazelle repository with these fixes,
    but this will be removed in the future. You should declare @bazel_gazelle
    explicitly in your WORKSPACE (see
    Running Gazelle with Bazel
    for setup instructions).
  • Several deprecated features are removed in this release.
    • The library attribute is removed in favor of embed.
    • The linkstamp attribute is removed in favor of x_defs.
    • The go_sdk and go_repositories rules are removed in favor of
      go_rules_dependencies, go_register_toolchains and related functions.
    • cgo_library and cgo_genrule are removed in favor of go_library.
    • The legacy proto rules in proto/go_proto_library.bzl are removed in favor
      of the new proto rules in proto/def.bzl.
  • Several more features are deprecated and scheduled for removal in the next
    release. See Deprecation schedule for more information.
    • Go 1.8 will no longer be supported.
    • go_prefix will be removed in favor of importpath attributes.
    • The legacy go_repository and new_go_repository will be removed in favor
      of the
      equivalent rule
      in the Gazelle repository.

Updated dependencies

The following repositories declared in go_rules_dependencies() were updated to
new versions.

  • bazel_gazelle to master as of 2018-05-08.
  • com_github_golang_protobuf to v1.1.0.
  • com_github_mwitkow_go_proto_validators to master as of 2018-05-07.
  • org_golang_x_net to master as of 2018-05-07.
  • org_golang_google_grpc to v1.10.3.
  • org_golang_google_genproto to master as of 2018-05-07.

WORKSPACE code

To use this release, add this code to your WORKSPACE file:

http_archive(
    name = "io_bazel_rules_go",
    url = "https://github.com/bazelbuild/rules_go/releases/download/0.12.0/rules_go-0.12.0.tar.gz",
    sha256 = "c1f52b8789218bb1542ed362c4f7de7052abcf254d865d96fb7ba6d44bc15ee3",
)
load("@io_bazel_rules_go//go:def.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.