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

Stop resolving to @io_bazel_rules_go//proto/wkt #1567

Merged
merged 3 commits into from
Jul 2, 2023

Conversation

linzhp
Copy link
Contributor

@linzhp linzhp commented Jul 1, 2023

After bazel-contrib/rules_go#3595, @io_bazel_rules_go//proto/wkt only contains alias to pre-generated Go packages. Gazelle should resolve to those Go packages instead, so eventually we can remove the alias in @io_bazel_rules_go//proto/wkt

@linzhp linzhp requested review from achew22 and fmeum July 2, 2023 03:36
Copy link
Member

@achew22 achew22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really excited for this. Great work!

@linzhp linzhp enabled auto-merge (squash) July 2, 2023 15:13
@linzhp linzhp merged commit d203278 into bazel-contrib:master Jul 2, 2023
renovate bot referenced this pull request in kreempuff/rules_unreal_engine Jul 11, 2023
[![Mend
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.31.1` -> `v0.32.0` |

---

### ⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the
Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary>

###
[`v0.32.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.32.0)

[Compare
Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.31.1...v0.32.0)

Starting this release, Gazelle no longer resolves Go and proto imports
of Google APIs to `@go_googleapis`. Instead, Go packages from Google
APIs will be treated as regular Go packages, and resolve to
`@org_golang_google_genproto`, which contains the pre-generated Go code,
with its version determined by Go modules. For proto files importing
Google APIs proto and generating Go code, users need to:

1.  Add an `http_archive` rule to download Google APIs, e.g.,

<!---->

    http_archive(
        name = "googleapis",
sha256 =
"9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88",
strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922",
        urls = [

"https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip",
        ],
    )

load("@&#8203;googleapis//:repository_rules.bzl",
"switched_rules_by_language")

    switched_rules_by_language(
        name = "com_google_googleapis_imports",
    )

Note that the version of Google APIs archive needs to be compatible with
the pre-generated code in `@org_golang_google_genproto`.

2. Resolve the proto manually. If Gazelle is being used, directives like
the following need to be added to a parent directory of the proto files:

<!---->

### gazelle:resolve proto proto google/rpc/status.proto
@&#8203;googleapis//google/rpc:status_proto
### gazelle:resolve proto go google/rpc/status.proto
@&#8203;org_golang_google_genproto//googleapis/rpc/status
### gazelle:resolve proto google/longrunning/operations.proto
@&#8203;googleapis//google/longrunning:operations_proto
### gazelle:resolve proto go google/longrunning/operations.proto
@&#8203;org_golang_google_genproto//googleapis/longrunning

#### What's Changed

- Decouple Google APIs by [@&#8203;linzhp](https://togithub.com/linzhp)
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1561](https://togithub.com/bazelbuild/bazel-gazelle/pull/1561)
- resolve: Add a resolve_regexp directive by
[@&#8203;DolceTriade](https://togithub.com/DolceTriade) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1542](https://togithub.com/bazelbuild/bazel-gazelle/pull/1542)
- Remove module dependency on go_googleapis by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1563](https://togithub.com/bazelbuild/bazel-gazelle/pull/1563)
- Testing on macOS arm64 by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1568](https://togithub.com/bazelbuild/bazel-gazelle/pull/1568)
- Stop resolving to @&#8203;io_bazel_rules_go//proto/wkt by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1567](https://togithub.com/bazelbuild/bazel-gazelle/pull/1567)
- Fix directive table in Readme file by
[@&#8203;farhaven](https://togithub.com/farhaven) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1571](https://togithub.com/bazelbuild/bazel-gazelle/pull/1571)

#### New Contributors

- [@&#8203;DolceTriade](https://togithub.com/DolceTriade) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1542](https://togithub.com/bazelbuild/bazel-gazelle/pull/1542)
- [@&#8203;farhaven](https://togithub.com/farhaven) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1571](https://togithub.com/bazelbuild/bazel-gazelle/pull/1571)

**Full Changelog**:
bazel-contrib/bazel-gazelle@v0.31.1...v0.32.0

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/kreempuff/rules_unreal_engine).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->
renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Jul 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
[![Mend
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.31.1` -> `v0.32.0` |

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary>

###
[`v0.32.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.32.0)

[Compare
Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.31.1...v0.32.0)

Starting this release, Gazelle no longer resolves Go and proto imports
of Google APIs to `@go_googleapis`. Instead, Go packages from Google
APIs will be treated as regular Go packages, and resolve to
`@org_golang_google_genproto`, which contains the pre-generated Go code,
with its version determined by Go modules. For proto files importing
Google APIs proto and generating Go code, users need to:

1.  Add an `http_archive` rule to download Google APIs, e.g.,

<!---->

    http_archive(
        name = "googleapis",
sha256 =
"9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88",
strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922",
        urls = [

"https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip",
        ],
    )

load("@&#8203;googleapis//:repository_rules.bzl",
"switched_rules_by_language")

    switched_rules_by_language(
        name = "com_google_googleapis_imports",
    )

Note that the version of Google APIs archive needs to be compatible with
the pre-generated code in `@org_golang_google_genproto`.

2. Resolve the proto manually. If Gazelle is being used, directives like
the following need to be added to a parent directory of the proto files:

<!---->

### gazelle:resolve proto proto google/rpc/status.proto
@&#8203;googleapis//google/rpc:status_proto
### gazelle:resolve proto go google/rpc/status.proto
@&#8203;org_golang_google_genproto//googleapis/rpc/status
### gazelle:resolve proto google/longrunning/operations.proto
@&#8203;googleapis//google/longrunning:operations_proto
### gazelle:resolve proto go google/longrunning/operations.proto
@&#8203;org_golang_google_genproto//googleapis/longrunning

#### What's Changed

- Decouple Google APIs by [@&#8203;linzhp](https://togithub.com/linzhp)
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1561](https://togithub.com/bazelbuild/bazel-gazelle/pull/1561)
- resolve: Add a resolve_regexp directive by
[@&#8203;DolceTriade](https://togithub.com/DolceTriade) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1542](https://togithub.com/bazelbuild/bazel-gazelle/pull/1542)
- Remove module dependency on go_googleapis by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1563](https://togithub.com/bazelbuild/bazel-gazelle/pull/1563)
- Testing on macOS arm64 by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1568](https://togithub.com/bazelbuild/bazel-gazelle/pull/1568)
- Stop resolving to @&#8203;io_bazel_rules_go//proto/wkt by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1567](https://togithub.com/bazelbuild/bazel-gazelle/pull/1567)
- Fix directive table in Readme file by
[@&#8203;farhaven](https://togithub.com/farhaven) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1571](https://togithub.com/bazelbuild/bazel-gazelle/pull/1571)

#### New Contributors

- [@&#8203;DolceTriade](https://togithub.com/DolceTriade) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1542](https://togithub.com/bazelbuild/bazel-gazelle/pull/1542)
- [@&#8203;farhaven](https://togithub.com/farhaven) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1571](https://togithub.com/bazelbuild/bazel-gazelle/pull/1571)

**Full Changelog**:
bazel-contrib/bazel-gazelle@v0.31.1...v0.32.0

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cgrindel/rules_swift_package_manager).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in cgrindel/bazel-starlib Jul 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
[![Mend
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.31.1` -> `v0.32.0` |

---

### Release Notes

<details>
<summary>bazelbuild/bazel-gazelle (bazel_gazelle)</summary>

###
[`v0.32.0`](https://togithub.com/bazelbuild/bazel-gazelle/releases/tag/v0.32.0)

[Compare
Source](https://togithub.com/bazelbuild/bazel-gazelle/compare/v0.31.1...v0.32.0)

Starting this release, Gazelle no longer resolves Go and proto imports
of Google APIs to `@go_googleapis`. Instead, Go packages from Google
APIs will be treated as regular Go packages, and resolve to
`@org_golang_google_genproto`, which contains the pre-generated Go code,
with its version determined by Go modules. For proto files importing
Google APIs proto and generating Go code, users need to:

1.  Add an `http_archive` rule to download Google APIs, e.g.,

<!---->

    http_archive(
        name = "googleapis",
sha256 =
"9d1a930e767c93c825398b8f8692eca3fe353b9aaadedfbcf1fca2282c85df88",
strip_prefix = "googleapis-64926d52febbf298cb82a8f472ade4a3969ba922",
        urls = [

"https://github.com/googleapis/googleapis/archive/64926d52febbf298cb82a8f472ade4a3969ba922.zip",
        ],
    )

load("@&#8203;googleapis//:repository_rules.bzl",
"switched_rules_by_language")

    switched_rules_by_language(
        name = "com_google_googleapis_imports",
    )

Note that the version of Google APIs archive needs to be compatible with
the pre-generated code in `@org_golang_google_genproto`.

2. Resolve the proto manually. If Gazelle is being used, directives like
the following need to be added to a parent directory of the proto files:

<!---->

### gazelle:resolve proto proto google/rpc/status.proto
@&#8203;googleapis//google/rpc:status_proto
### gazelle:resolve proto go google/rpc/status.proto
@&#8203;org_golang_google_genproto//googleapis/rpc/status
### gazelle:resolve proto google/longrunning/operations.proto
@&#8203;googleapis//google/longrunning:operations_proto
### gazelle:resolve proto go google/longrunning/operations.proto
@&#8203;org_golang_google_genproto//googleapis/longrunning

#### What's Changed

- Decouple Google APIs by [@&#8203;linzhp](https://togithub.com/linzhp)
in
[https://github.com/bazelbuild/bazel-gazelle/pull/1561](https://togithub.com/bazelbuild/bazel-gazelle/pull/1561)
- resolve: Add a resolve_regexp directive by
[@&#8203;DolceTriade](https://togithub.com/DolceTriade) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1542](https://togithub.com/bazelbuild/bazel-gazelle/pull/1542)
- Remove module dependency on go_googleapis by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1563](https://togithub.com/bazelbuild/bazel-gazelle/pull/1563)
- Testing on macOS arm64 by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1568](https://togithub.com/bazelbuild/bazel-gazelle/pull/1568)
- Stop resolving to @&#8203;io_bazel_rules_go//proto/wkt by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1567](https://togithub.com/bazelbuild/bazel-gazelle/pull/1567)
- Fix directive table in Readme file by
[@&#8203;farhaven](https://togithub.com/farhaven) in
[https://github.com/bazelbuild/bazel-gazelle/pull/1571](https://togithub.com/bazelbuild/bazel-gazelle/pull/1571)

#### New Contributors

- [@&#8203;DolceTriade](https://togithub.com/DolceTriade) made their
first contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1542](https://togithub.com/bazelbuild/bazel-gazelle/pull/1542)
- [@&#8203;farhaven](https://togithub.com/farhaven) made their first
contribution in
[https://github.com/bazelbuild/bazel-gazelle/pull/1571](https://togithub.com/bazelbuild/bazel-gazelle/pull/1571)

**Full Changelog**:
bazel-contrib/bazel-gazelle@v0.31.1...v0.32.0

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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 [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/cgrindel/bazel-starlib).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi41LjMiLCJ1cGRhdGVkSW5WZXIiOiIzNi41LjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

3 participants