github bazelbuild/rules_go 0.8.0

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

Go rules

  • Minimum Bazel version is now 0.8.0.
  • The config_setting rules in //go/platform are now based on constraint_values instead of cpu. This means that you can write select expressions that match any platform that the Go SDK targets.
  • Go executable files now end with ".exe" on Windows.
  • Output paths have changed for nearly all rules to include the target platform and configuration. This preserves the cache when targets are built in different configurations.
  • Fixed cgo tag filtering for "pure" builds.
  • Support for linux/s390x as a host platform (thanks to @kadamvandita).

Proto rules

  • The proto compiler is now selected using an explicit compiler attribute in go_proto_library. We no longer use toolchains for this. This lets you use different plugins for different proto libraries.
  • go_grpc_library is now a macro around go_proto_library with a gRPC plugin. We plan to deprecate this soon.

Gazelle changes

  • Gazelle builds an index of all libraries in a repository and uses the index to resolve dependencies. This enables multiple vendor directories, Go subtrees not at the repository root, and more.
  • # gazelle:exclude can be used to ignore paths in subdirectories, not just files in the current directory.
  • Removed the experimental flat mode. We planned to use flat files with new_http_archive / new_git_repository, but this would cause unnecessary work when migrating repositories to Bazel. We're exploring other solutions.

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.8.0/rules_go-0.8.0.tar.gz",
    sha256 = "8eaf2e62811169d9cf511209153effcb132826cea708b2f75d4dd5f9e57ea2aa",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()

Direct download: rules_go-0.8.0.tar.gz

Don't miss a new rules_go release

NewReleases is sending notifications on new releases.