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

Run nogo in a separate validation action #3995

Merged
merged 32 commits into from
Aug 6, 2024
Merged

Run nogo in a separate validation action #3995

merged 32 commits into from
Aug 6, 2024

Conversation

fmeum
Copy link
Member

@fmeum fmeum commented Jul 26, 2024

What type of PR is this?

Feature

What does this PR do? Why is it needed?

nogo is run in a separate action that can be toggled with --run_validations. This avoids rerunning compilation if the nogo tool changes and also allows to collect nogo findings of targets that depend on other targets that themselves have nogo findings (with --keep_going).

Which issues(s) does this PR fix?

Fixes #3619
Fixes #3695
Fixes #3846
Closes #3707

Other notes for review

@fmeum fmeum force-pushed the extract-nogo branch 2 times, most recently from 80ba35c to 296eddd Compare July 26, 2024 14:34
@fmeum
Copy link
Member Author

fmeum commented Jul 27, 2024

@joeljeske Sorry for the long delay, but this should finally be ready (and is certainly heavily inspired by your PR!).

@fmeum fmeum marked this pull request as ready for review July 27, 2024 17:45
@fmeum
Copy link
Member Author

fmeum commented Jul 27, 2024

CC @tingilee as you raised the original issue

go/tools/builders/nogo_validation.go Outdated Show resolved Hide resolved
go/private/actions/compilepkg.bzl Outdated Show resolved Hide resolved
go/tools/builders/nogo.go Outdated Show resolved Hide resolved
go/tools/builders/nogo.go Outdated Show resolved Hide resolved
go/tools/builders/compilepkg.go Show resolved Hide resolved
@fmeum fmeum requested a review from linzhp July 27, 2024 22:04
go/tools/builders/constants.go Outdated Show resolved Hide resolved
@fmeum fmeum requested a review from linzhp July 29, 2024 09:03
Copy link
Contributor

@sluongng sluongng left a comment

Choose a reason for hiding this comment

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

Few nits, but the current approach lgtm

go/tools/builders/compilepkg.go Show resolved Hide resolved
go/tools/builders/compilepkg.go Show resolved Hide resolved
go/tools/builders/constants.go Show resolved Hide resolved
Copy link
Contributor

@sluongng sluongng left a comment

Choose a reason for hiding this comment

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

Lgtm. Let's ship this while the pr is still small 😂

@fmeum fmeum merged commit 29d4e5d into master Aug 6, 2024
5 checks passed
@fmeum fmeum deleted the extract-nogo branch August 6, 2024 20:12
cgrindel-self-hosted-renovate bot referenced this pull request in cgrindel/bazel-starlib Aug 30, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://redirect.github.com/bazelbuild/rules_go) |
http_archive | minor | `v0.49.0` -> `v0.50.0` |

---

### Release Notes

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

