Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency bazel_gazelle to v0.28.0 #2

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 8, 2022

Mend Renovate

This PR contains the following updates:

Package Type Update Change
bazel_gazelle http_archive minor 0.17.0 -> v0.28.0

Release Notes

bazelbuild/bazel-gazelle

v0.28.0

Compare Source

What's Changed

New Contributors

Full Changelog: bazel-contrib/bazel-gazelle@v0.27.0...v0.28.0

v0.27.0

Compare Source

What's Changed

New Contributors

Full Changelog: bazel-contrib/bazel-gazelle@v0.26.0...v0.27.0

v0.26.0

Compare Source

What's Changed

New Contributors

Full Changelog: bazel-contrib/bazel-gazelle@v0.25.0...v0.26.0

WORKSPACE code

load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_gazelle",
    sha256 = "501deb3d5695ab658e82f6f6f549ba681ea3ca2a5fb7911154b5aa45596183fa",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.26.0/bazel-gazelle-v0.26.0.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

############################################################

Define your own dependencies here using go_repository.

Else, dependencies declared by rules_go/gazelle will be used.

The first declaration of an external repository "wins".

############################################################

gazelle_dependencies()

v0.25.0: v0.25.0

Compare Source

Go changes

Proto changes

General changes

Full Changelog: bazel-contrib/bazel-gazelle@v0.24.0...v0.25.0

WORKSPACE code

load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_gazelle",
    sha256 = "5982e5463f171da99e3bdaeff8c0f48283a7a5f396ec5282910b9e8a49c0dd7e",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.25.0/bazel-gazelle-v0.25.0.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

############################################################

Define your own dependencies here using go_repository.

Else, dependencies declared by rules_go/gazelle will be used.

The first declaration of an external repository "wins".

############################################################

gazelle_dependencies()

v0.24.0: v0.24.0

Compare Source

This release requires rules_go 0.29 to support the retirement of go_tool_library.

IMPORTANT

This release includes many new dependencies. Please be sure that your own workspace's dependencies are declared PRIOR to gazelle_dependencies(), or else they may be overridden. See the prompt block comment in the boilerplate below.

