Skip to content

Releases: bazel-contrib/bazel-gazelle

0.11.0

17 Apr 14:45
8bc6a86
Compare
Choose a tag to compare
0.11.0 Pre-release
Pre-release

New features

  • Gazelle now generates a single 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.
  • Proto imports of Well Known Types are now resolved to standard locations in
    @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.

Notes

  • The minimum compatible version of rules_go is now 0.11.0. This is primarily
    due to the need for importmap on go_proto_library. Older versions may
    work if you're not using protos.

0.10.1

23 Mar 23:04
Compare
Choose a tag to compare
0.10.1 Pre-release
Pre-release
  • github.com/bazelbuild/buildtools is now vendored within Gazelle, due to breaking API changes upstream.
  • Gazelle now dereferences symlinks in the repository root directory (-repo_root). This fixes a bug where Gazelle incorrectly decided other symlinks pointed outside the repository.

0.10.0

24 Feb 00:20
683208d
Compare
Choose a tag to compare
0.10.0 Pre-release
Pre-release
  • The command gazelle update-repos example.com/repo adds a new go_repository rule or updates an existing go_repository rule in WORKSPACE.
  • Gazelle now removes 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.
  • Rules are now deleted in directories that have no buildable Go or proto source files.
  • New tool: cmd/move_labels updates labels in build files after a directory is moved. This is useful for vendoring repositories that already have build files.
  • Added experimental 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.
  • Gazelle now follows symlinks that point outside of the workspace (thanks @yasushi-saito!)

0.9

25 Jan 17:43
2f18638
Compare
Choose a tag to compare
0.9 Pre-release
Pre-release
  • Added the update-repos command.
    • This can be used to import dependencies from dep's Gopkg.lock file as go_repository rules in WORKSPACE.
    • This should support more vendoring formats in the future.
    • We also plan to be able to add repositories automatically using unresolved import paths.
  • Added the help command.
  • go_grpc_library rules are now migrated to go_proto_library rules with a compilers attribute.
  • The prefix attribute is now optional in the gazelle rule.
  • Strings are never duplicated between generic, OS-specific, architecture-specific, and OS-and-architecture-specific sections in srcs, deps, and other attributes. This fixes an error that Bazel reports when the same dependency appeared to be OS-specific and architecture-specific.
  • Merged rules may now be deleted if they have no attributes that make them buildable (e.g., srcs, deps, embed). Previously, rules couldn't be deleted if they had attributes other than name and visibility. This caused rules to be preserved that only had attributes like proto and importpath.

0.8

14 Dec 17:52
31ce76e
Compare
Choose a tag to compare
0.8 Pre-release
Pre-release

This is the first release of Gazelle in its new repository. This matches the Gazelle from rules_go at version 0.8.1, hence the similar version number.