Skip to content

Conversation

@cgrindel
Copy link
Owner

  • Comment out unrecognized directive in go.mod.
  • Upgrade to Bazel 7.0.0.

Background

We started experiencing failures in CI on MacOS with the following error:

INFO: Analyzed target //:update_build_files (70 packages loaded, 9360 targets configured).
[17 / 84] [Sched] GoToolchainBinaryBuild external/go_sdk/builder [for tool]
ERROR: /private/var/tmp/_bazel_runner/3d3cdb00e25c4c831fb244d7b1b9e8aa/execroot/_main/_tmp/a0ea622e3550bf7395d7ecf5349e979d/_bazel_runner/36c732cd5df2c68b6ae27c8baae10911/external/go_sdk/BUILD.bazel:62:15: GoToolchainBinaryBuild external/go_sdk/builder [for tool] failed: (Exit 1): bash failed: error executing GoToolchainBinaryBuild command (from target @@go_sdk//:builder) 
  (cd /private/var/tmp/_bazel_runner/3d3cdb00e25c4c831fb244d7b1b9e8aa/execroot/_main/_tmp/a0ea622e3550bf7395d7ecf5349e979d/_bazel_runner/36c732cd5df2c68b6ae27c8baae10911/sandbox/darwin-sandbox/1/execroot/simple_example && \
  exec env - \
  /bin/bash -c 'GOMAXPROCS=1 GOCACHE=$(mktemp -d) GOPATH=$(mktemp -d) external/go_sdk/bin/go build -o bazel-out/darwin_x86_64-opt-exec-ST-13d3ddad9198/bin/external/go_sdk/builder -trimpath -ldflags '\''-X main.rulesGoStdlibPrefix=@io_bazel_rules_go//stdlib:'\'' external/io_bazel_rules_go/go/tools/builders/ar.go external/io_bazel_rules_go/go/tools/builders/asm.go external/io_bazel_rules_go/go/tools/builders/builder.go external/io_bazel_rules_go/go/tools/builders/cgo2.go external/io_bazel_rules_go/go/tools/builders/compilepkg.go external/io_bazel_rules_go/go/tools/builders/cover.go external/io_bazel_rules_go/go/tools/builders/edit.go external/io_bazel_rules_go/go/tools/builders/embedcfg.go external/io_bazel_rules_go/go/tools/builders/env.go external/io_bazel_rules_go/go/tools/builders/filter.go external/io_bazel_rules_go/go/tools/builders/filter_buildid.go external/io_bazel_rules_go/go/tools/builders/flags.go external/io_bazel_rules_go/go/tools/builders/generate_nogo_main.go external/io_bazel_rules_go/go/tools/builders/generate_test_main.go external/io_bazel_rules_go/go/tools/builders/importcfg.go external/io_bazel_rules_go/go/tools/builders/link.go external/io_bazel_rules_go/go/tools/builders/pack.go external/io_bazel_rules_go/go/tools/builders/read.go external/io_bazel_rules_go/go/tools/builders/replicate.go external/io_bazel_rules_go/go/tools/builders/stdlib.go external/io_bazel_rules_go/go/tools/builders/stdliblist.go external/io_bazel_rules_go/go/tools/builders/path.go')
# Configuration: d90ef54a4e8e6000bd1af389b371c2a8f808599da12ea7fb843ef6cb522e292b
# Execution platform: @@local_config_platform//:host

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
go: errors parsing go.mod:
/private/var/tmp/_bazel_runner/3d3cdb00e25c4c831fb244d7b1b9e8aa/execroot/_main/go.mod:5: unknown directive: toolchain
Target //:update_build_files failed to build

I believe that this is related to a bug in Gazelle. However, the workaround that we previously added does not fix the issue.

@cgrindel cgrindel self-assigned this Dec 16, 2023
@cgrindel cgrindel requested a review from luispadron December 16, 2023 19:12
@cgrindel cgrindel marked this pull request as ready for review December 16, 2023 19:12
@cgrindel cgrindel enabled auto-merge (squash) December 16, 2023 19:44
@cgrindel cgrindel merged commit 6f82321 into main Dec 16, 2023
@cgrindel cgrindel deleted the fix_go_in_ci_new branch December 16, 2023 20:26
renovate bot referenced this pull request in bazel-contrib/rules_bazel_integration_test Dec 18, 2023
…#259)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[rules_swift_package_manager](https://togithub.com/cgrindel/rules_swift_package_manager)
| http_archive | minor | `v0.23.0` -> `v0.24.0` |

---

### Release Notes

<details>
<summary>cgrindel/rules_swift_package_manager
(rules_swift_package_manager)</summary>

###
[`v0.24.0`](https://togithub.com/cgrindel/rules_swift_package_manager/releases/tag/v0.24.0)

[Compare
Source](https://togithub.com/cgrindel/rules_swift_package_manager/compare/v0.23.0...v0.24.0)

#### What's Changed

- chore(deps): update dependency
pointfreeco/swift-composable-architecture to from: "1.5.2" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/792](https://togithub.com/cgrindel/rules_swift_package_manager/pull/792)
- chore: update README.md for v0.23.0 by
[@&#8203;cgrindel-app-token-generator](https://togithub.com/cgrindel-app-token-generator)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/793](https://togithub.com/cgrindel/rules_swift_package_manager/pull/793)
- chore(deps): update dependency
pointfreeco/swift-composable-architecture to from: "1.5.3" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/794](https://togithub.com/cgrindel/rules_swift_package_manager/pull/794)
- chore(deps): update dependency vapor/vapor to v4.89.1 by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/795](https://togithub.com/cgrindel/rules_swift_package_manager/pull/795)
- chore(deps): update actions/setup-go action to v5 by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/785](https://togithub.com/cgrindel/rules_swift_package_manager/pull/785)
- chore(deps): update dependency onevcat/kingfisher to from: "7.10.1" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/796](https://togithub.com/cgrindel/rules_swift_package_manager/pull/796)
- chore(deps): update dependency stripe/stripe-ios to from: "23.19.0" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/775](https://togithub.com/cgrindel/rules_swift_package_manager/pull/775)
- chore(deps): update dependency
pointfreeco/swift-composable-architecture to from: "1.5.4" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/799](https://togithub.com/cgrindel/rules_swift_package_manager/pull/799)
- chore(deps): update dependency
pointfreeco/swift-composable-architecture to from: "1.5.5" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/802](https://togithub.com/cgrindel/rules_swift_package_manager/pull/802)
- chore(deps): update dependency firebase/firebase-ios-sdk to from:
"10.19.1" by
[@&#8203;cgrindel-self-hosted-renovate](https://togithub.com/cgrindel-self-hosted-renovate)
in
[https://github.com/cgrindel/rules_swift_package_manager/pull/807](https://togithub.com/cgrindel/rules_swift_package_manager/pull/807)
- fix: comment out the toolchain directive in `go.mod` by
[@&#8203;cgrindel](https://togithub.com/cgrindel) in
[https://github.com/cgrindel/rules_swift_package_manager/pull/811](https://togithub.com/cgrindel/rules_swift_package_manager/pull/811)
- fix: ensure that the generated resource bundle finder class has a
unique name by [@&#8203;cgrindel](https://togithub.com/cgrindel) in
[https://github.com/cgrindel/rules_swift_package_manager/pull/803](https://togithub.com/cgrindel/rules_swift_package_manager/pull/803)
- fix: update find commands to support GNU and FreeBSD flavors by
[@&#8203;cgrindel](https://togithub.com/cgrindel) in
[https://github.com/cgrindel/rules_swift_package_manager/pull/804](https://togithub.com/cgrindel/rules_swift_package_manager/pull/804)
- chore: add `merge_group` to CI workflow by
[@&#8203;cgrindel](https://togithub.com/cgrindel) in
[https://github.com/cgrindel/rules_swift_package_manager/pull/813](https://togithub.com/cgrindel/rules_swift_package_manager/pull/813)

**Full Changelog**:
cgrindel/rules_swift_package_manager@v0.23.0...v0.24.0

#### Bazel Module Snippet

```python
bazel_dep(name = "rules_swift_package_manager", version = "0.24.0")
```

#### Workspace Snippet

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

http_archive(
    name = "rules_swift_package_manager",
    sha256 = "8601b67f00ad29a47d2b7d37e4025231e41f72bcc52c3a78ab39720e014ab8ac",
    urls = [
        "https://github.com/cgrindel/rules_swift_package_manager/releases/download/v0.24.0/rules_swift_package_manager.v0.24.0.tar.gz",
    ],
)

load("@&#8203;rules_swift_package_manager//:deps.bzl", "swift_bazel_dependencies")

swift_bazel_dependencies()

load("@&#8203;cgrindel_bazel_starlib//:deps.bzl", "bazel_starlib_dependencies")

bazel_starlib_dependencies()

### MARK: - Gazelle
### gazelle:repo bazel_gazelle

load("@&#8203;bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("@&#8203;rules_swift_package_manager//:go_deps.bzl", "swift_bazel_go_dependencies")
load("@&#8203;io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

### Declare Go dependencies before calling go_rules_dependencies.
swift_bazel_go_dependencies()

go_rules_dependencies()

go_register_toolchains(version = "1.19.1")

gazelle_dependencies()

### MARK: - Swift Toolchain

http_archive(
    name = "build_bazel_rules_swift",

### Populate with your preferred release 
### https://github.com/bazelbuild/rules_swift/releases
)

load(
    "@&#8203;build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)
load("//:swift_deps.bzl", "swift_dependencies")

### gazelle:repository_macro swift_deps.bzl%swift_dependencies
swift_dependencies()

swift_rules_dependencies()

load(
    "@&#8203;build_bazel_rules_swift//swift:extras.bzl",
    "swift_rules_extra_dependencies",
)

swift_rules_extra_dependencies()
```

</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/bazel-contrib/rules_bazel_integration_test).

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

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.

3 participants