atlassian / bazel-tools

Reusable bits for Bazel
Apache License 2.0
113 stars 36 forks source link

Update dependency bazel_gazelle to v0.21.1 #92

Closed renovate[bot] closed 4 years ago

renovate[bot] commented 4 years ago

This PR contains the following updates:

Package Type Update Change
bazel_gazelle http_archive minor 0.14.0 -> v0.21.1
bazel_gazelle http_archive minor v0.20.0 -> v0.21.1

Release Notes

bazelbuild/bazel-gazelle ### [`v0.21.1`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.21.1) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.21.0...v0.21.1) #### Bug fixes - Fixed visibility for Go libraries in `internal` directories. Previously, internal visibility was applied to packages in subdirectories of `internal`, directories, not `internal` directories themselves. Thanks to [@​robfig](https://togithub.com/robfig). - `go_repository` no longer runs `cat`, and `genrules` are replaced with native rules to reduce dependence on msys2 on Windows. Thanks to [@​tomlu](https://togithub.com/tomlu). - Cases in `select` expressions are no longer emitted for platforms that aren't supported by the current version of rules_go. ### [`v0.21.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.21.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.20.0...v0.21.0) - `# gazelle:exclude` directives now accept patterns with `*` and `**` wildcards. (thanks [@​kalbasit](https://togithub.com/kalbasit)) - The `-lang` flag may now be used to select which language extensions should be run. By default, all extensions Gazelle was built with will run. (thanks [@​robfig](https://togithub.com/robfig)) - Attribute matching now works on string slice attributes, not just strings. This is now used to match `proto_library` rules with one or more sources in common with the generated rule, even if the rule has been renamed. (thanks [@​linzhp](https://togithub.com/linzhp)) - Many bugs have been fixed. Thanks to everyone who helped out! ### [`v0.20.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.20.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.19.1...v0.20.0) #### General changes - When `update-repos` is invoked with `-to_macro`, Gazelle will add a call to the macro and a `# gazelle:repository_macro` directive to WORKSPACE if neither is present. #### Go changes - Gazelle will avoid generating duplicate `go_repository` rules when two module paths differ only in case. Thanks to [@​linzhp](https://togithub.com/linzhp). - When deriving a repository name from an import path, all non-word characters will be replaced with underscores, not just dots and slashes. Consecutive non-word characters will be collapsed to a single underscore. Thanks to [@​carnott-snap](https://togithub.com/carnott-snap). - Imported repository rules are now sorted. #### Proto changes - Gazelle will add `load` statements for `proto_library` to comply with `--incompatible_load_proto_rules_from_bzl`. Thanks to [@​Yannic](https://togithub.com/Yannic). - Fixed a bug recognizing services in .proto files. Thanks to [@​asv](https://togithub.com/asv). ### [`v0.19.1`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.19.1) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.19.0...v0.19.1) #### Changes - Rule names are now included in `go_repository` stderr output. - Environment variables `SSL_CERT_FILE` and `SSL_CERT_DIR` are passed through to tools used by `go_repository`. - The list of standard packages is correctly updated for Go 1.13. ### [`v0.19.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.19.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.18.2...v0.19.0) #### 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](https://togithub.com/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](https://togithub.com/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](https://togithub.com/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](https://togithub.com/linzhp). - The `# gazelle:go_visibility` directive may be used to add labels to visibility attributes of Go rules. Thanks to [@​linzhp](https://togithub.com/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](https://togithub.com/linzhp). #### Proto changes - Updated dependency resolution tables for know protos. ### [`v0.18.2`](https://togithub.com/bazelbuild/bazel-gazelle/releases/0.18.2) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.18.1...v0.18.2) #### Changes - Fixed an error that occurred when linking `gazelle_binary` rules in Go 1.13. - Several other small bug fixes. ### [`v0.18.1`](https://togithub.com/bazelbuild/bazel-gazelle/releases/0.18.1) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.18.0...v0.18.1) This release is a quick fix to address an issue with `go_repository` on Windows. ### [`v0.18.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/0.18.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.17.0...v0.18.0) #### Compatibility - `rules_go` 0.19.0 or later is now required. Older versions are not supported but may still work, depending on what features are needed. #### General changes - `gazelle update-repos` now supports the flag `-to_macro=file.bzl%macro`. Instead of writing new repository rules to WORKSPACE, rules will be written to a function in a separate .bzl file. This helps keep related rules together. Thanks to [@​blico](https://togithub.com/blico)! - The directive `# gazelle:repository_macro file.bzl%macro` may be used in WORKSPACE to declare a macro generated with the above flag. `gazelle update-repos` will automatically update rules declared in the named macros instead of adding them to WORKSPACE. The directive may be repeated for multiple macros. `gazelle fix` and `gazelle update` will also read workspaces declared in these macros to find known repository roots and names. Thanks again to [@​blico](https://togithub.com/blico)! - The directive `# gazelle:exclude .` may now be written to skip updating the current directory and subdirectories. Previously, `exclude` only applied to files and subdirectories. #### Go changes - [`go_repository`](/workspace.rst#go-repository) can now download modules. To download a module, set the `version` and `sum` attributes instead of `urls` (for HTTP) or `commit` or `tag` (for VCS downloads). `go_repository` will download and verify the specified module with `go mod download`. The environment variables `GOPROXY`, `GOPRIVATE`, `GONOPROXY`, `GOSUMDB`, and `GONOSUMDB` are observed, so be sure to set these for private modules when using go1.13 or later. - `gazelle update-repos ` will add or update `go_repository` rules in module mode. - `gazelle update-repos -from_file=go.mod` will also add or update rules in module mode. - Refactored infrastructure behind `go_repository`. There are now separate tools and cache workspaces. Modules are downloaded into the cache. When Gazelle is updated, it should not be necessary to re-download modules unless the implementation of the cache changes. The environment variable `GO_REPOSITORY_USE_HOST_CACHE` may be set to `1` to use `$GOPATH/pkg/mod` as a module cache instead of the cache workspace. - `go_repository` now provides a `replace` attribute in module mode, analogous to `replace` in a go.mod file. The `version` and `sum` attributes are used on the replacement, but build files will be generated with the `importpath` of the original module. `gazelle update-repos -from-file=go.mod` will add `replace` attributes automatically (thanks to [@​bigkraig](https://togithub.com/bigkraig)!). - `gazelle update-repos` now supports the flag `-prune`, which may be used with `-from_file`. When enabled, Gazelle will remove `go_repository` rules that no longer have equivalent repos in go.mod or Gopkg.lock. Thanks to [@​blico](https://togithub.com/blico)! - When run by `go_repository`, Gazelle now supports [minimal module compatibility](https://togithub.com/golang/go/wiki/Modules#how-are-v2-modules-treated-in-a-build-if-modules-support-is-not-enabled-how-does-minimal-module-compatibility-work-in-197-1103-and-111). For v2+ modules, Gazelle will generate `importpath_aliases` attributes so `go_libraries` may be imported without the semantic import version suffix by non-modularized packages. #### Proto changes - Updated table of known proto import paths for consistency with rules_go 0.19.0. ### [`v0.17.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/0.17.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.16.0...v0.17.0) #### Language agnostic changes - The `# gazelle:map_kind` directive can now be used to generate rules of alternative kinds. For example, instead of generating `go_binary` rules, you could generate a call to a macro that takes the same arguments (for example, `go_image`, `go_deployable`). Thanks to [@​robfig](https://togithub.com/robfig)! - Gazelle exits with status 1 when run with `-mode=diff` when there are differences. Thanks to [@​mjduijn](https://togithub.com/mjduijn) and [@​achew22](https://togithub.com/achew22)! - Hidden directories are included when walking the directory tree. Thanks to [@​linzhp](https://togithub.com/linzhp). #### Go changes - `go_repository` now works with Go 1.12. - The `update-repos` command now lets you set attributes such as build file names and proto modes on the command line. Thanks to [@​blico](https://togithub.com/blico)! - Alternative compilers can now be set on `go_proto_library` rules with the `-go_proto_compiler` and `-go_grpc_compiler` flags. Thanks to [@​bartle-stripe](https://togithub.com/bartle-stripe)! - Go repositories may now be imported from Godep. Thanks to [@​GauntletWizard](https://togithub.com/GauntletWizard)! - Imports that can't be resolved using the index when the index is enabled are now resolved as external, even if they're under the current prefix. This is necessary to handle cases where one repository path is a prefix of another. Thanks to [@​linzhp](https://togithub.com/linzhp)! #### Proto changes - The new `proto_library` attributes `import_prefix` and `strip_import_prefix` may be set with the `# gazelle:proto_import_prefix` and `# gazelle:proto_strip_import_prefix` directives or the `-proto_import_prefix` command line argument. Thanks to [@​blico](https://togithub.com/blico)! ### [`v0.16.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/0.16.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.15.0...v0.16.0) #### Changes - [`gazelle_binary`](https://togithub.com/bazelbuild/bazel-gazelle/blob/master/extend.rst#gazelle_binary) is a new rule that allows developers to support new languages. To support a new language, you may: - Create a `go_library` that defines a function named `NewLanguage` that returns a value assignable to [`language.Language`](https://godoc.org/github.com/bazelbuild/bazel-gazelle/language#Language). - Create a `gazelle_binary` target that depends on your `go_library` and other language extensions through the `languages` attribute. - Reference your `gazelle_binary` target through the `gazelle` attribute of the [`gazelle`](https://togithub.com/bazelbuild/bazel-gazelle/blob/master/README.rst#bazel-rule) rule. - See [Extending Gazelle](https://togithub.com/bazelbuild/bazel-gazelle/blob/master/extend.rst) for more information. - Most Go packages in this repository are now public. You can now use [`rule`](https://godoc.org/github.com/bazelbuild/bazel-gazelle/rule) and other libraries to write your own tools that manipulate build files. - Gazelle's `git_repository` and `http_archive` rules are deprecated. You should migrate to Bazel's [`git_repository`](https://togithub.com/bazelbuild/bazel/blob/master/tools/build_defs/repo/git.bzl) and [`http_archive`](https://togithub.com/bazelbuild/bazel/blob/master/tools/build_defs/repo/http.bzl) instead. - Gazelle will visit directories whose names start with `_`. Previously these were considered hidden, but `go build` allows directories with these names to be imported (even if they don't match wildcards). In the next release, directories whose names start with `.` will also be visited. ### [`v0.15.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/0.15.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.14.0...v0.15.0) #### Changes - Gazelle can now import dependencies from go.mod files into WORKSPACE with `gazelle update-repos -from_file=go.mod`. This includes transitive dependencies not explicitly mentioned in go.mod. - cmd/autogazelle - an experimental new tool for running Gazelle _as part of_ each Bazel command. See the [README](https://togithub.com/bazelbuild/bazel-gazelle/blob/master/cmd/autogazelle/README.rst) for details. - New directives: - `# gazelle:follow symlink` - follow a specific symlink to a directory. Gazelle normally ignores symbolic links to directories within a repository to avoid visiting a directory on more than one path. When using this, take care to `# gazelle:exclude` the directory from its actual parent to prevent this from happening. - `# gazelle:resolve source-lang import-lang import-string label` - specifies an explicit mapping from an import string to a label for dependency resolution. - New command-line options: - `-r=true` - controls whether Gazelle updates build files recursively in directories mentioned on the command line. True by default. - `-index=true` - controls whether Gazelle indexes library rules in the repository and uses the index to resolve imports to Bazel labels. True by default. - The `go_repository` rule now accepts patches and commands in the same format as `git_repository` and `http_archive` from `@bazel_tools`. Patches are applied _after_ Gazelle is run (if it is run). - The `fix` and `update` commands can write patch files with `-mode=patch`. - The `gazelle` rule can now append to the command line argument list (instead of replacing it) if the arguments are prefixed with `-args`. For example, `bazel run //:gazelle -- -args -index=false -r=false internal/label`. - The `gazelle` rule now works on Windows.

Renovate configuration

:date: Schedule: At any time (no schedule defined).

:vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

:recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

:no_bell: Ignore: Close this PR and you won't be reminded about these updates again.



This PR has been generated by WhiteSource Renovate. View repository job log here.

atlassian-cla-bot[bot] commented 4 years ago

Thank you for your submission! Like many open source projects, we ask that you sign our CLA (Contributor License Agreement) before we can accept your contribution. If your email is listed below, please ensure that you sign the CLA with the same email address.
The following users still need to sign our CLA:
❌renovate-bot

Already signed the CLA? To re-check, try refreshing the page.