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

respect global strip config #3527

Merged
merged 4 commits into from
May 5, 2023

Conversation

malt3
Copy link
Contributor

@malt3 malt3 commented Apr 11, 2023

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

The docs currently state:

Strips symbols from compiled packages and linked binaries (using the -w flag). May also be set with the --strip command line option, which affects C/C++ targets, too.

This is not true. This option cannot be set at all (as far as I can tell). It is currently not exposed as a config flag and the global bazel option for stripping is not considered either.
This PR removes the @io_bazel_rules_go//go/config:strip config setting and always uses the global bazel setting --strip and --compilation_mode to deduce if stripping should be enabled.
As a little extension, I also changed the linker flags to also include -s if stripping is enabled.

Which issues(s) does this PR fix?

Fixes #3325

Other notes for review

This is one possible resolution. See also #3526 for an alternative solution that exposes this setting as a flag.

Copy link
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

This looks good to me, including the addition of the -s flag.

Given the very terse descriptions of the -s and -w flags in the go tool link documentation, could you add a test that verifies that stack traces in panics still have all the expected information?

Ideally that test would also check that stripping is enabled when it should be, which would probably have caught the typo below.

go/private/BUILD.bazel Outdated Show resolved Hide resolved
@malt3 malt3 force-pushed the fix/respect-global-strip-config branch from e223365 to aa458c7 Compare May 3, 2023 07:36
@malt3
Copy link
Contributor Author

malt3 commented May 3, 2023

could you add a test that verifies that stack traces in panics still have all the expected information

Yes! I'll try to get to it very soon.

Ideally that test would also check that stripping is enabled when it should be, which would probably have caught the typo below.

Do you know any simple, platform agnostic way to validate this? As far as I know, checking for a stripped binary involves parsing the OS-specific binary format (ELF, MACH-O, PE).

malt3 and others added 2 commits May 3, 2023 09:44
From go docs:

-s
	Omit the symbol table and debug information.

-w
	Omit the DWARF symbol table.
@malt3 malt3 force-pushed the fix/respect-global-strip-config branch from aa458c7 to 048f61d Compare May 3, 2023 07:44
@malt3
Copy link
Contributor Author

malt3 commented May 3, 2023

I implemented tests for ELF, MACH-O and PE. The checks for debug symbols in the resulting binaries are not very good and could certainly be improved if desired. I'm not sure where to go with this or what to test for in particular.

I also added tests to trigger a panic, recover from it and compare the stack trace against a known good stack trace.

Copy link
Collaborator

@fmeum fmeum left a comment

Choose a reason for hiding this comment

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

This is great test coverage. That will make it much easier to maintain this feature.

I see that the windows run is failing, but everything else looks good.

tests/core/strip/strip_test.go Outdated Show resolved Hide resolved
@malt3 malt3 force-pushed the fix/respect-global-strip-config branch from 7b11d6b to 0200a13 Compare May 3, 2023 15:59
@malt3
Copy link
Contributor Author

malt3 commented May 3, 2023

I see that the windows run is failing

EDIT: should work now.

This is the difference in output of readpe -S <binary>.exe between stripped vs non-stripped pe files.
I don't have a windows test environment to debug this properly but I'll try to get my hands on one. Maybe the values reported by the go pe library are off by some bit shift.

--- <unnamed>
+++ <unnamed>
@@ -13,7 +13,7 @@
                                              IMAGE_SCN_MEM_READ
     Section
         Name:                            .rdata
-        Virtual Size:                    0x9e3b0 (648112 bytes)
+        Virtual Size:                    0x9e3d0 (648144 bytes)
         Virtual Address:                 0x8f000
         Size Of Raw Data:                0x9e400 (648192 bytes)
         Pointer To Raw Data:             0x8d800
@@ -24,7 +24,7 @@
                                              IMAGE_SCN_MEM_READ
     Section
         Name:                            .data
-        Virtual Size:                    0x6f350 (455504 bytes)
+        Virtual Size:                    0x6f370 (455536 bytes)
         Virtual Address:                 0x12e000
         Size Of Raw Data:                0x17a00 (96768 bytes)
         Pointer To Raw Data:             0x12bc00
@@ -35,95 +35,11 @@
                                              IMAGE_SCN_MEM_READ
                                              IMAGE_SCN_MEM_WRITE
     Section
