NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Go modules
Go modules, #1401 by repository stars
Latest stable
v0.14.0
Last release 8 years ago
no release in 18 months
Ships fairly regularly
a new release about every 4 weeks
Nearly every release is documented
notes for 6 of 6 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
6 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
No major feature changes -- this is primarily a maintenance release.
-experimental_read_build_files_dir and -experimental_write_build_files_dir may be used to read and write build files from alternate directories, which may be outside the repository root. If a file is read from a different directory, build files in the source tree are ignored. If a file is written to an alternate directory, build files in the source tree are not modified. These flags may change in the future.Completed a major refactoring of Gazelle. All language-specific logic has moved into extensions that implement the internal/languages.Language interfa
@go_googleapis repository.
-proto=mode flag on the command line or the # gazelle:proto mode directive in build files or with build_file_proto_mode = "mode" in go_repository.
disable_global - Like disable mode, Gazelle won't generate, update, or delete existing proto_library or go_proto_library rules. In addition, special cases for proto dependency resolution (for Well Known Types and Google APIs) are disabled. This is useful if you build libraries using pre-generated .pb.go files and don't want any build-time dependency on protoc.package - Gazelle may generate proto_library and go_proto_library rules for multiple packages in the same directory. .proto files are grouped into packages using either the declared proto package or an option specified by # gazelle:proto_group opt, e.g., go_package.git_repository and http_archive no longer rely on a cp executable to copy files. This improves Windows compatibility (thanks @pmuetschard).race and msan tags are now ignored. Sources files will be included in rules whether these flags are true or false.Your coding agent can read these notes before it upgrades. Set up the MCP server →
gazelle fix no longer removes importpath attributes on go_binary and go_test rules. These attributes are no longer deprecated. The rules are still not…
importmap is now a mergeable attribute. This means Gazelle may now replace
existing importmap attributes if they are not marked with a # keep
comment.gazelle fix no longer removes importpath attributes on go_binary
and go_test rules. These attributes are no longer deprecated. The rules
are still not importable, but the paths are useful for go_path and
other rules.@io_bazel_rules_go//proto/wkt. This partially worked before, but several
packages weren't handled correctly.@bazel_gazelle repository, probably
in the next rules_go major release. If you aren't explicitly declaring
@bazel_gazelle in your WORKSPACE, following the template at
Running Gazelle with Bazel, you may want to migrate soon.gazelle update-repos will now load go_repository from @bazel_gazelle. The old copy in @io_bazel_rules_go is deprecated. gazelle fix will also fix this…
go_test target when both internal and
external test sources are present. This allows external tests to depend on
definitions within internal tests. gazelle fix will squash or rename
existing rules named "go_default_xtest".srcs attributes are now flat: they will no longer contain platform-specific
select expressions. rules_go will filter sources with build constraints
automatically. This allows broader usage of the goos and goarch attributes
in go_binary, but there are still problems with select in deps. See the
cross-compile FAQ
for more information.importmap attributes are added for go_library and go_proto_library rules
in vendor directories. This prevents conflicts when multiple packages with
the same importpath are linked into the same binary.@io_bazel_rules_go//proto/wkt.go_repository now supports a build_extra_args attribute, allowing
additional arguments to be passed to Gazelle during build file generation.gazelle update-repos will now load go_repository from @bazel_gazelle.
The old copy in @io_bazel_rules_go is deprecated. gazelle fix will also
fix this.importmap on go_proto_library. Older versions may
work if you're not using protos.github.com/bazelbuild/buildtools is now vendored within Gazelle, due to breaking API changes upstream.
github.com/bazelbuild/buildtools is now vendored within Gazelle, due to breaking API changes upstream.-repo_root). This fixes a bug where Gazelle incorrectly decided other symlinks pointed outside the repository.Gazelle now removes importpath attributes from go_binary and go_test rules, since these are deprecated.
gazelle update-repos example.com/repo adds a new go_repository rule or updates an existing go_repository rule in WORKSPACE.importpath attributes from go_binary and go_test rules, since these are deprecated.go_binary rules can be renamed and still be updated by Gazelle. Only one go_binary per package though. go_library, go_proto_library, and go_repository rules can be renamed as long as the importpath still matches.cmd/move_labels updates labels in build files after a directory is moved. This is useful for vendoring repositories that already have build files.git_repository and http_archive overlay repository rules. These rules fetch a repository and copy a set of pre-generated build files. All dependencies in @io_bazel_rules_go and @bazel_gazelle now use these rules.One column per quarter.