-
-
Notifications
You must be signed in to change notification settings - Fork 691
Add go_default_library
alias for gomock targets
#3155
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sets `go_naming_convention` to `import_alias` for gomock, as per the other Go dependencies. This means users with `go_naming_convention` set to `go_default_library` do not have to make adjustments to Gazelle generated files or override the dependency. Fixes bazel-contrib#3154
linzhp
approved these changes
May 16, 2022
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.
Thanks for reporting the issue and fixing it.
gcf-merge-on-green bot
referenced
this pull request
in googleapis/gapic-generator-go
Jun 6, 2022
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://github.com/bazelbuild/rules_go) | http_archive | minor | `v0.32.0` -> `v0.33.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_go</summary> ### [`v0.33.0`](https://github.com/bazelbuild/rules_go/releases/tag/v0.33.0) [Compare Source](https://github.com/bazelbuild/rules_go/compare/v0.32.0...v0.33.0) ##### Breaking changes - [cover](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#cover) has been removed in v0.32.0. Please [leave a comment](https://github.com/bazelbuild/rules_go/issues/3168) if you are affected by this. ##### Deprecations - The [asm](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#asm), [compile](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#compile), and [pack](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#pack) action generators provided by [go_context](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#go_context) are deprecated and planned for removal in version v0.36.0. Please leave a comment on the [tracking bug](https://github.com/bazelbuild/rules_go/issues/3168) if [archive](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#archive) and [link](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#link) are not suitable replacements for your use cases. ##### Bug Fixes - [@​sluongng](https://github.com/sluongng) fixed a race condition that could cause non-sandboxed builds of `go_test` targets to fail ([https://github.com/bazelbuild/rules_go/pull/3145](https://github.com/bazelbuild/rules_go/pull/3145)) - [@​abhinav](https://github.com/abhinav) made `//go:embed` work with `go_path` ([https://github.com/bazelbuild/rules_go/pull/3163](https://github.com/bazelbuild/rules_go/pull/3163)) - [@​xytan0056](https://github.com/xytan0056) made gopackagesdriver work with Go 1.18 ([https://github.com/bazelbuild/rules_go/pull/3157](https://github.com/bazelbuild/rules_go/pull/3157)) - [@​nickgooding](https://github.com/nickgooding) ensured that `gomock` can be used with any Gazelle naming convention ([https://github.com/bazelbuild/rules_go/pull/3155](https://github.com/bazelbuild/rules_go/pull/3155)) - `go_library` targets using CGo can now reference unresolved symbols ([https://github.com/bazelbuild/rules_go/pull/3174](https://github.com/bazelbuild/rules_go/pull/3174)) Thanks to all of the contributors! ##### Compatibility The minimum required version of Bazel remains at 4.2.1. ##### Updated dependencies - Updated `org_golang_x_sys`, `org_golang_x_xerrors`, `org_golang_google_genproto`, `go_googleapis` to their most recent commit as of 2022-06-05 As always, you can use higher versions of rules_go's dependencies by declaring them in WORKSPACE before calling go_rules_dependencies. Lower versions may work but are not supported. ##### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "685052b498b6ddfe562ca7a97736741d87916fe536623afb7da2824c0211c369", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.18.3") </details> --- ### 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 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, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-generator-go).
gcf-merge-on-green bot
referenced
this pull request
in googleapis/gapic-config-validator
Jun 6, 2022
[](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [io_bazel_rules_go](https://github.com/bazelbuild/rules_go) | http_archive | minor | `v0.32.0` -> `v0.33.0` | --- ### Release Notes <details> <summary>bazelbuild/rules_go</summary> ### [`v0.33.0`](https://github.com/bazelbuild/rules_go/releases/tag/v0.33.0) [Compare Source](https://github.com/bazelbuild/rules_go/compare/v0.32.0...v0.33.0) #### Breaking changes - [cover](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#cover) has been removed in v0.32.0. Please [leave a comment](https://github.com/bazelbuild/rules_go/issues/3168) if you are affected by this. #### Deprecations - The [asm](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#asm), [compile](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#compile), and [pack](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#pack) action generators provided by [go_context](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#go_context) are deprecated and planned for removal in version v0.36.0. Please leave a comment on the [tracking bug](https://github.com/bazelbuild/rules_go/issues/3168) if [archive](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#archive) and [link](https://github.com/bazelbuild/rules_go/blob/master/go/toolchains.rst#link) are not suitable replacements for your use cases. #### Bug Fixes - [@​sluongng](https://github.com/sluongng) fixed a race condition that could cause non-sandboxed builds of `go_test` targets to fail ([https://github.com/bazelbuild/rules_go/pull/3145](https://github.com/bazelbuild/rules_go/pull/3145)) - [@​abhinav](https://github.com/abhinav) made `//go:embed` work with `go_path` ([https://github.com/bazelbuild/rules_go/pull/3163](https://github.com/bazelbuild/rules_go/pull/3163)) - [@​xytan0056](https://github.com/xytan0056) made gopackagesdriver work with Go 1.18 ([https://github.com/bazelbuild/rules_go/pull/3157](https://github.com/bazelbuild/rules_go/pull/3157)) - [@​nickgooding](https://github.com/nickgooding) ensured that `gomock` can be used with any Gazelle naming convention ([https://github.com/bazelbuild/rules_go/pull/3155](https://github.com/bazelbuild/rules_go/pull/3155)) - `go_library` targets using CGo can now reference unresolved symbols ([https://github.com/bazelbuild/rules_go/pull/3174](https://github.com/bazelbuild/rules_go/pull/3174)) Thanks to all of the contributors! #### Compatibility The minimum required version of Bazel remains at 4.2.1. #### Updated dependencies - Updated `org_golang_x_sys`, `org_golang_x_xerrors`, `org_golang_google_genproto`, `go_googleapis` to their most recent commit as of 2022-06-05 As always, you can use higher versions of rules_go's dependencies by declaring them in WORKSPACE before calling go_rules_dependencies. Lower versions may work but are not supported. #### `WORKSPACE` code load("@​bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "io_bazel_rules_go", sha256 = "685052b498b6ddfe562ca7a97736741d87916fe536623afb7da2824c0211c369", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.33.0/rules_go-v0.33.0.zip", ], ) load("@​io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") go_rules_dependencies() go_register_toolchains(version = "1.18.3") </details> --- ### 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 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, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/gapic-config-validator).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What does this PR do? Why is it needed?
Sets
go_naming_convention
toimport_alias
for gomock, as per the otherGo dependencies. This means users with
go_naming_convention
set togo_default_library
do not have to make adjustments toGazelle generated files or override the dependency.
Which issues(s) does this PR fix?
Fixes #3154
Other notes for review
N/A