-        Name:                            /4
-        Virtual Size:                    0x127 (295 bytes)
-        Virtual Address:                 0x19e000
-        Size Of Raw Data:                0x200 (512 bytes)
-        Pointer To Raw Data:             0x143600
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
-        Name:                            /19
-        Virtual Size:                    0x1df6b (122731 bytes)
-        Virtual Address:                 0x19f000
-        Size Of Raw Data:                0x1e000 (122880 bytes)
-        Pointer To Raw Data:             0x143800
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
-        Name:                            /32
-        Virtual Size:                    0x5a27 (23079 bytes)
-        Virtual Address:                 0x1bd000
-        Size Of Raw Data:                0x5c00 (23552 bytes)
-        Pointer To Raw Data:             0x161800
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
-        Name:                            /46
-        Virtual Size:                    0x2c (44 bytes)
-        Virtual Address:                 0x1c3000
-        Size Of Raw Data:                0x200 (512 bytes)
-        Pointer To Raw Data:             0x167400
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
-        Name:                            /65
-        Virtual Size:                    0x388f0 (231664 bytes)
-        Virtual Address:                 0x1c4000
-        Size Of Raw Data:                0x38a00 (231936 bytes)
-        Pointer To Raw Data:             0x167600
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
-        Name:                            /78
-        Virtual Size:                    0x1ccc3 (117955 bytes)
-        Virtual Address:                 0x1fd000
-        Size Of Raw Data:                0x1ce00 (118272 bytes)
-        Pointer To Raw Data:             0x1a0000
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
-        Name:                            /90
-        Virtual Size:                    0x974f (38735 bytes)
-        Virtual Address:                 0x21a000
-        Size Of Raw Data:                0x9800 (38912 bytes)
-        Pointer To Raw Data:             0x1bce00
-        Number Of Relocations:           0
-        Characteristics:                 0x42100040
-        Characteristic Names
-                                             IMAGE_SCN_CNT_INITIALIZED_DATA
-                                             IMAGE_SCN_MEM_DISCARDABLE
-                                             IMAGE_SCN_MEM_READ
-    Section
         Name:                            .idata
         Virtual Size:                    0x490 (1168 bytes)
-        Virtual Address:                 0x224000
+        Virtual Address:                 0x19e000
         Size Of Raw Data:                0x600 (1536 bytes)
-        Pointer To Raw Data:             0x1c6600
+        Pointer To Raw Data:             0x143600
         Number Of Relocations:           0
         Characteristics:                 0xc0000040
         Characteristic Names
@@ -133,9 +49,9 @@
     Section
         Name:                            .reloc
         Virtual Size:                    0x2f06 (12038 bytes)
-        Virtual Address:                 0x225000
+        Virtual Address:                 0x19f000
         Size Of Raw Data:                0x3000 (12288 bytes)
-        Pointer To Raw Data:             0x1c6c00
+        Pointer To Raw Data:             0x143c00
         Number Of Relocations:           0
         Characteristics:                 0x42000040
         Characteristic Names
@@ -144,10 +60,10 @@
                                              IMAGE_SCN_MEM_READ
     Section
         Name:                            .symtab
-        Virtual Size:                    0x17e7a (97914 bytes)
-        Virtual Address:                 0x228000
-        Size Of Raw Data:                0x18000 (98304 bytes)
-        Pointer To Raw Data:             0x1c9c00
+        Virtual Size:                    0x4 (4 bytes)
+        Virtual Address:                 0x1a2000
+        Size Of Raw Data:                0x200 (512 bytes)
+        Pointer To Raw Data:             0x146c00
         Number Of Relocations:           0
         Characteristics:                 0x42000000
         Characteristic Names

@malt3 malt3 force-pushed the fix/respect-global-strip-config branch from 0200a13 to 65e9f50 Compare May 3, 2023 16:20
@malt3
Copy link
Contributor Author

malt3 commented May 3, 2023

Should there be a warning to users like @linzhp since we change the default mode to strip (as a result of respecting the global defaults)?

@linzhp
Copy link
Contributor

linzhp commented May 3, 2023

Thanks for letting me know. We can pull this into Uber's Go repo and test it

@fmeum
Copy link
Collaborator

fmeum commented May 3, 2023

We should definitely mention this in the release notes. Since we are preserving debug information and -c opt builds with default settings aren't affected, I would have said that's sufficient, but would like to hear what @linzhp and @achew22 think.

@linzhp
Copy link
Contributor

linzhp commented May 4, 2023

Should we also pass -dwarf=false to the Go compiler when go.mode.strip is True?

@malt3
Copy link
Contributor Author

malt3 commented May 4, 2023

I'm not sure I can make a statement on the behavior with regards to the bazel cache when setting -dwarf=false.
Or to rephrase:
Could this lead to missing dwarf info if I first build a stripped binary and then rebuild with debugging info? Maybe someone more experienced with the internals can comment.

This discussion has some stats on the performance impact of dwarf generation: golang/go#38777
Not a huge difference, but not nothing either so I'd be happy to add the flag.

@linzhp
Copy link
Contributor

linzhp commented May 4, 2023

Bazel would rebuild everything when switching from -c fastbuild to -c dbg. In addition, -c dbg adds -N -l to the compiler, which makes it unnecessary to generate dwarf symbols.

On the other hand, I am thinking about add -N -l to fastbuild too, to speed up the build. In that case, whether -dwarf is true or false no longer matters. Is that correct? @sywhang

Copy link
Contributor

@linzhp linzhp left a comment

Choose a reason for hiding this comment

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

All tests passed in Uber, after some fixes removing the usage of the old strip flag, and using transitions to dbg mode when debug symbols are needed.

@linzhp linzhp enabled auto-merge (squash) May 5, 2023 15:01
@linzhp linzhp merged commit c188072 into bazelbuild:master May 5, 2023
2 checks passed
@malt3 malt3 deleted the fix/respect-global-strip-config branch May 5, 2023 16:37
renovate bot added a commit to kreempuff/rules_unreal_engine that referenced this pull request Jun 22, 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 | minor | `v0.39.1` -> `v0.40.0` |

---

### ⚠ Dependency Lookup Warnings ⚠

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

---

### Release Notes

<details>
<summary>bazelbuild/rules_go</summary>

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

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

#### What's Changed

