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 thatgo 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 incloud.google.com
, when both modules are unmodifiedgo_repository
rules. Previously, this requiredvisibility
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 causego_repository
to be re-evaluated. Thanks to @blico.go_repository
now accepts abuild_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 thesrc
orsrcs
attributes. Thanks to @linzhp.
Proto changes
- Updated dependency resolution tables for know protos.