github bazelbuild/rules_go 0.11.0

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

New features

  • Go 1.10.1 and 1.9.5 are now supported.
  • go_path has been rewritten. This rule can be used to
    generate a GOPATH-like directory tree from a set of Go rules (e.g.,
    go_binary, go_library). It will contain source and data files for those
    rules and their transitive dependencies, including generated files. The
    directory tree may contain copied files, symbolic links, or may be a zip
    archive. This is not complete yet, but it should be usable for simple tools.
  • go_embed_data now supports an unpack attribute, which allows it to unpack
    zip and tar archives.
  • go_binary supports the c-archive and c-shared link modes.
  • go_binary now supports an out attribute, allowing you to write binaries
    with custom names.
  • go_test now runs examples.
  • Proto library rules for Well Known Types are now defined in the
    @io_bazel_rules_go//proto/wkt package. go_proto_library rules using the
    default, gRPC, and gogo plugins depend on these implicitly. These should be
    used instead of explicit vendored or external versions.
  • go_proto_library now supports the importmap attribute.

Notes

  • The Bazel minimum version is now 0.10.0.
  • We've gotten a number of error reports in builds where multiple packages
    with the same import path are linked into the same binary. This is especially
    common when libraries are in both external repositories and vendor directories.
    • The GoLink action will print a warning when this condition is detected.
      This will be an error in the future.
    • The importmap attribute can be used to disambiguate these cases. Newer
      versions of Gazelle will set importmap automatically for go_library
      and go_proto_library rules in vendor directories. This is similar to what
      the standard Go toolchain does.

Updated dependencies

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

  • bazel_gazelle to master as of 2018-04-02.
  • com_github_mwitkow_go_proto_validators to master as of 2018-04-02.
  • org_golang_x_net to master as of 2018-04-02.
  • org_golang_x_text to master as of 2018-04-02.
  • org_golang_google_genproto to master as of 2018-04-02.

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.11.0/rules_go-0.11.0.tar.gz",
    sha256 = "f70c35a8c779bb92f7521ecb5a1c6604e9c3edd431e50b6376d7497abc8ad3c1",
)
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.