From e50870d65e02151c7d3e461093da860c401fcfef Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Tue, 12 Sep 2023 16:53:20 +0200 Subject: [PATCH 1/4] Update gazelle/deps.bzl `bazel run :update_go_deps` wasn't run when rules_go was updated --- MODULE.bazel | 1 - gazelle/deps.bzl | 58 +++++++++++++++++++++++++----------------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 7d26a810..bf46cca0 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -25,7 +25,6 @@ use_repo( go_deps, "com_github_bazelbuild_buildtools", "com_github_bmatcuk_doublestar_v4", - "com_github_google_go_cmp", "in_gopkg_yaml_v2", ) diff --git a/gazelle/deps.bzl b/gazelle/deps.bzl index 9fd9df06..5b45dd79 100644 --- a/gazelle/deps.bzl +++ b/gazelle/deps.bzl @@ -21,26 +21,26 @@ def gazelle_deps(): go_repository( name = "com_github_bazelbuild_bazel_gazelle", importpath = "github.com/bazelbuild/bazel-gazelle", - sum = "h1:sPdMMujcMt5jeSLGFko5yF1XBD5MDqm6YeFoXx9ORm4=", - version = "v0.28.0", + sum = "h1:WnJGYk1bMIjw8FCYA/UxKBK/Y6hUnOItrtR+vjFIIKo=", + version = "v0.33.0", ) go_repository( name = "com_github_bazelbuild_buildtools", importpath = "github.com/bazelbuild/buildtools", - sum = "h1:jhiMzJ+8unnLRtV8rpbWBFE9pFNzIqgUTyZU5aA++w8=", - version = "v0.0.0-20221004120235-7186f635531b", + sum = "h1:6Z/4LXt5mdhuFAx4QhwM0D5pTs1ljYGmhgF3O9OCMF0=", + version = "v0.0.0-20230831140646-386244e73fc4", ) go_repository( name = "com_github_bazelbuild_rules_go", importpath = "github.com/bazelbuild/rules_go", - sum = "h1:ViPR65vOrg74JKntAUFY6qZkheBKGB6to7wFd8gCRU4=", - version = "v0.35.0", + sum = "h1:JzlRxsFNhlX+g4drDRPhIaU5H5LnI978wdMJ0vK4I+k=", + version = "v0.41.0", ) go_repository( name = "com_github_bmatcuk_doublestar_v4", importpath = "github.com/bmatcuk/doublestar/v4", - sum = "h1:Qu+u9wR3Vd89LnlLMHvnZ5coJMWKQamqdz9/p5GNthA=", - version = "v4.2.0", + sum = "h1:HTuxyug8GyFbRkrffIpzNCSK4luc0TY3wzXvzIZhEXc=", + version = "v4.6.0", ) go_repository( name = "com_github_burntsushi_toml", @@ -123,12 +123,7 @@ def gazelle_deps(): sum = "h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=", version = "v0.5.9", ) - go_repository( - name = "com_github_pelletier_go_toml", - importpath = "github.com/pelletier/go-toml", - sum = "h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=", - version = "v1.9.5", - ) + go_repository( name = "com_github_pmezard_go_difflib", importpath = "github.com/pmezard/go-difflib", @@ -187,8 +182,8 @@ def gazelle_deps(): go_repository( name = "org_golang_google_grpc", importpath = "google.golang.org/grpc", - sum = "h1:rRYRFMVgRv6E0D70Skyfsr28tDXIuuPZyWGMPdMcnXg=", - version = "v1.27.0", + sum = "h1:fPVVDxY9w++VjTZsYvXWqEf9Rqar/e+9zYfxKK+W+YU=", + version = "v1.50.0", ) go_repository( name = "org_golang_google_protobuf", @@ -218,14 +213,14 @@ def gazelle_deps(): go_repository( name = "org_golang_x_mod", importpath = "golang.org/x/mod", - sum = "h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=", - version = "v0.6.0", + sum = "h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc=", + version = "v0.12.0", ) go_repository( name = "org_golang_x_net", importpath = "golang.org/x/net", - sum = "h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0=", - version = "v0.1.0", + sum = "h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=", + version = "v0.8.0", ) go_repository( name = "org_golang_x_oauth2", @@ -236,29 +231,36 @@ def gazelle_deps(): go_repository( name = "org_golang_x_sync", importpath = "golang.org/x/sync", - sum = "h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=", - version = "v0.1.0", + sum = "h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=", + version = "v0.3.0", ) go_repository( name = "org_golang_x_sys", importpath = "golang.org/x/sys", - sum = "h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=", - version = "v0.1.0", + sum = "h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=", + version = "v0.12.0", ) go_repository( name = "org_golang_x_text", importpath = "golang.org/x/text", - sum = "h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=", - version = "v0.3.0", + sum = "h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k=", + version = "v0.3.3", ) go_repository( name = "org_golang_x_tools", importpath = "golang.org/x/tools", - sum = "h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE=", - version = "v0.2.0", + sum = "h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4=", + version = "v0.7.0", ) + go_repository( + name = "org_golang_x_tools_go_vcs", + importpath = "golang.org/x/tools/go/vcs", + sum = "h1:cOIJqWBl99H1dH5LWizPa+0ImeeJq3t3cJjaeOWUAL4=", + version = "v0.1.0-deprecated", + ) + go_repository( name = "org_golang_x_xerrors", importpath = "golang.org/x/xerrors", From e1d26352e33ffcf738e9f4bbca2ea7b8d81dbb54 Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Tue, 12 Sep 2023 17:00:52 +0200 Subject: [PATCH 2/4] Restore commented hashes --- internal_deps.bzl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal_deps.bzl b/internal_deps.bzl index 8a5e881f..872dc06d 100644 --- a/internal_deps.bzl +++ b/internal_deps.bzl @@ -6,7 +6,7 @@ def rules_erlang_internal_deps(): maybe( http_archive, name = "bazel_skylib", - # sha256 = "b8a1527901774180afc798aeb28c4634bdccf19c4d98e7bdd1ce79d1fe9aaad7", + sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz", "https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-1.4.2.tar.gz", @@ -16,7 +16,7 @@ def rules_erlang_internal_deps(): maybe( http_archive, name = "io_bazel_rules_go", - # sha256 = "6b65cb7917b4d1709f9410ffe00ecf3e160edf674b78c54a894471320862184f", + sha256 = "278b7ff5a826f3dc10f04feaf0b70d48b68748ccd512d7f98bf442077f043fe3", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.41.0/rules_go-v0.41.0.zip", @@ -26,7 +26,7 @@ def rules_erlang_internal_deps(): maybe( http_archive, name = "bazel_gazelle", - # sha256 = "ecba0f04f96b4960a5b250c8e8eeec42281035970aa8852dda73098274d14a1d", + sha256 = "d3fa66a39028e97d76f9e2db8f1b0c11c099e8e01bf363a923074784e451f809", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz", "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.33.0/bazel-gazelle-v0.33.0.tar.gz", From 6aafdc9e5be99bf04cf57be1e1194788ce5ff1c1 Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Tue, 12 Sep 2023 17:03:50 +0200 Subject: [PATCH 3/4] Also just build rules_erlang in CI --- .github/workflows/test.yaml | 47 +++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1f72aa5f..ebad4491 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,6 +6,47 @@ on: - bump-rbe pull_request: jobs: + build: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + otp: + - "25.3" + - "26.0" + steps: + - name: CHECKOUT + uses: actions/checkout@v4 + - name: CONFIGURE ERLANG + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + - name: BUILD + run: | + ERLANG_HOME="$(dirname $(dirname $(which erl)))" + bazelisk build //... \ + --noenable_bzlmod \ + --color=yes + build-bzlmod: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + otp: + - "25.3" + - "26.0" + steps: + - name: CHECKOUT + uses: actions/checkout@v4 + - name: CONFIGURE ERLANG + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} + - name: BUILD + run: | + ERLANG_HOME="$(dirname $(dirname $(which erl)))" + bazelisk build //... \ + --color=yes test: runs-on: ubuntu-20.04 strategy: @@ -26,7 +67,7 @@ jobs: run: | ERLANG_HOME="$(dirname $(dirname $(which erl)))" bazelisk test //... \ - --noexperimental_enable_bzlmod \ + --noenable_bzlmod \ --color=yes - name: RESOVLE TEST LOGS PATH if: always() @@ -77,7 +118,7 @@ jobs: set ERLANG_HOME=%ERL_PATH:\bin\erl.exe=% - bazelisk test //... --noexperimental_enable_bzlmod + bazelisk test //... --noenable_bzlmod - name: RESOVLE TEST LOGS PATH if: always() working-directory: test @@ -273,6 +314,8 @@ jobs: path: ${{ steps.resolve-test-logs-path.outputs.LOGS_PATH }}/* summary: needs: + - build + - build-bzlmod - test - test-windows - test-bzlmod From 3b786d9debce6303fa191f70c7d678675c4597ec Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Tue, 12 Sep 2023 17:09:04 +0200 Subject: [PATCH 4/4] fix broken reference --- gazelle/BUILD.bazel | 1 - 1 file changed, 1 deletion(-) diff --git a/gazelle/BUILD.bazel b/gazelle/BUILD.bazel index 9441aa41..4fe47931 100644 --- a/gazelle/BUILD.bazel +++ b/gazelle/BUILD.bazel @@ -42,7 +42,6 @@ go_library( "@bazel_gazelle//rule:go_default_library", "@com_github_bazelbuild_buildtools//build:go_default_library", "@com_github_bmatcuk_doublestar_v4//:doublestar", - "@com_github_google_go_cmp//cmp", "@in_gopkg_yaml_v2//:go_default_library", "@io_bazel_rules_go//go/tools/bazel:go_default_library", ],