Skip to content

Releases: bazel-contrib/rules_go

0.15.6

24 Oct 18:31
Compare
Choose a tag to compare
0.15.6 Pre-release
Pre-release

Bug fixes

  • #1776 Exclude srcs and their runfiles from Go rule runfiles
  • #1785 De-duplicate dependencies with the same import path

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

0.14.4

24 Oct 18:31
Compare
Choose a tag to compare
0.14.4 Pre-release
Pre-release

Bug fixes

  • #1776 Exclude srcs and their runfiles from Go rule runfiles
  • #1785 De-duplicate dependencies with the same import path

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

0.16.0

16 Oct 21:20
6fa12b1
Compare
Choose a tag to compare
0.16.0 Pre-release
Pre-release

Changes

  • nogo is a new framework for running static analysis as part of Bazel builds. Developers can write their own analyzers which run alongside the compiler on each Go package. Analyzers may stop the build when they detect problems.
    • nogo can run go vet as a separate subprocess. We intend to migrate vet to the analysis framework in the future.
    • nogo is experimental, and its interface may change over the next few releases. Please try it out and give us feedback though.
    • Thanks to Samuel Tan (@stjj89) for implementing nogo for Bazel, and thanks to Alan Donovan (@alandonovan) for creating the analysis framework nogo is based on, golang.org/x/tools/go/analysis.
  • rules_go now uses the new cc_common module to collect C / C++ flags. This ensures compatibility with future versions of Bazel, since the CROSSTOOL-related fields in CcToolchainInfo are being removed soon.
  • Because of the above change the minimum supported version of Bazel is now 0.17.2.
  • go_download_sdk now supports goos and goarch attributes. These may be useful for remote execution when your execution platform is different from your host platform.
    • The other SDK rules will automatically detect the platform of the SDK instead of detecting the host platform.
  • Cgo now declares internal targets in each supported mode that influences the selection of source files and dependencies with build constraints.
    • This means binaries that set goos, goarch, race, or msan attributes and incorporate cgo code are more likely to be correct. Please continue to use --platforms and other command-line flags for configuration instead though, if possible.
    • Unfortunately, analysis is about 15% slower because of the extra targets. We hope to improve this by integrating cgo compilation into the go_library rule itself, but this will take time.
  • Arm64 is now supported automatically (thanks to @ArielleA).

Updated dependencies

  • org_golang_x_tools (golang.org/x/tools) has been updated to master as of 2018-09-18.
  • org_golang_x_net (golang.org/x/net) has been updated to master as of 2018-09-28.
  • org_golang_x_sys (golang.org/x/sys) has been updated to master as of 2018-09-28.
  • com_github_golang_protobuf (github.com/golang/protobuf) has been updated to v1.2.0.
  • org_golang_google_grpc (google.golang.org/grpc) has been updated to v1.15.0.
  • org_golang_google_genproto (google.golang.org/genproto with pre-generated files) has been updated to master as of 2018-09-28.
  • go_googleapis (github.com/googleapis/googleapis a.k.a. google.golang.org/genproto with build-time-generated files) has been updated to master as of 2018-09-28.
  • See Overriding dependencies if you need a different version of any of these.

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

0.15.5

16 Oct 21:22
Compare
Choose a tag to compare
0.15.5 Pre-release
Pre-release

Bug fixes

  • #1768 - Migrate to cc_common for collecting C/C++ paths and options
  • #1767 - lcov_merger: workaround for Bazel 0.18.0 coverage
  • #1764 - Use a more unique name for the cover variable
  • #1757 - Use absolute paths to make GoPack work on Windows
  • #1754 - Define the toolchain_type target used by go rules.

NOTE: The minimum Bazel version for this release is now 0.17.2 because cc_common is not available in older versions.

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

0.14.3

16 Oct 21:23
Compare
Choose a tag to compare
0.14.3 Pre-release
Pre-release

Bug fixes

  • #1768 - Migrate to cc_common for collecting C/C++ paths and options
  • #1767 - lcov_merger: workaround for Bazel 0.18.0 coverage
  • #1764 - Use a more unique name for the cover variable
  • #1757 - Use absolute paths to make GoPack work on Windows
  • #1754 - Define the toolchain_type target used by go rules.

NOTE: The minimum Bazel version for this release is now 0.17.2 because cc_common is not available in older versions.

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.14.3/rules_go-0.14.3.tar.gz",
    sha256 = "9c1cc022f4d5840fd261a782c05c65865399405f0c05b090706d6b5426b7a82f",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()

0.15.4

03 Oct 20:27
Compare
Choose a tag to compare
0.15.4 Pre-release
Pre-release

New Go versions

  • Go 1.11.1 is now supported.

Bug fixes

  • #1721 - Fix non-root package testing on Windows (thanks @filipesilva!)
  • #1724 - Add more explicit dependencies for bazel_test
  • #1727 - link: take absolute path of main file
  • #1731 - Do not depend on stdlib for CGo codegen anymore (thanks @steeve!)
  • #1732 - Add fake buildid when linking (thanks @steeve!)
  • #1747 - Use find_cpp_toolchain instead of ctx.fragments.cpp

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.15.4/rules_go-0.15.4.tar.gz",
    sha256 = "7519e9e1c716ae3c05bd2d984a42c3b02e690c5df728dc0a84b23f90c355c5a1",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()

0.14.2

03 Oct 20:26
Compare
Choose a tag to compare
0.14.2 Pre-release
Pre-release

New Go versions

  • Go 1.11.1 is now supported.

Bug fixes

  • #1721 - Fix non-root package testing on Windows (thanks @filipesilva!)
  • #1724 - Add more explicit dependencies for bazel_test
  • #1727 - link: take absolute path of main file
  • #1731 - Do not depend on stdlib for CGo codegen anymore (thanks @steeve!)
  • #1732 - Add fake buildid when linking (thanks @steeve!)
  • #1747 - Use find_cpp_toolchain instead of ctx.fragments.cpp

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

0.13.2

03 Oct 20:23
Compare
Choose a tag to compare
0.13.2 Pre-release
Pre-release

New Go versions

  • Go 1.11.1 is now supported.

Bug fixes

  • #1721 - Fix non-root package testing on Windows (thanks @filipesilva!)
  • #1724 - Add more explicit dependencies for bazel_test
  • #1727 - link: take absolute path of main file
  • #1731 - Do not depend on stdlib for CGo codegen anymore (thanks @steeve!)
  • #1732 - Add fake buildid when linking (thanks @steeve!)

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.13.2/rules_go-0.13.2.tar.gz",
    sha256 = "6cbeb2e5fd7664073d96e91eef7d201b987817a2459702ac5f9a337285817597",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()

0.15.3

05 Sep 22:04
Compare
Choose a tag to compare
0.15.3 Pre-release
Pre-release

Bug fixes

  • #1686 - Filter out -lstdc++ for targets with no C++ code
  • #1684 - third_party/org_golang_google_grpc: fix android build

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.15.3/rules_go-0.15.3.tar.gz",
    sha256 = "97cf62bdef33519412167fd1e4b0810a318a7c234f5f8dc4f53e2da86241c492",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()

0.15.2

05 Sep 20:47
Compare
Choose a tag to compare
0.15.2 Pre-release
Pre-release

Bug fixes

  • #1696 - go/private: only enable -shared/-dynlink on selected platforms
  • #1595 - cgo: declare rules for each supported mode, select in aspect

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.15.2/rules_go-0.15.2.tar.gz",
    sha256 = "70d0204f1e834d14fa9eef1e9b97160917a48957cd1e3a39b5ef9acdbdde6972",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()