###
[`v0.50.0`](https://redirect.github.com/bazelbuild/rules_go/releases/tag/v0.50.0)

[Compare
Source](https://redirect.github.com/bazelbuild/rules_go/compare/v0.49.0...v0.50.0)

#### `WORKSPACE` code

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

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"67b4d1f517ba73e0a92eb2f57d821f2ddc21f5bc2bd7a231573f11bd8758192e",
        urls = [

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

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

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

    go_rules_dependencies()

    go_register_toolchains(version = "1.23.0")

#### What's Changed

- Break reliance on GOROOT_FINAL by
[@&#8203;JacobOaks](https://redirect.github.com/JacobOaks) in
[https://github.com/bazelbuild/rules_go/pull/3984](https://redirect.github.com/bazelbuild/rules_go/pull/3984)
- Migrate to macos_arm64 by
[@&#8203;meteorcloudy](https://redirect.github.com/meteorcloudy) in
[https://github.com/bazelbuild/rules_go/pull/3990](https://redirect.github.com/bazelbuild/rules_go/pull/3990)
- Support matching release candidate toolchain versions by
[@&#8203;JacobOaks](https://redirect.github.com/JacobOaks) in
[https://github.com/bazelbuild/rules_go/pull/3998](https://redirect.github.com/bazelbuild/rules_go/pull/3998)
- rm crosstool by
[@&#8203;sluongng](https://redirect.github.com/sluongng) in
[https://github.com/bazelbuild/rules_go/pull/3986](https://redirect.github.com/bazelbuild/rules_go/pull/3986)
- fix(timeout.go): remove redundant leaked go func in
RegisterTimeoutHandler by
[@&#8203;Roytangrb](https://redirect.github.com/Roytangrb) in
[https://github.com/bazelbuild/rules_go/pull/4004](https://redirect.github.com/bazelbuild/rules_go/pull/4004)
- Run nogo in a separate validation action by
[@&#8203;fmeum](https://redirect.github.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3995](https://redirect.github.com/bazelbuild/rules_go/pull/3995)

#### New Contributors

- [@&#8203;JacobOaks](https://redirect.github.com/JacobOaks) made their
first contribution in
[https://github.com/bazelbuild/rules_go/pull/3984](https://redirect.github.com/bazelbuild/rules_go/pull/3984)
- [@&#8203;Roytangrb](https://redirect.github.com/Roytangrb) made their
first contribution in
[https://github.com/bazelbuild/rules_go/pull/4004](https://redirect.github.com/bazelbuild/rules_go/pull/4004)

**Full Changelog**:
bazel-contrib/rules_go@release-0.49...release-0.50

</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://redirect.github.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://redirect.github.com/renovatebot/renovate).

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

Co-authored-by: cgrindel-self-hosted-renovate[bot] <139595543+cgrindel-self-hosted-renovate[bot]@users.noreply.github.com>
renovate bot referenced this pull request in kreempuff/rules_unreal_engine Aug 30, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [io_bazel_rules_go](https://togithub.com/bazelbuild/rules_go) |
http_archive | minor | `v0.49.0` -> `v0.50.0` |

---

> [!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.50.0`](https://togithub.com/bazelbuild/rules_go/releases/tag/v0.50.0)

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

#### `WORKSPACE` code

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

    http_archive(
        name = "io_bazel_rules_go",
sha256 =
"67b4d1f517ba73e0a92eb2f57d821f2ddc21f5bc2bd7a231573f11bd8758192e",
        urls = [

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

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

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

    go_rules_dependencies()

    go_register_toolchains(version = "1.23.0")

#### What's Changed

- Break reliance on GOROOT_FINAL by
[@&#8203;JacobOaks](https://togithub.com/JacobOaks) in
[https://github.com/bazelbuild/rules_go/pull/3984](https://togithub.com/bazelbuild/rules_go/pull/3984)
- Migrate to macos_arm64 by
[@&#8203;meteorcloudy](https://togithub.com/meteorcloudy) in
[https://github.com/bazelbuild/rules_go/pull/3990](https://togithub.com/bazelbuild/rules_go/pull/3990)
- Support matching release candidate toolchain versions by
[@&#8203;JacobOaks](https://togithub.com/JacobOaks) in
[https://github.com/bazelbuild/rules_go/pull/3998](https://togithub.com/bazelbuild/rules_go/pull/3998)
- rm crosstool by [@&#8203;sluongng](https://togithub.com/sluongng) in
[https://github.com/bazelbuild/rules_go/pull/3986](https://togithub.com/bazelbuild/rules_go/pull/3986)
- fix(timeout.go): remove redundant leaked go func in
RegisterTimeoutHandler by
[@&#8203;Roytangrb](https://togithub.com/Roytangrb) in
[https://github.com/bazelbuild/rules_go/pull/4004](https://togithub.com/bazelbuild/rules_go/pull/4004)
- Run nogo in a separate validation action by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[https://github.com/bazelbuild/rules_go/pull/3995](https://togithub.com/bazelbuild/rules_go/pull/3995)

#### New Contributors

- [@&#8203;JacobOaks](https://togithub.com/JacobOaks) made their first
contribution in
[https://github.com/bazelbuild/rules_go/pull/3984](https://togithub.com/bazelbuild/rules_go/pull/3984)
- [@&#8203;Roytangrb](https://togithub.com/Roytangrb) made their first
contribution in
[https://github.com/bazelbuild/rules_go/pull/4004](https://togithub.com/bazelbuild/rules_go/pull/4004)

**Full Changelog**:
bazel-contrib/rules_go@release-0.49...release-0.50

</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 was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/kreempuff/rules_unreal_engine).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants