-
Notifications
You must be signed in to change notification settings - Fork 380
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
Add bzl_library targets to Gazelle #760
Conversation
Please open an issue explaining how this is intended to work. I can't really evaluate this without knowing more. It's likely this needs testing. I don't know whether these |
It occurs to me that you already have skylib as a dependency in Gazelle, updated PR to reflect what it probably should have looked like in the first place. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple comments and questions.
I've opened #763 and bazel-contrib/rules_go#2437 to track migrating documentation for those projects to Stardoc.
Sorry I don't have bandwidth to work on this now though.
BUILD.bazel
Outdated
@@ -68,3 +69,15 @@ filegroup( | |||
], | |||
visibility = ["//visibility:public"], | |||
) | |||
|
|||
bzl_library( | |||
name = "bzl", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a naming convention for these rules? This doesn't seem descriptive, but I guess if it's just a set of all .bzl files in each package, then it's good to use the same name. Just want to make sure that's what other rulesets are doing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update this to match the convention from @bazel_skylib//gazelle/bzl
.
"//internal:bzl", | ||
"@bazel_skylib//lib:shell", | ||
], | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay that this target isn't visible outside the workspace?
@@ -68,3 +69,15 @@ filegroup( | |||
], | |||
visibility = ["//visibility:public"], | |||
) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with merging this PR, but I don't understand this well enough to commit to maintaining it yet. So this might change or be removed in the future.
If that's okay with you, please add a TODO:
# TODO(#762): investigate generating stardoc documentation from these files.
# bzl_library targets in this repository may change in the future, so use with caution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gentle ping.
BUILD.bazel
Outdated
@@ -68,3 +69,15 @@ filegroup( | |||
], | |||
visibility = ["//visibility:public"], | |||
) | |||
|
|||
bzl_library( | |||
name = "bzl", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update this to match the convention from @bazel_skylib//gazelle/bzl
.
@jayconrod, sorry this has become a huge yak shave. I don't know why I thought coordinating 6 CLs between 5 different repos would be easy. Clearly I'm an idiot 🤦 . Here are my kafka-esque yaks:
Which will then culminate in me trying to get My kingdom for a nicely formatted build encyclopedia... WRT this PR, I've regenerated so we can inspect the generated output. I didn't realize that there were more places in Gazelle that depend on It's possible that we could advance on this by just cutting deps off, but in my experimentation with |
Would this mean that Gazelle and rules_go wouldn't work with older versions of Bazel, since we'd reference
Probably better to just copy definitions from
That seems like kind of unfortunate behavior. I don't know much about Skydoc, but is there any way around the all-or-nothing requirement? |
I believe this would restrict your ability to generate the docs, but would not restrict your ability to use Gazelle.
I've expanded this CL to do just that.
Unfortunately Stardoc basically starts up the same engine that does I've got the repos in a much better state now. This CL now passes when I |
Last bit of progress before bed. I've gotten quite a bit farther on getting stardoc to crash. bazelbuild/stardoc#76 if you would like to see the latest error. Bedtime now. |
This is to allow people who transitively depend on this repo to use stardoc to generate documentation for their Bazel targets. For the origin of this commit, please see bazel-contrib/bazel-gazelle#760 (comment) and the linked PRs in that thread.
There is, in fact light at the end of this tunnel! With all the PRs linked above, a custom compiled bazel binary, about a hundred instances of It's not perfect, but it's a damn good start. Also, it looks like doc inheritance is going to be a thing that needs to be fixed before the gazelle/rules_go docs can be migrated. I'll start putting something together on that front soon. I've attached the load("@io_bazel_stardoc//stardoc:stardoc.bzl", "stardoc")
stardoc(
name = "def-docs",
out = "def_doc.md",
input = "def.bzl",
deps = [
"//extras:embed_data",
"//go/private:context",
"//go/private:go_toolchain",
"//go/private:providers",
"//go/private/rules:library",
"//go/private/rules:nogo",
"//go/private/rules:sdk",
"//go/private/rules:source",
"//go/private/rules:wrappers",
"//go/private/tools:path",
],
) |
Cool! Looks like it's gotten pretty far. Doesn't seem to be able to tunnel through macros like |
Yeah, I think that's [doc inheritance] (bazelbuild/stardoc#27). In that bug they have a proposed syntax that looks basically like a docstring |
This is to allow people who transitively depend on this repo to use stardoc to generate documentation for their Bazel targets. For the origin of this commit, please see bazel-contrib/bazel-gazelle#760 (comment) and the linked PRs in that thread.
This is to allow people who transitively depend on this repo to use stardoc to generate documentation for their Bazel targets. For the origin of this commit, please see bazel-contrib/bazel-gazelle#760 (comment) and the linked PRs in that thread.
This is a part of bazel-contrib/bazel-gazelle#760. To update the copy in the bazel mirror: ``` cd $(mktemp -d) wget https://github.com/bazelbuild/rules_cc/archive/7bd0e49cfb2237086df89dca9e6ba7a5a5dfb36d.zip gsutil cp 02becfef8bc97bda4f9bb64e153f1b0671aec4ba.zip gs://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/02becfef8bc97bda4f9bb64e153f1b0671aec4ba.zip ``` Fixed: bazel-contrib#2711
So with bazel-contrib/rules_go#2712 closed, is there still a lot of outstanding work to be done on this PR? |
If you look at #760 (comment) you can see a list of things to do. Unfortunately the changes that were merged into rules_cc are insufficient since they are not publicly visible so we need to fix that before Gazelle can get |
Hey, I have a hard time understanding what code is where exactly, but were the |
The |
Does |
I do not work on rules_cc so I have no information on the subject. Best of luck! |
I'm thoroughly confused by your response. Did you not write #760 (comment) ? Is this PR forever blocked because you don't know how to tell if the next task is complete or not? Why even open bazelbuild/rules_cc#87 if you had no way to know whether or not the changes would be usable? |
Sorry, not tying to be obnoxious, this PR is blocking my ability to generate documentation through Stardoc. It seems like all the blockers are satisfied for completing this PR so I'd hugely appreciate seeing this go through 🙏 😅 |
Unfortunately, there are still blockers. It is not possible to depend on |
This allows external parties to use Gazelle to generate bzl_library targets that depend on Gazelle and installs the `skylib` generator in the Gazelle repo. Co-authored-by: Nikolaos Georgiou <Nikolaos.Georgiou@gmail.com>
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
The |
@googlebot I consent |
With bazel-contrib/bazel-gazelle#760 submitted, it should now be possible to use stardoc to generate documentation for rules_go and gazelle.
With bazel-contrib/bazel-gazelle#760 submitted, it should now be possible to use stardoc to generate documentation for rules_go and gazelle.
With bazel-contrib/bazel-gazelle#760 submitted, it should now be possible to use stardoc to generate documentation for rules_go and gazelle.
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel_gazelle](https://togithub.com/bazelbuild/bazel-gazelle) | http_archive | minor | `v0.22.2` -> `v0.24.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel-gazelle</summary> ### [`v0.24.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.24.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.23.0...v0.24.0) This release requires [rules_go 0.29](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.29.0) to support the retirement of `go_tool_library`. #### Changes - .netrc files are now supported for authenticated access for `go_repository` rules ([#​1090](https://togithub.com/bazelbuild/bazel-gazelle/issues/1090)) - There is now a Gazelle extension for authoring BUILD files for the R language, using [rules_r](https://togithub.com/grailbio/rules_r). #### Fixes - language/go: don't let 'go mod download' edit go.sum by [@​jayconrod](https://togithub.com/jayconrod) in [https://github.com/bazelbuild/bazel-gazelle/pull/1015](https://togithub.com/bazelbuild/bazel-gazelle/pull/1015) - Label fix: properly parse external references to the main repository by [@​tfrench-uber](https://togithub.com/tfrench-uber) in [https://github.com/bazelbuild/bazel-gazelle/pull/1006](https://togithub.com/bazelbuild/bazel-gazelle/pull/1006) - gazelle: add -e flag for go list 1.16 by [@​axelberardino](https://togithub.com/axelberardino) in [https://github.com/bazelbuild/bazel-gazelle/pull/1019](https://togithub.com/bazelbuild/bazel-gazelle/pull/1019) - Correctly propagate runfiles from gazelle_bin to gazelle by [@​HALtheWise](https://togithub.com/HALtheWise) in [https://github.com/bazelbuild/bazel-gazelle/pull/1008](https://togithub.com/bazelbuild/bazel-gazelle/pull/1008) - Support Label [@​repo](https://togithub.com/repo) -> @​repo//:repo shorthand by [@​wolfd](https://togithub.com/wolfd) in [https://github.com/bazelbuild/bazel-gazelle/pull/1023](https://togithub.com/bazelbuild/bazel-gazelle/pull/1023) - language/go: rewrite embedResolver to use a tree structure by [@​jayconrod](https://togithub.com/jayconrod) in [https://github.com/bazelbuild/bazel-gazelle/pull/1024](https://togithub.com/bazelbuild/bazel-gazelle/pull/1024) - Respect .bazelignore by [@​Michaelhobo](https://togithub.com/Michaelhobo) in [https://github.com/bazelbuild/bazel-gazelle/pull/1022](https://togithub.com/bazelbuild/bazel-gazelle/pull/1022) - Change merge behavior to remove attrs instead of panicking by [@​wolfd](https://togithub.com/wolfd) in [https://github.com/bazelbuild/bazel-gazelle/pull/1031](https://togithub.com/bazelbuild/bazel-gazelle/pull/1031) - Allow ListRepositories to load macros not in Workspace by [@​tfrench-uber](https://togithub.com/tfrench-uber) in [https://github.com/bazelbuild/bazel-gazelle/pull/1053](https://togithub.com/bazelbuild/bazel-gazelle/pull/1053) - Honor host GOMODCACHE when GO_REPOSITORY_USE_HOST_CACHE by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1069](https://togithub.com/bazelbuild/bazel-gazelle/pull/1069) - language/go: add golang.org/x/tools/internal/typeparams to nogo deps list by [@​jayconrod](https://togithub.com/jayconrod) in [https://github.com/bazelbuild/bazel-gazelle/pull/1074](https://togithub.com/bazelbuild/bazel-gazelle/pull/1074) - Fix "exclude" token parsing by [@​gibfahn](https://togithub.com/gibfahn) in [https://github.com/bazelbuild/bazel-gazelle/pull/1073](https://togithub.com/bazelbuild/bazel-gazelle/pull/1073) - Have label properly resolve directives starting with "@​//" by [@​tfrench-uber](https://togithub.com/tfrench-uber) in [https://github.com/bazelbuild/bazel-gazelle/pull/1086](https://togithub.com/bazelbuild/bazel-gazelle/pull/1086) - Correctly propagate runfiles from data dependencies to gazelle by [@​alexeagle](https://togithub.com/alexeagle) in [https://github.com/bazelbuild/bazel-gazelle/pull/1094](https://togithub.com/bazelbuild/bazel-gazelle/pull/1094) - Add bzl_library targets to Gazelle by [@​achew22](https://togithub.com/achew22) in [https://github.com/bazelbuild/bazel-gazelle/pull/760](https://togithub.com/bazelbuild/bazel-gazelle/pull/760) - Escape vars in cgo flags with an extra $ by [@​dierksen](https://togithub.com/dierksen) in [https://github.com/bazelbuild/bazel-gazelle/pull/1107](https://togithub.com/bazelbuild/bazel-gazelle/pull/1107) - autogazelle can build on windows by [@​asuffield](https://togithub.com/asuffield) in [https://github.com/bazelbuild/bazel-gazelle/pull/1083](https://togithub.com/bazelbuild/bazel-gazelle/pull/1083) - and many documentation updates by [@​tanyabouman](https://togithub.com/tanyabouman) **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") gazelle_dependencies() ### [`v0.23.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.23.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.22.3...v0.23.0) #### Changes - Go - `CXXFLAGS` and `CPPFLAGS` `#cgo` directives are separated into `cxxopts` and `cppopts` attributes, respectively. Thanks [@​otan](https://togithub.com/otan). - Dependencies on mapped kinds are now supported. Thanks [@​robfig](https://togithub.com/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](https://togithub.com/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`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.22.3) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.22.2...v0.22.3) #### Bug fixes - `-mode=diff` treats empty build files correctly. (thanks [@​vpanta](https://togithub.com/vpanta)) - Gazelle should walk subdirectories more quickly when indexing is disabled. (thanks [@​blico](https://togithub.com/blico)) - Fixed dependency resolution with mapped kinds. (thanks [@​robfig](https://togithub.com/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() </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-config-validator).
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [bazel_gazelle](https://togithub.com/bazelbuild/bazel-gazelle) | http_archive | minor | `v0.22.2` -> `v0.24.0` | --- ### Release Notes <details> <summary>bazelbuild/bazel-gazelle</summary> ### [`v0.24.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.24.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.23.0...v0.24.0) This release requires [rules_go 0.29](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.29.0) to support the retirement of `go_tool_library`. #### Changes - .netrc files are now supported for authenticated access for `go_repository` rules ([#​1090](https://togithub.com/bazelbuild/bazel-gazelle/issues/1090)) - There is now a Gazelle extension for authoring BUILD files for the R language, using [rules_r](https://togithub.com/grailbio/rules_r). #### Fixes - language/go: don't let 'go mod download' edit go.sum by [@​jayconrod](https://togithub.com/jayconrod) in [https://github.com/bazelbuild/bazel-gazelle/pull/1015](https://togithub.com/bazelbuild/bazel-gazelle/pull/1015) - Label fix: properly parse external references to the main repository by [@​tfrench-uber](https://togithub.com/tfrench-uber) in [https://github.com/bazelbuild/bazel-gazelle/pull/1006](https://togithub.com/bazelbuild/bazel-gazelle/pull/1006) - gazelle: add -e flag for go list 1.16 by [@​axelberardino](https://togithub.com/axelberardino) in [https://github.com/bazelbuild/bazel-gazelle/pull/1019](https://togithub.com/bazelbuild/bazel-gazelle/pull/1019) - Correctly propagate runfiles from gazelle_bin to gazelle by [@​HALtheWise](https://togithub.com/HALtheWise) in [https://github.com/bazelbuild/bazel-gazelle/pull/1008](https://togithub.com/bazelbuild/bazel-gazelle/pull/1008) - Support Label [@​repo](https://togithub.com/repo) -> @​repo//:repo shorthand by [@​wolfd](https://togithub.com/wolfd) in [https://github.com/bazelbuild/bazel-gazelle/pull/1023](https://togithub.com/bazelbuild/bazel-gazelle/pull/1023) - language/go: rewrite embedResolver to use a tree structure by [@​jayconrod](https://togithub.com/jayconrod) in [https://github.com/bazelbuild/bazel-gazelle/pull/1024](https://togithub.com/bazelbuild/bazel-gazelle/pull/1024) - Respect .bazelignore by [@​Michaelhobo](https://togithub.com/Michaelhobo) in [https://github.com/bazelbuild/bazel-gazelle/pull/1022](https://togithub.com/bazelbuild/bazel-gazelle/pull/1022) - Change merge behavior to remove attrs instead of panicking by [@​wolfd](https://togithub.com/wolfd) in [https://github.com/bazelbuild/bazel-gazelle/pull/1031](https://togithub.com/bazelbuild/bazel-gazelle/pull/1031) - Allow ListRepositories to load macros not in Workspace by [@​tfrench-uber](https://togithub.com/tfrench-uber) in [https://github.com/bazelbuild/bazel-gazelle/pull/1053](https://togithub.com/bazelbuild/bazel-gazelle/pull/1053) - Honor host GOMODCACHE when GO_REPOSITORY_USE_HOST_CACHE by [@​linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/bazel-gazelle/pull/1069](https://togithub.com/bazelbuild/bazel-gazelle/pull/1069) - language/go: add golang.org/x/tools/internal/typeparams to nogo deps list by [@​jayconrod](https://togithub.com/jayconrod) in [https://github.com/bazelbuild/bazel-gazelle/pull/1074](https://togithub.com/bazelbuild/bazel-gazelle/pull/1074) - Fix "exclude" token parsing by [@​gibfahn](https://togithub.com/gibfahn) in [https://github.com/bazelbuild/bazel-gazelle/pull/1073](https://togithub.com/bazelbuild/bazel-gazelle/pull/1073) - Have label properly resolve directives starting with "@​//" by [@​tfrench-uber](https://togithub.com/tfrench-uber) in [https://github.com/bazelbuild/bazel-gazelle/pull/1086](https://togithub.com/bazelbuild/bazel-gazelle/pull/1086) - Correctly propagate runfiles from data dependencies to gazelle by [@​alexeagle](https://togithub.com/alexeagle) in [https://github.com/bazelbuild/bazel-gazelle/pull/1094](https://togithub.com/bazelbuild/bazel-gazelle/pull/1094) - Add bzl_library targets to Gazelle by [@​achew22](https://togithub.com/achew22) in [https://github.com/bazelbuild/bazel-gazelle/pull/760](https://togithub.com/bazelbuild/bazel-gazelle/pull/760) - Escape vars in cgo flags with an extra $ by [@​dierksen](https://togithub.com/dierksen) in [https://github.com/bazelbuild/bazel-gazelle/pull/1107](https://togithub.com/bazelbuild/bazel-gazelle/pull/1107) - autogazelle can build on windows by [@​asuffield](https://togithub.com/asuffield) in [https://github.com/bazelbuild/bazel-gazelle/pull/1083](https://togithub.com/bazelbuild/bazel-gazelle/pull/1083) - and many documentation updates by [@​tanyabouman](https://togithub.com/tanyabouman) **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") gazelle_dependencies() ### [`v0.23.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.23.0) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.22.3...v0.23.0) #### Changes - Go - `CXXFLAGS` and `CPPFLAGS` `#cgo` directives are separated into `cxxopts` and `cppopts` attributes, respectively. Thanks [@​otan](https://togithub.com/otan). - Dependencies on mapped kinds are now supported. Thanks [@​robfig](https://togithub.com/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](https://togithub.com/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`](https://togithub.com/bazelbuild/bazel-gazelle/releases/v0.22.3) [Compare Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.22.2...v0.22.3) #### Bug fixes - `-mode=diff` treats empty build files correctly. (thanks [@​vpanta](https://togithub.com/vpanta)) - Gazelle should walk subdirectories more quickly when indexing is disabled. (thanks [@​blico](https://togithub.com/blico)) - Fixed dependency resolution with mapped kinds. (thanks [@​robfig](https://togithub.com/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() </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-generator-go).
* Update `bzl_library` targets With bazel-contrib/bazel-gazelle#760 submitted, it should now be possible to use stardoc to generate documentation for rules_go and gazelle.
What type of PR is this?
What package or component does this PR mostly affect?
What does this PR do? Why is it needed?
This adds
bzl_library
targets for Gazelle. This is useful in generatingskydoc
s.