github bazelbuild/bazel-gazelle v0.19.0

latest releases: v0.37.0, v0.36.0, v0.35.0...
pre-release4 years ago

General changes

  • The # gazelle:repository directive is now supported in WORKSPACE files. Gazelle will behave as if a repository rule were declared with the given kind and attributes. This may override other declared rules. This is useful for declaring rules that appear in other files and can't be managed with #gazelle:repository_macro. Thanks to @blico.
  • The update-repos command now accepts versions for each argument, for example, update-repos github.com/sirupsen/logrus@v1.4.0. For Go, the version suffixes follow the same format that go get accepts in module mode. Thanks to @weixiao-huang.

Go changes

  • go_repository has better support for visibility across submodules. For example, cloud.google.com/logging may now depend on internal packages in cloud.google.com, when both modules are unmodified go_repository rules. Previously, this required visibility attributes to be patched into the parent module.
  • go_repository now handles WORKSPACE-based configuration more efficiently. A configuration file is derived from the relevant parts of WORKSPACE and any functions declared with # gazelle:repository_macro. go_repository rules are re-evaluated when the configuration file changes, not when WORKSPACE changes. Previously, non-Go-related changes to WORKSPACE would cause go_repository to be re-evaluated. Thanks to @blico.
  • go_repository now accepts a build_directives attribute, a list of directives to write into the root build file before running Gazelle. Thanks to @linzhp.
  • The # gazelle:go_visibility directive may be used to add labels to visibility attributes of Go rules. Thanks to @linzhp.
  • Generated .go files are no longer included in go_library srcs if they are consumed by another rule through the src or srcs attributes. Thanks to @linzhp.

Proto changes

  • Updated dependency resolution tables for know protos.

Don't miss a new bazel-gazelle release

NewReleases is sending notifications on new releases.