- Revert "Add automatic platform detection from inbound crosstool_top a…
by [@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3468
- bzlmod: Add dedicated documentation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3519
- Create TEST_SHARD_STATUS_FILE when sharding tests by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3547
- Move CI flags to .bazelrc and fix BwoB build by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3551
- Re-enable go_path_test on RBE by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3539
- nogo: provide usage doc by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3534
- respect global strip config by
[@&#8203;malt3](https://togithub.com/malt3) in
[bazelbuild/rules_go#3527
- stdliblist: return generated files by
[@&#8203;grampelberg](https://togithub.com/grampelberg) in
[bazelbuild/rules_go#3552
- Fix formatting in nogo usage doc by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3557
- Fix `goexperiment.*` build tags by
[@&#8203;lbcjbb](https://togithub.com/lbcjbb) in
[bazelbuild/rules_go#3556
- Remove tests for `go_path`'s `link` mode by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3565
- Fix tests with `--incompatible_disable_starlark_host_transitions` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3560
- Create empty `.go` file in a random location by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3566
- gopackagesdriver: fix interface to work with golangci-lint
([#&#8203;3523](https://togithub.com/bazelbuild/rules_go/issues/3523))
by [@&#8203;grampelberg](https://togithub.com/grampelberg) in
[bazelbuild/rules_go#3524
- Fix typo in load statement for bzlmod docs by
[@&#8203;Sovietaced](https://togithub.com/Sovietaced) in
[bazelbuild/rules_go#3570
- context: remove unused import by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3571
- docs: Mention `use_repo` automation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3573
- Test basic-gazelle example with incompatible flags by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3575
- go_sdk extension: create `go_host_compatible_sdk` repository by
[@&#8203;ylecornec](https://togithub.com/ylecornec) in
[bazelbuild/rules_go#3543
- docs: Mention that `gazelle:prefix` can be replaced by `go.mod` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3577
- go_download_sdk: apply extraction workaround to zips on non-windows
OSs by [@&#8203;jayconrod](https://togithub.com/jayconrod) in
[bazelbuild/rules_go#3563
- Fix `go_download_sdk` with Bazel dev versions by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3580
- Implement //nolint parsing similar to golangci-lint by
[@&#8203;patrickmscott](https://togithub.com/patrickmscott) in
[bazelbuild/rules_go#3562

#### New Contributors

- [@&#8203;bricedp](https://togithub.com/bricedp) made their first
contribution in
[bazelbuild/rules_go#3512
- [@&#8203;patrickmscott](https://togithub.com/patrickmscott) made their
first contribution in
[bazelbuild/rules_go#3528
- [@&#8203;grampelberg](https://togithub.com/grampelberg) made their
first contribution in
[bazelbuild/rules_go#3552
- [@&#8203;Sovietaced](https://togithub.com/Sovietaced) made their first
contribution in
[bazelbuild/rules_go#3570
- [@&#8203;ylecornec](https://togithub.com/ylecornec) made their first
contribution in
[bazelbuild/rules_go#3543

**Full Changelog**:
bazelbuild/rules_go@v0.39.1...v0.40.0

#### `WORKSPACE` code

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

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

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

"https://github.com/bazelbuild/rules_go/releases/download/v0.40.0/rules_go-v0.40.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.20.5")

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
renovate bot added a commit to cgrindel/rules_swift_package_manager that referenced this pull request Jun 23, 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 | minor | `v0.39.1` -> `v0.40.0` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_go</summary>

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

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

#### What's Changed

- Revert "Add automatic platform detection from inbound crosstool_top a…
by [@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3468
- bzlmod: Add dedicated documentation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3519
- Create TEST_SHARD_STATUS_FILE when sharding tests by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3547
- Move CI flags to .bazelrc and fix BwoB build by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3551
- Re-enable go_path_test on RBE by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3539
- nogo: provide usage doc by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3534
- respect global strip config by
[@&#8203;malt3](https://togithub.com/malt3) in
[bazelbuild/rules_go#3527
- stdliblist: return generated files by
[@&#8203;grampelberg](https://togithub.com/grampelberg) in
[bazelbuild/rules_go#3552
- Fix formatting in nogo usage doc by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3557
- Fix `goexperiment.*` build tags by
[@&#8203;lbcjbb](https://togithub.com/lbcjbb) in
[bazelbuild/rules_go#3556
- Remove tests for `go_path`'s `link` mode by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3565
- Fix tests with `--incompatible_disable_starlark_host_transitions` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3560
- Create empty `.go` file in a random location by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3566
- gopackagesdriver: fix interface to work with golangci-lint
([#&#8203;3523](https://togithub.com/bazelbuild/rules_go/issues/3523))
by [@&#8203;grampelberg](https://togithub.com/grampelberg) in
[bazelbuild/rules_go#3524
- Fix typo in load statement for bzlmod docs by
[@&#8203;Sovietaced](https://togithub.com/Sovietaced) in
[bazelbuild/rules_go#3570
- context: remove unused import by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3571
- docs: Mention `use_repo` automation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3573
- Test basic-gazelle example with incompatible flags by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3575
- go_sdk extension: create `go_host_compatible_sdk` repository by
[@&#8203;ylecornec](https://togithub.com/ylecornec) in
[bazelbuild/rules_go#3543
- docs: Mention that `gazelle:prefix` can be replaced by `go.mod` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3577
- go_download_sdk: apply extraction workaround to zips on non-windows
OSs by [@&#8203;jayconrod](https://togithub.com/jayconrod) in
[bazelbuild/rules_go#3563
- Fix `go_download_sdk` with Bazel dev versions by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3580
- Implement //nolint parsing similar to golangci-lint by
[@&#8203;patrickmscott](https://togithub.com/patrickmscott) in
[bazelbuild/rules_go#3562

#### New Contributors

- [@&#8203;bricedp](https://togithub.com/bricedp) made their first
contribution in
[bazelbuild/rules_go#3512
- [@&#8203;patrickmscott](https://togithub.com/patrickmscott) made their
first contribution in
[bazelbuild/rules_go#3528
- [@&#8203;grampelberg](https://togithub.com/grampelberg) made their
first contribution in
[bazelbuild/rules_go#3552
- [@&#8203;Sovietaced](https://togithub.com/Sovietaced) made their first
contribution in
[bazelbuild/rules_go#3570
- [@&#8203;ylecornec](https://togithub.com/ylecornec) made their first
contribution in
[bazelbuild/rules_go#3543

**Full Changelog**:
bazelbuild/rules_go@v0.39.1...v0.40.0

#### `WORKSPACE` code

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

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

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

"https://github.com/bazelbuild/rules_go/releases/download/v0.40.0/rules_go-v0.40.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.20.5")

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot added a commit to cgrindel/bazel-starlib that referenced this pull request Jun 23, 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 | minor | `v0.39.1` -> `v0.40.0` |

---

### Release Notes

<details>
<summary>bazelbuild/rules_go</summary>

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

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

#### What's Changed

- Revert "Add automatic platform detection from inbound crosstool_top a…
by [@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3468
- bzlmod: Add dedicated documentation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3519
- Create TEST_SHARD_STATUS_FILE when sharding tests by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3547
- Move CI flags to .bazelrc and fix BwoB build by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3551
- Re-enable go_path_test on RBE by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3539
- nogo: provide usage doc by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3534
- respect global strip config by
[@&#8203;malt3](https://togithub.com/malt3) in
[bazelbuild/rules_go#3527
- stdliblist: return generated files by
[@&#8203;grampelberg](https://togithub.com/grampelberg) in
[bazelbuild/rules_go#3552
- Fix formatting in nogo usage doc by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3557
- Fix `goexperiment.*` build tags by
[@&#8203;lbcjbb](https://togithub.com/lbcjbb) in
[bazelbuild/rules_go#3556
- Remove tests for `go_path`'s `link` mode by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3565
- Fix tests with `--incompatible_disable_starlark_host_transitions` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3560
- Create empty `.go` file in a random location by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3566
- gopackagesdriver: fix interface to work with golangci-lint
([#&#8203;3523](https://togithub.com/bazelbuild/rules_go/issues/3523))
by [@&#8203;grampelberg](https://togithub.com/grampelberg) in
[bazelbuild/rules_go#3524
- Fix typo in load statement for bzlmod docs by
[@&#8203;Sovietaced](https://togithub.com/Sovietaced) in
[bazelbuild/rules_go#3570
- context: remove unused import by
[@&#8203;sluongng](https://togithub.com/sluongng) in
[bazelbuild/rules_go#3571
- docs: Mention `use_repo` automation by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3573
- Test basic-gazelle example with incompatible flags by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3575
- go_sdk extension: create `go_host_compatible_sdk` repository by
[@&#8203;ylecornec](https://togithub.com/ylecornec) in
[bazelbuild/rules_go#3543
- docs: Mention that `gazelle:prefix` can be replaced by `go.mod` by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3577
- go_download_sdk: apply extraction workaround to zips on non-windows
OSs by [@&#8203;jayconrod](https://togithub.com/jayconrod) in
[bazelbuild/rules_go#3563
- Fix `go_download_sdk` with Bazel dev versions by
[@&#8203;fmeum](https://togithub.com/fmeum) in
[bazelbuild/rules_go#3580
- Implement //nolint parsing similar to golangci-lint by
[@&#8203;patrickmscott](https://togithub.com/patrickmscott) in
[bazelbuild/rules_go#3562

#### New Contributors

- [@&#8203;bricedp](https://togithub.com/bricedp) made their first
contribution in
[bazelbuild/rules_go#3512
- [@&#8203;patrickmscott](https://togithub.com/patrickmscott) made their
first contribution in
[bazelbuild/rules_go#3528
- [@&#8203;grampelberg](https://togithub.com/grampelberg) made their
first contribution in
[bazelbuild/rules_go#3552
- [@&#8203;Sovietaced](https://togithub.com/Sovietaced) made their first
contribution in
[bazelbuild/rules_go#3570
- [@&#8203;ylecornec](https://togithub.com/ylecornec) made their first
contribution in
[bazelbuild/rules_go#3543

**Full Changelog**:
bazelbuild/rules_go@v0.39.1...v0.40.0

#### `WORKSPACE` code

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

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

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

"https://github.com/bazelbuild/rules_go/releases/download/v0.40.0/rules_go-v0.40.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.20.5")

</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:eyJjcmVhdGVkSW5WZXIiOiIzNS4xMzEuMCIsInVwZGF0ZWRJblZlciI6IjM1LjEzMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

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.

Unrecognized build option errors when trying to use @io_bazel_rules_go//go/config:strip
3 participants