Skip to content

0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@jayconrod jayconrod released this 13 Jun 16:53
· 1723 commits to master since this release

Features

  • 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.
  • Import paths may be specified explicitly using the importpath in
    go_library. This allows for Go subtrees that aren't at the top of
    a repository. It also allows flat BUILD files.
  • Gazelle generates BUILD files for multiple platforms. Sources with
    build constraints (tags or filename suffixes) and dependencies
    imported from them are now compiled conditionally using select.
  • Link stamping in multiple packages is now supported via the 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.
  • Rules are substantially cleaned up and organized. Assemble, compile,
    and link actions are rewritten in Go, avoiding incompatibilities and
    quoting problems with Bash.
  • Preliminary support for toolchains.

Bug fixes

  • 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.
  • All rules now allow target names with slashes.
  • If multiple packages are present after applying build constraints,
    Gazelle will generate BUILD files for the package matching the
    directory name. If there is no match, Gazelle will report an error.
  • Gazelle is much faster when running in external mode on repositories
    with lots of external dependencies.
  • Gazelle no longer removes # keep comments from existing sources.
  • Many more...