NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules, #1334 by repository stars
Latest stable
v0.34.0
Last release 4 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 4 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
176 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
To use this release, add this code to your WORKSPACE file:
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()
To use this release, add this code to your WORKSPACE file:
Your coding agent can read these notes before it upgrades. Set up the MCP server →
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()
To use this release, add this code to your WORKSPACE file:
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()
Added support for Go 1.11 and 1.10.14.
Added support for Go 1.11 and 1.10.14.
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.1/rules_go-0.15.1.tar.gz",
sha256 = "5f3b0304cdf0c505ec9e5b3c4fc4a87b5ca21b13d8ecc780c97df3d1809b9ce6",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Several internal changes and fixes have been made to the way we handle paths passed to the compiler and linker. These changes shouldn't affect most pr
go_rules_dependencies(). If you use Gazelle, you should load it from github.com/bazelbuild/bazel-gazelle instead.go_rules_dependencies.
bazel_gazelle (github.com/bazelbuild/bazel-gazelle)com_github_bazelbuild_buildtools (github.com/bazelbuild/buildtools)com_github_pelletier_go_toml (github.com/pelletier/go-toml)org_golang_x_sys (golang.org/x/sys) has been added to go_rules_dependencies, since it's now a dependency of org_golang_google_grpc (google.golang.org/grpc).org_golang_google_genproto (google.golang.org/genproto) updated to master as of 2018-08-13.go_googleapis (github.com/googleapis/googleapis) updated to master as of 2018-08-08.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.0/rules_go-0.15.0.tar.gz",
sha256 = "56d946edecb9879aed8dff411eb7a901f687e242da4fa95c81ca08938dd23bb4",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
https://github.com/bazelbuild/rules_go/releases/new#
Go 1.11.4 and 1.10.7 are now supported.
Go 1.11.4 and 1.10.7 are now supported.
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.8/rules_go-0.14.8.tar.gz",
sha256 = "3608fbdcdabf14511aa4ecff95905f327f44a9d6e9cad42a3f5945fdb22f42b6",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Go 1.11.3 and 1.10.6 are now supported.
Go 1.11.3 and 1.10.6 are now supported.
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.7/rules_go-0.14.7.tar.gz",
sha256 = "1a5b8d49a052127af0d444c8e9711a120dd50e373a8da88714fdda46e11f7a90",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Several Bazel compatibility fixes and small bug fixes.
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.6/rules_go-0.14.6.tar.gz",
sha256 = "7f24cc5d46f9082d22c8724c12bfdd9aadf159802d91645a49dc657668d551f5",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Go 1.11.2 and 1.10.5 are now supported.
Go 1.11.2 and 1.10.5 are now supported.
js_wasm toolchain is now supported (thanks @tiziano88)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.5/rules_go-0.14.5.tar.gz",
sha256 = "c13dfde5f4399282c2f8ee1925b8a9971722f8e902f2a744ed61c1401db244e1",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
To use this release, add this code to your WORKSPACE file:
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()
NOTE: The minimum Bazel version for this release is now 0.17.2 because cc_common is not available in older versions.
cc_common for collecting C/C++ paths and optionsNOTE: The minimum Bazel version for this release is now 0.17.2 because cc_common is not available in older versions.
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()
To use this release, add this code to your WORKSPACE file:
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()
Added support for Go 1.11 and 1.10.14.
Added support for Go 1.11 and 1.10.14.
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.1/rules_go-0.14.1.tar.gz",
sha256 = "ee0e3b346388c447f13009d789c8bf2d7bae4643ac70bd7997ded0ad09b2fff7",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
The standard library no longer needs to be compiled in the default target mode. We now use the precompiled archives in the SDK. This should speed up c
pure, race, msan, etc.).go_sdk rule and is available to rules via the GoSDK provider.GoStdLib provider. Note that the standard library may or may not be in the same directory as the SDK.go_download_sdk, go_host_sdk, go_local_sdk, and go_wrap_sdk. This will allow multiple SDKs to be declared in the future, which may be necessary when multiple remote execution platforms are supported. go_register_toolchains will still declare an SDK if one is not already declared.go_wrap_sdk is a new repository rule which allows you to configure an SDK downloaded or located with a different repository rule (for example, one that uses your OS package manager).com_google_protobuf (github.com/google/protobuf) updated to v3.6.1.com_github_gogo_protobuf (github.com/gogo/protobuf) updated to v1.1.1.org_golang_x_net (golang.org/x/net) updated to master.org_golang_x_tools (golang.org/x/tools) updated to master.org_golang_google_grpc (google.golang.org/grpc) updated to v1.14.0.org_golang_google_genproto (google.golang.org/genproto) updated to master.go_googleapis (github.com/googleapis/googleapis) updated to master.com_github_kevinburke_go_bindata (github.com/kevinburke/go-bindata) updated to v3.11.0.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.0/rules_go-0.14.0.tar.gz",
sha256 = "5756a4ad75b3703eb68249d50e23f5d64eaf1593e886b9aa931aa6e938c4e301",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
To use this release, add this code to your WORKSPACE file:
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()
Added support for Go 1.11 and 1.10.14.
Added support for Go 1.11 and 1.10.14.
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.1/rules_go-0.13.1.tar.gz",
sha256 = "96e50aca9efb652db6271ba9cacf21f8f1fb29b2eab57ebaacdc071a022d1ad2",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
A new repository, @go_googleapis, is declared in go_rules_dependencies(). This downloads github.com/googleapis/googleapis and includes proto_library a
@go_googleapis, is declared in go_rules_dependencies(). This downloads github.com/googleapis/googleapis and includes proto_library and go_proto_library rules for everything inside.
go_proto_library rules for the Well Known Types are still found in @io_bazel_rules_go//proto/wkt.go_library rules using pre-generated .pb.go files may be found in @com_github_golang_protobuf and @org_golang_google_genproto. These should be used if you want to avoid a build-time dependency on protoc.go_binary can now build plugins with linkmode = "plugin" (thanks @teh-cmc)go_test now accepts goos and goarch attributes (thanks @kerinin).go_path can now bundle compiled .a files in pkg directories for its transitive dependencies (thanks @steeve!).c-archive mode is position independent (thanks @siddharthab).race and msan tags are enabled in those modes.importmap may now be inherited from embedded libraries.restricted_to and compatible_with are now propagated in cgo rules (thanks @iley)go_prefix. importpath is now required on libraries. gazelle fix can help you migrate.go_repository in rules_go. Use the one in @bazel_gazelle//:deps.bzl instead. gazelle fix can help you migrate.com_google_protobuf (github.com/google/protobuf) updated to v3.6.0.1.org_golang_google_grpc (google.golang.org/grpc) updated to v1.13.0.org_golang_google_genproto (google.golang.org/genproto) updated to master.org_golang_x_net (golang.org/x/net) updated to master.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.0/rules_go-0.13.0.tar.gz",
sha256 = "ba79c532ac400cefd1859cbc8a9829346aa69e3b99482cd5a54432092cbc3933",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Added support for Go 1.10.3 and 1.9.7.
Added support for Go 1.10.3 and 1.9.7.
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.1/rules_go-0.12.1.tar.gz",
sha256 = "8b68d0630d63d95dacc0016c3bb4b76154fe34fca93efd65d1c366de3fcb4294",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Several deprecated features are removed in this release.
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.@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).library attribute is removed in favor of embed.linkstamp attribute is removed in favor of x_defs.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.proto/go_proto_library.bzl are removed in favor
of the new proto rules in proto/def.bzl.go_prefix will be removed in favor of importpath attributes.go_repository and new_go_repository will be removed in favor
of the
equivalent rule
in the Gazelle repository.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.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()
Added support for Go 1.10.3 and 1.9.7.
Added support for Go 1.10.3 and 1.9.7.
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.2/rules_go-0.11.2.tar.gz",
sha256 = "b6864a4aff6141429b68b542a19dd858640b32f54cf1a157502e1a769c275506",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Added support for Go 1.10.2 and 1.9.6.
Added support for Go 1.10.2 and 1.9.6.
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.1/rules_go-0.11.1.tar.gz",
sha256 = "1868ff68d6079e31b2f09b828b58d62e57ca8e9636edff699247c9108518570b",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
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.@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.GoLink action will print a warning when this condition is detected.
This will be an error in the future.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.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.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()
Added support for Go 1.10.3 and 1.9.7.
Added support for Go 1.10.3 and 1.9.7.
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.10.5/rules_go-0.10.5.tar.gz",
sha256 = "242602c9818a83cbe97d1446b48263dcd48949a74d713c172d1b03da841b168a",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Added support for Go 1.10.2 and 1.9.6.
Added support for Go 1.10.2 and 1.9.6.
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.10.4/rules_go-0.10.4.tar.gz",
sha256 = "6c770aece75ac47fe218ad881775c37cf29db013ab751d0bfef01c0b5a6ee01f",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
To use this release, add this code to your WORKSPACE file:
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.10.3/rules_go-0.10.3.tar.gz",
sha256 = "feba3278c13cde8d67e341a837f69a029f698d7a27ddbb2a202be7a10b22142a",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
rules_go now supports Go 1.10.1 and 1.9.5.
rules_go now supports Go 1.10.1 and 1.9.5.
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.10.2/rules_go-0.10.2.tar.gz",
sha256 = "4b2c61795ac2eefcb28f3eb8e1cb2d8fb3c2eafa0f6712473bc5f93728f38758",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
To use this release, add this code to your WORKSPACE file:
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.10.1/rules_go-0.10.1.tar.gz",
sha256 = "4b14d8dd31c6dbaf3ff871adcd03f28c3274e42abc855cb8fb4d01233c0154dc",
)
load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
go_rules_dependencies()
go_register_toolchains()
Support for Go 1.10, 1.9.3, 1.9.4, 1.8.6, and 1.8.7.
go_library supports a new attribute, importmap. This lets you set the "actual" import path of a library, which is what the compiler and linker will see. This is only needed when linking binaries that include multiple packages with the same import path. importpath is still the name by which libraries are imported by source files in other libraries.go_test may now include sources from both internal tests (compiled in the same archive as the code under test) and external tests (compiled in a separate archive).go_test now recognizes the standard shard_count attribute (see Attributes common to all test rules).wtool. Use gazelle update-repos example.com/repo instead.github.com/bazelbuild/bazel-gazelle instead.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.10.0/rules_go-0.10.0.tar.gz",
sha256 = "53c8222c6eab05dd49c40184c361493705d4234e60c42c4cd13ab4898da4c6be",
)
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.10.0.tar.gz
The library attribute is now deprecated. Please migrate to embed instead. gazelle fix will do this for you automatically.
x_defs attributes in go_library rules. Any binary rules that depend on those libraries (directly or transitively) will apply those definitions at link time. See Defines and Stamping for more information.GoContext and go_context.library attribute is now deprecated. Please migrate to embed instead. gazelle fix will do this for you automatically.GOGO_VARIANTS in proto/BUILD.bazel for available compiler plugins. See gogo/BUILD.bazel for an example.option go_package, and the proto package doesn't need to match the importpath explicitly set in go_proto_library.Reminder: the old Gazelle tree at go/tools/gazelle is deprecated and will be removed soon (#1199). The new location is github.com/bazelbuild/bazel-gazelle. Please update any tooling you have that builds Gazelle at master.
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.9.0/rules_go-0.9.0.tar.gz",
sha256 = "4d8d6244320dd751590f9100cf39fd7a4b75cd901e1f3ffdfd6f048328883695",
)
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.9.0.tar.gz
go_binary now supports goos and goarch attributes. This enables multiple target platforms in the same build.
go_binary now supports goos and goarch attributes. This enables multiple target platforms in the same build.uname -p on Linux.--features=pure and --features=race.# gazelle:prefix example.com/repo can be used to set the prefix within a subtree.# gazelle:ignore.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.1/rules_go-0.8.1.tar.gz",
sha256 = "90bb270d0a92ed5c83558b2797346917c46547f6f7103e648941ecdb6b9d0e72",
)
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.1.tar.gz
go_grpc_library is now a macro around go_proto_library with a gRPC plugin. We plan to deprecate this soon.
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.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:exclude can be used to ignore paths in subdirectories, not just files in the current directory.new_http_archive / new_git_repository, but this would cause unnecessary work when migrating repositories to Bazel. We're exploring other solutions.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
This is a fairly small release with a few bug fixes and small features. This is the last release before we upgrade to Bazel 0.8, which incorporates se
This is a fairly small release with a few bug fixes and small features. This is the last release before we upgrade to Bazel 0.8, which incorporates several features for cross-platform support which we plan to use as soon as possible.
The following changes are included in this release:
"pure" mode and cross-compilation.library attributes to embed. These attributes cover the same concept, but embed accepts a list of targets instead of one.go_source is a new rule which specifies a group of srcs and deps that can be used as a target in embed attributes. Unlike go_library, these rules cannot be built independently.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.7.1/rules_go-0.7.1.tar.gz",
sha256 = "341d5eacef704415386974bc82a1783a8b7ffbff2ab6ba02375e1ca20d9b031c",
)
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.7.1.tar.gz
You can now cross-compile pure Go binaries (without cgo) for any platform that Go supports. For example:
You can now cross-compile pure Go binaries (without cgo) for any platform that Go supports. For example:
bazel build --experimental_platforms=@io_bazel_rules_go//go/toolchain:linux_s390x //:my_binary
Just change the platform target to any GOOS / GOARCH combination supported by the Go SDK.
There are still a few known issues. In particular, the current version of Bazel doesn't allow us to add .exe extensions to binary files on Windows. This will be fixed in Bazel 0.8, so we'll tag another release with that as the minimum supported version as soon as it's available.
You can now build static, race, msan, and tsan binaries using Bazel feature flags. For example:
bazel build --features=static,msan //:my_binary
You can also specify static and pure modes on go_binary rules using new attributes. This is useful if you have packaging rules that depend on binary rules built in specific configurations.
go_binary(
name = "my_binary",
...,
static = "on",
)
The old mechanism of using output groups to select build mode has been removed.
See build modes for more information.
Gazelle can generate build files that work on all platforms that Go supports. In order to avoid repetition, we've divided sources, dependencies, and options into separate OS-specific, arch-specific, and OS-and-arch-specific select expressions. For example:
go_library(
name = "go_default_library",
srcs = [
"foo.go",
] + select({
"@io_bazel_rules_go//go/platform:linux": [
"foo_linux.go",
],
"//conditions:default": [],
}) + select({
"@io_bazel_rules_go//go/platform:amd64": [
"foo_amd64.go",
],
"//conditions:default": [],
}),
importpath = "github.com/example/project",
visibility = ["//visibility:public"],
)
This new functionality is off by default; you can try it out with the -experimental_platforms flag.
At this time, the config_setting rules in @io_bazel_rules_go//go/platform can only match the cpu value, which means we are limited to platforms where Bazel has a C++ toolchain. With Bazel 0.8, config_setting rules will be able to match constraint_values, which gives us much more flexibility. After that release, we'll remove the -experimental_platforms flag and turn on the new functionality.
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.7.0/rules_go-0.7.0.tar.gz",
sha256 = "91fca9cf860a1476abdc185a5f675b641b60d3acf0596679a27b580af60bf19c",
)
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.7.0.tar.gz
This is intended to be used with new_http_archive and new_git_repository once we deprecate go_repository. You can try this out with the -experimental_…
importpath attribute, which allows import paths to be set explicitly. If all rules in a repository use this, go_prefix is not needed.embed attribute, which allows sources, dependencies, and data from multiple libraries to be combined. This is the same concept as the library attribute, but multiple libraries may be embedded instead of just one.GoLibrary, GoBinary, and GoEmbed providers are now documented. These can be used to write rules compatible with the Go rules.go_register_toolchains() must be called in WORKSPACE in order to make Bazel aware of toolchains.--cpu k8.go_proto_library and go_grpc_library are defined in proto/def.bzl. This is a complete rewrite of proto support. The interface is not finalized yet and may change.fix command is used.go_test rules.# gazelle:build_tags foo,bar.new_http_archive and new_git_repository once we deprecate go_repository. You can try this out with the -experimental_flat command line option.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.6.0/rules_go-0.6.0.tar.gz",
sha256 = "ba6feabc94a5d205013e70792accb6cce989169476668fbaf98ea9b342e13b59",
)
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.6.0.tar.gz
This is a bug fix release, needed for #820. We fetched some of our dependencies using http_archive rules with sha256 sums. The tarballs downloaded by
This is a bug fix release, needed for #820. We fetched some of our dependencies using http_archive rules with sha256 sums. The tarballs downloaded by these rules are generated by GitHub on the fly and are not guaranteed to have a stable sha256 hash. We discovered this yesterday when the hashes changed due to a GitHub OS update.
With this release, all dependencies are fetched using either git_repository, http_archive with a known-stable sha256, or http_archive without sha256 from GitHub via HTTPS.
With this release and future releases, we will include a link to a stable archive of this repository and a sha256 sum so that developers may continue to use http_archive.
rules_go-0.5.5.tar.gz - sha256: ca58b0b856dc95473b93f2228ab117913b82a6617fc0deabd107346e3981522a
This release is a bug fix release before upcoming major changes.
This release is a bug fix release before upcoming major changes.
go_library supports cgo when the cgo = True argument is given. cgo_library is no longer needed and is now deprecated.
go_library supports cgo when the cgo = True argument is given. cgo_library is no longer needed and is now deprecated.bazel test --features=race //....go_embed_data (a new rule) lets you embed data files in generated Go code.go_test accepts a rundir attribute that lets you specify where the test should run. Test binaries will no longer attempt to change directories when run outside of Bazel.update and fix commands. update is the normal, default behavior. fix will revise existing build files with deprecated rules like cgo_library. We plan to add more commands with different flags in the future.Fixed usage of declared providers and avoided mixing declared and old-style providers.
This is a quick fix release.
go_binary now produces static binaries through the static output group.cgo_genrule is deprecated. It now just invokes cgo_library with tags = ["manual"]. Please use cgo_library directly when possible.
go_library, go_binary, and go_test must now include a library in deps for each package they import. Previously, transitive deps were allowed. This lets us speed up the build by only passing direct deps to the compiler.cgo_genrule is deprecated. It now just invokes cgo_library with tags = ["manual"]. Please use cgo_library directly when possible.cgo_library. We are planning to consolidate it with go_library some time in the future.deps are now propagated through the library attribute. This means, for example, a go_test rule doesn't need to repeat deps specified in a go_library under test, though doing so is encouraged if the go_test references those dependencies itself.go_test will now always change to the package directory before running test cases. This was previously broken for tests in external repositories.out and outs attributes of other rules in BUILD files.testdata directories if there are no .go files, BUILD files, or BUILD.bazel files in any subdirectory. Previously, Gazelle did not recurse into testdata directories at all.go1.8) are treated as unknown (neither true nor false). Gazelle will include files with these tags, whether or not they are negated. This avoids some confusing situations where Gazelle is compiled with a different version of Go than the one used to build a project.copts and clinkopts attributes are now merged. visibility won't be added if a package rule with a default_visibility attribute is present. Comments are preserved on existing elements. deps are now sorted according to buildifier rules.go_repository replaces new_go_repository for dependencies with and without BUILD or BUILD.bazel files. go_repository will generate these files using G
go_repository replaces new_go_repository for dependencies with
and without BUILD or BUILD.bazel files. go_repository will
generate these files using Gazelle if they are not already present.importpath in
go_library. This allows for Go subtrees that aren't at the top of
a repository. It also allows flat BUILD files.select.x_defs
attribute. x_defs may now contain values wrapped in braces (for
example: {VAR}) which are replaced with values from the workspace
status files.cgo_library now allows sources in multiple directories.cgo_library no longer assumes srcs is a list (it can now include
select calls).go_binary and go_test no longer expose .a files in outputs.# keep comments from existing sources.This release is a cherry-pick of #428 on top of 0.4.3. This adds support for the darwin_x86_64 cpu value, which will become standard in Bazel soon.
This release is a cherry-pick of #428 on top of 0.4.3. This adds support for the darwin_x86_64 cpu value, which will become standard in Bazel soon.
Upgraded to Go 1.8.1 and provided backward compatibility for tests in 1.7.5.
go_library, cgo_library, go_test, and go_binary. You can now add all your sources to your rules, and they will be filtered during compilation.
go_repositories now supports custom Go versions. Versions can be specified with a simple version string (e.g., "1.8.0") or by declaring a separate Bazel repository and providing that through the go_linux or go_darwin attributes.go_repository now supports vcs and importpath attributes. This enables repositories with different URLs and import paths.gc_goopts and gc_linkopts attributes can be used to pass additional options to the compiler and linker.protoc and protoc_gen_go can now be overridden in go_proto_library. Also added an ignore_go_package attribute.data dependency on testdata directories.-mode diff in Gazelle. It now produces a regular textual diff.-mode fix or -mode print.# gazelle:ignore comments that aren't at the top of a file.data files are now propagated transitively across dependencies.This release fixes a break which was caused by github.com/bazelbuild/buildifier being renamed to buildtools. The following changes are cherry-picked:
This release fixes a break which was caused by github.com/bazelbuild/buildifier being renamed to buildtools. The following changes are cherry-picked:
## Features * Upgraded to Go 1.8.0 * Upgraded protobuf to 3.2.0 * #233 - Support for link stamping in go_binary and go_test with the linkstamp attribu
linkstamp attribute.Nothing published for this version
This release fixes a break which was caused by github.com/bazelbuild/buildifier being renamed to buildtools. The following changes are cherry-picked:
This release fixes a break which was caused by github.com/bazelbuild/buildifier being renamed to buildtools. The following changes are cherry-picked:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Update Go toolchain from 1.7.0 to 1.7.1 -- #93
go_repository and new_go_repository -- #84/bin/bash: Argument list too long(#42) -- fixed by #83cc_library rule which requires linkopts -- #103Experimental implementation of BUILD file generator, #57, #58, #59, #60
TestMain, #68BUILD file generator, #57, #58, #59, #60Fix compatibility to Bazel 0.3.0 #43
linkopts and deps attributes in cgo_library were renamed to clinkopts and cdeps accordingly.
linkopts and deps attributes in cgo_library were renamed to clinkopts and cdeps accordingly.go_library, cgo_library, go_binary and go_testx_defs attribute to go_binarygit_repository or other workspace rulesNothing published for this version
Nothing published for this version
One column per quarter.