Changes

  • .netrc files are now supported for authenticated access for go_repository rules (#​1090)
  • There is now a Gazelle extension for authoring BUILD files for the R language, using rules_r.

Fixes

Full Changelog: bazel-contrib/bazel-gazelle@v0.23.0...v0.24.0

WORKSPACE code

load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_gazelle",
    sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")

############################################################

Define your own dependencies here using go_repository.

Else, dependencies declared by rules_go/gazelle will be used.

The first declaration of an external repository "wins".

############################################################

gazelle_dependencies()

v0.23.0: v0.23.0

Compare Source

Changes

  • Go
    • CXXFLAGS and CPPFLAGS #cgo directives are separated into cxxopts and cppopts attributes, respectively. Thanks @​otan.
    • Dependencies on mapped kinds are now supported. Thanks @​robfig.
    • The gazelle rule now supports the update-repos command.
    • The gazelle rule now has a data attribute and expands $(location) within arguments.
    • go_repository's build_naming_convention is now considered when resolving external dependencies. If a repository already has build files, this attribute may be set to indicate which naming convention it follows.
    • embedsrcs attributes are generated for packages that contain //go:embed directives.
  • Protobuf
    • proto_strip_import_prefix may be set in the root build file. Thanks @​linzhp.

WORKSPACE code

load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "bazel_gazelle",
    sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0/bazel-gazelle-v0.23.0.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies")

gazelle_dependencies()

v0.22.3: v0.22.3

Compare Source

Bug fixes

  • -mode=diff treats empty build files correctly. (thanks @​vpanta)
  • Gazelle should walk subdirectories more quickly when indexing is disabled. (thanks @​blico)
  • Fixed dependency resolution with mapped kinds. (thanks @​robfig)
  • Compatibility fixes for Go 1.16.

WORKSPACE code

http_archive(
    name = "bazel_gazelle",
    sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()

v0.22.2

Compare Source

Compatibility

  • Gazelle no longer depends on the deprecated go_rule function from rules_go, which will be removed in 0.25. This should improve compatibility with future versions.

WORKSPACE code

http_archive(
    name = "bazel_gazelle",
    sha256 = "b85f48fa105c4403326e9525ad2b2cc437babaa6e15a3fc0b1dbab0ab064bc7c",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.2/bazel-gazelle-v0.22.2.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.2/bazel-gazelle-v0.22.2.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()

v0.22.1

Compare Source

Bug fixes

Go
  • The version of rules_go may now be inferred from WORKSPACE if the repository io_bazel_rules_go hasn't been fetched yet.
  • The gazelle_binary rule should now work correctly with previous versions of rules_go.
  • In the import and import_alias naming conventions, dots will be replaced with underscores in generated test names. This avoids generating targets that have the same names as source files.
  • update-repos -from_file=go.mod should no longer fail mysteriously when go.mod has a replace directive that uses a relative path. Local replacements are still not supported though. (thanks @​dragonsinth)

WORKSPACE code

http_archive(
    name = "bazel_gazelle",
    sha256 = "72d339ff874a382f819aaea80669be049069f502d6c726a07759fdca99653c48",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.1/bazel-gazelle-v0.22.1.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.1/bazel-gazelle-v0.22.1.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()

v0.22.0

Compare Source

Changes

  • The Go extension can now generate targets with a new naming convention.
    • In new projects, by default, a library will be named foo if its import path ends with foo instead of go_default_library. Similarly, a test will be named foo_test instead of go_default_test.
    • Gazelle will attempt to detect the naming convention used in existing projects, so it shouldn't unexpectedly change the naming convention.
    • To specify the naming convention explicitly, use the # gazelle:go_naming_convention directive or the -go_naming_convention flag. Valid values are import, go_default_library, and import_alias. Gazelle will rename existing targets the next time it runs after a change.
    • go_repository uses the import_alias naming convention by default, so either the old or new names may be used.
    • Thanks to @​tomlu for implementing this.
  • Added # gazelle:go_generate_proto directive, which instructs the Go extension whether to generate go_proto_library rules for proto_library generated by the proto extension (thanks @​linzhp).
  • Improved Windows compatibility (thanks @​tomlu).
  • Language extensions can now provide dependency resolution for other extensions by implementing the resolve.CrossResolver interface. This is now used for resolve proto imports in Go (thanks @​blico).
  • In the update-repos command, the -build_directives flag may be used to set the build_directives attribute on generated repositories (thanks @​Helcaraxan).
  • In the update-repos command, new rules and macros will be inserted higher in WORKSPACE, above go_rules_dependencies and gazelle_dependencies if possible, to make it easier to override indirect dependencies.

Compatibility

  • gazelle_binary no longer supports mode attributes such as goos, race, and gotags. These depended on internal implementation details in rules_go. If you need to build a gazelle_binary for a platform other than the host, use command-line flags such as --platforms and --@​io_bazel_rules_go//go/config:race or use a transition.

WORKSPACE code

http_archive(
    name = "bazel_gazelle",
    sha256 = "d4113967ab451dd4d2d767c3ca5f927fec4b30f3b2c6f8135a2033b9c05a5687",
    urls = [
        "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.0/bazel-gazelle-v0.22.0.tar.gz",
        "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.0/bazel-gazelle-v0.22.0.tar.gz",
    ],
)

load("@​bazel_gazelle//:deps.bzl", "gazelle_dependencies")
gazelle_dependencies()

v0.21.1

Compare Source

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.
  • go_repository no longer runs cat, and genrules are replaced with native
    rules to reduce dependence on msys2 on Windows. Thanks to @​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

Compare Source

  • # gazelle:exclude directives now accept patterns with * and ** wildcards. (thanks @​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)
  • 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)
  • Many bugs have been fixed. Thanks to everyone who helped out!

v0.20.0

Compare Source

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.
  • 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.
  • 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.
  • Fixed a bug recognizing services in .proto files. Thanks to @​asv.

v0.19.1

Compare Source

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

Compare Source

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.

v0.18.2

Compare Source

Changes

  • Fixed an error that occurred when linking gazelle_binary rules in Go 1.13.
  • Several other small bug fixes.

v0.18.1

Compare Source

This release is a quick fix to address an issue with go_repository on Windows.

v0.18.0

Compare Source

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!
  • 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!
  • 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 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 <path> 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!).
  • 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!
  • When run by go_repository, Gazelle now supports minimal module compatibility. 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.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

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

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

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

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

@renovate renovate bot force-pushed the renovate/bazel_gazelle-0.x branch from b383722 to aef4480 Compare November 8, 2022 22:10
@jotadrilo jotadrilo merged commit d9312db into main Nov 8, 2022
@jotadrilo jotadrilo deleted the renovate/bazel_gazelle-0.x branch November 8, 2022 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant