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

Support --nolegacy_external_runfiles #3795

Merged
merged 5 commits into from
Dec 27, 2023
Merged

Support --nolegacy_external_runfiles #3795

merged 5 commits into from
Dec 27, 2023

Conversation

fmeum
Copy link
Member

@fmeum fmeum commented Dec 23, 2023

Preparation for bazelbuild/bazel#12821.

Without legacy runfiles, bazel.FindBinary's lookup approach is flawed for top-level package binaries in external repositories: It first searches for the "empty" package via bazel.Runfiles, which results in a match on the main repository's runfiles directory, then fails to find the binary which used to be found only because it was under the external directory. Instead of attempting to fix this method, also mark it as deprecated.

@fmeum fmeum marked this pull request as ready for review December 23, 2023 13:54
@fmeum fmeum changed the title Test with --nolegacy_external_runfiles Support --nolegacy_external_runfiles Dec 27, 2023
@fmeum fmeum merged commit 32b8404 into master Dec 27, 2023
5 checks passed
@fmeum fmeum deleted the legacy-external-runfiles branch December 27, 2023 16:08
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/bazel-starlib Dec 30, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | patch | `v0.44.0` -> `v0.44.1` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

###
[`v0.44.1`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.1)

[Compare
Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.0...v0.44.1)

#### Why a patch release

This patch release is to include
bazel-contrib/rules_go@43c40a9
which reverts a change to forcefully upgrade genproto transitively,
which is causing linker failures since
`google.golang.org/genproto/googleapis/rpc` was separated from
`google.golang.org/genproto`

Use --sandbox_debug to see verbose messages from the sandbox and retain
the sandbox build root for debugging
link: package conflict error:
google.golang.org/genproto/googleapis/longrunning: package imports
google.golang.org/genproto/googleapis/rpc/status
was compiled with:
@&#8203;@&#8203;gazelle~0.35.0~go_deps~org_golang_google_genproto//googleapis/rpc/status:status
but was linked with:
@&#8203;@&#8203;gazelle~0.35.0~go_deps~org_golang_google_genproto_googleapis_rpc//status:status

#### `WORKSPACE` code

load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"b6828eb2d03bb5ef76f2077f8670b211fe792e77ddb83450ea9f887df04db9c7",
        urls = [

"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",

"https://github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",
        ],
    )

load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains",
"go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

- Slightly tweak deprecation wording for //proto:go_grpc by
[@&#8203;ryanpbrewster](https://togithub.com/ryanpbrewster) in
[https://github.com/bazelbuild/rules_go/pull/3790](https://togithub.com/bazelbuild/rules_go/pull/3790)
- Let `@rules_go//go` file path end with `/bin/go` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3791](https://togithub.com/bazelbuild/rules_go/pull/3791)
- Always attempt to set RUNFILES_DIR and JAVA_RUNFILES in `runfiles.Env`
by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3778](https://togithub.com/bazelbuild/rules_go/pull/3778)
- Update Bzlmod guide by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3794](https://togithub.com/bazelbuild/rules_go/pull/3794)
- add maintainers to metadata.json template by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3797](https://togithub.com/bazelbuild/rules_go/pull/3797)
- Link to the isolated extension usages issue in Bzlmod guide by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3800](https://togithub.com/bazelbuild/rules_go/pull/3800)
- Support `--nolegacy_external_runfiles` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3795](https://togithub.com/bazelbuild/rules_go/pull/3795)
- downgrade genproto in go.mod by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_go/pull/3803](https://togithub.com/bazelbuild/rules_go/pull/3803)
- prepare patch release 0.44.1 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3804](https://togithub.com/bazelbuild/rules_go/pull/3804)

**Full Changelog**:
bazel-contrib/rules_go@v0.44.0...v0.44.1

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.com>
renovate bot referenced this pull request in kreempuff/rules_unreal_engine Dec 30, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | patch | `v0.44.0` -> `v0.44.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

###
[`v0.44.1`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.1)

[Compare
Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.0...v0.44.1)

#### Why a patch release

This patch release is to include
bazel-contrib/rules_go@43c40a9
which reverts a change to forcefully upgrade genproto transitively,
which is causing linker failures since
`google.golang.org/genproto/googleapis/rpc` was separated from
`google.golang.org/genproto`

Use --sandbox_debug to see verbose messages from the sandbox and retain
the sandbox build root for debugging
link: package conflict error:
google.golang.org/genproto/googleapis/longrunning: package imports
google.golang.org/genproto/googleapis/rpc/status
was compiled with:
@&#8203;@&#8203;gazelle~0.35.0~go_deps~org_golang_google_genproto//googleapis/rpc/status:status
but was linked with:
@&#8203;@&#8203;gazelle~0.35.0~go_deps~org_golang_google_genproto_googleapis_rpc//status:status

#### `WORKSPACE` code

load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"b6828eb2d03bb5ef76f2077f8670b211fe792e77ddb83450ea9f887df04db9c7",
        urls = [

"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",

"https://github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",
        ],
    )

load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains",
"go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

- Slightly tweak deprecation wording for //proto:go_grpc by
[@&#8203;ryanpbrewster](https://togithub.com/ryanpbrewster) in
[https://github.com/bazelbuild/rules_go/pull/3790](https://togithub.com/bazelbuild/rules_go/pull/3790)
- Let `@rules_go//go` file path end with `/bin/go` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3791](https://togithub.com/bazelbuild/rules_go/pull/3791)
- Always attempt to set RUNFILES_DIR and JAVA_RUNFILES in `runfiles.Env`
by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3778](https://togithub.com/bazelbuild/rules_go/pull/3778)
- Update Bzlmod guide by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3794](https://togithub.com/bazelbuild/rules_go/pull/3794)
- add maintainers to metadata.json template by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3797](https://togithub.com/bazelbuild/rules_go/pull/3797)
- Link to the isolated extension usages issue in Bzlmod guide by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3800](https://togithub.com/bazelbuild/rules_go/pull/3800)
- Support `--nolegacy_external_runfiles` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3795](https://togithub.com/bazelbuild/rules_go/pull/3795)
- downgrade genproto in go.mod by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_go/pull/3803](https://togithub.com/bazelbuild/rules_go/pull/3803)
- prepare patch release 0.44.1 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3804](https://togithub.com/bazelbuild/rules_go/pull/3804)

**Full Changelog**:
bazel-contrib/rules_go@v0.44.0...v0.44.1

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
trunk-io bot referenced this pull request in ride-app/driver-service Jan 1, 2024
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) | http_archive | patch | `v0.44.0` -> `v0.44.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency Dashboard for more information.

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

### [`v0.44.1`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.1)

[Compare Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.0...v0.44.1)

#### Why a patch release

This patch release is to include bazel-contrib/rules_go@43c40a9 which reverts a change to forcefully upgrade genproto transitively, which is causing linker failures since `google.golang.org/genproto/googleapis/rpc` was separated from `google.golang.org/genproto`

#### `WORKSPACE` code

    load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

    http_archive(
        name = "io_bazel_rules_go",
        sha256 = "b6828eb2d03bb5ef76f2077f8670b211fe792e77ddb83450ea9f887df04db9c7",
        urls = [
            "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",
            "https://github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",
        ],
    )

    load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

-   Slightly tweak deprecation wording for //proto:go_grpc by [@&#8203;ryanpbrewster](https://togithub.com/ryanpbrewster) in [https://github.com/bazelbuild/rules_go/pull/3790](https://togithub.com/bazelbuild/rules_go/pull/3790)
-   Let `@rules_go//go` file path end with `/bin/go` by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3791](https://togithub.com/bazelbuild/rules_go/pull/3791)
-   Always attempt to set RUNFILES_DIR and JAVA_RUNFILES in `runfiles.Env` by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3778](https://togithub.com/bazelbuild/rules_go/pull/3778)
-   Update Bzlmod guide by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3794](https://togithub.com/bazelbuild/rules_go/pull/3794)
-   add maintainers to metadata.json template by [@&#8203;tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/rules_go/pull/3797](https://togithub.com/bazelbuild/rules_go/pull/3797)
-   Link to the isolated extension usages issue in Bzlmod guide by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3800](https://togithub.com/bazelbuild/rules_go/pull/3800)
-   Support `--nolegacy_external_runfiles` by [@&#8203;fmeum](https://togithub.com/fmeum) in [https://github.com/bazelbuild/rules_go/pull/3795](https://togithub.com/bazelbuild/rules_go/pull/3795)
-   downgrade genproto in go.mod by [@&#8203;linzhp](https://togithub.com/linzhp) in [https://github.com/bazelbuild/rules_go/pull/3803](https://togithub.com/bazelbuild/rules_go/pull/3803)
-   prepare patch release 0.44.1 by [@&#8203;tyler-french](https://togithub.com/tyler-french) in [https://github.com/bazelbuild/rules_go/pull/3804](https://togithub.com/bazelbuild/rules_go/pull/3804)

**Full Changelog**: bazel-contrib/rules_go@v0.44.0...v0.44.1

</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/ride-app/driver-service).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMDMuMSIsInVwZGF0ZWRJblZlciI6IjM3LjEwMy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/rules_swift_package_manager Jan 1, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | patch | `v0.44.0` -> `v0.44.1` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_go (io_bazel_rules_go)</summary>

###
[`v0.44.1`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.44.1)

[Compare
Source](https://togithub.com/bazelbuild/rules_go/compare/v0.44.0...v0.44.1)

#### Why a patch release

This patch release is to include
bazel-contrib/rules_go@43c40a9
which reverts a change to forcefully upgrade genproto transitively,
which is causing linker failures since
`google.golang.org/genproto/googleapis/rpc` was separated from
`google.golang.org/genproto`

#### `WORKSPACE` code

load("@&#8203;bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive")

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"b6828eb2d03bb5ef76f2077f8670b211fe792e77ddb83450ea9f887df04db9c7",
        urls = [

"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",

"https://github.com/bazelbuild/rules_go/releases/download/v0.44.1/rules_go-v0.44.1.zip",
        ],
    )

load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains",
"go_rules_dependencies")

    go_rules_dependencies()

    go_register_toolchains(version = "1.21.5")

#### What's Changed

- Slightly tweak deprecation wording for //proto:go_grpc by
[@&#8203;ryanpbrewster](https://togithub.com/ryanpbrewster) in
[https://github.com/bazelbuild/rules_go/pull/3790](https://togithub.com/bazelbuild/rules_go/pull/3790)
- Let `@rules_go//go` file path end with `/bin/go` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3791](https://togithub.com/bazelbuild/rules_go/pull/3791)
- Always attempt to set RUNFILES_DIR and JAVA_RUNFILES in `runfiles.Env`
by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3778](https://togithub.com/bazelbuild/rules_go/pull/3778)
- Update Bzlmod guide by [@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3794](https://togithub.com/bazelbuild/rules_go/pull/3794)
- add maintainers to metadata.json template by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3797](https://togithub.com/bazelbuild/rules_go/pull/3797)
- Link to the isolated extension usages issue in Bzlmod guide by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3800](https://togithub.com/bazelbuild/rules_go/pull/3800)
- Support `--nolegacy_external_runfiles` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3795](https://togithub.com/bazelbuild/rules_go/pull/3795)
- downgrade genproto in go.mod by
[@&#8203;linzhp](https://togithub.com/linzhp) in
[https://github.com/bazelbuild/rules_go/pull/3803](https://togithub.com/bazelbuild/rules_go/pull/3803)
- prepare patch release 0.44.1 by
[@&#8203;tyler-french](https://togithub.com/tyler-french) in
[https://github.com/bazelbuild/rules_go/pull/3804](https://togithub.com/bazelbuild/rules_go/pull/3804)

**Full Changelog**:
bazel-contrib/rules_go@v0.44.0...v0.44.1

</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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

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

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMDAuMCIsInVwZGF0ZWRJblZlciI6IjM2LjEwMC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: Self-hosted Renovate Bot <361546+cgrindel-self-hosted-renovate[bot]@users.noreply.github.enterprise.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.

2 participants