From 011048698db720e649e74c5e2f92a72ada2f068b Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Thu, 12 Oct 2023 11:39:38 -0700 Subject: [PATCH] chore: tighten up our bzlmod deps Also green up main CI by dropping windows for now (it fails because we don't have an Aspect CLI windows binary yet) --- .github/workflows/ci.yaml | 4 ++-- MODULE.bazel | 12 +++++++----- example/MODULE.bazel | 23 ++++++++--------------- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6fa3d640..7a55e0ba 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,5 +20,5 @@ jobs: uses: bazel-contrib/.github/.github/workflows/bazel.yaml@v5 with: folders: '[".", "example"]' - # Only test with Bazel 6 and bzlmod enabled - exclude: '[{"bazelversion": "5.4.0"}, {"bzlmodEnabled": false}]' + # Only test with Bazel 6 and bzlmod enabled. And we don't try for Windows support yet. + exclude: '[{"bazelversion": "5.4.0"}, {"bzlmodEnabled": false}, {"os": "windows-latest"}]' diff --git a/MODULE.bazel b/MODULE.bazel index efdaaabc..56e595cb 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -7,20 +7,22 @@ module( ) bazel_dep(name = "aspect_bazel_lib", version = "1.36.0") +# Needed in the root because we use js_lib_helpers in our aspect impl bazel_dep(name = "aspect_rules_js", version = "1.32.6") bazel_dep(name = "bazel_skylib", version = "1.4.1") bazel_dep(name = "platforms", version = "0.0.7") -bazel_dep(name = "rules_go", version = "0.39.1", dev_dependency = True) -bazel_dep(name = "gazelle", version = "0.31.0", dev_dependency = True) -bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True) - +# Needed in the root because we dereference ProtoInfo in our aspect impl bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +# Needed in the root because we dereference the toolchain in our aspect impl bazel_dep(name = "rules_buf", version = "0.1.1") - # Needed due to rules_proto leaking the dependency bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") +bazel_dep(name = "rules_go", version = "0.39.1", dev_dependency = True) +bazel_dep(name = "gazelle", version = "0.31.0", dev_dependency = True) +bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True) + go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps", dev_dependency = True) go_deps.from_file(go_mod = "//:go.mod") go_deps.gazelle_override( diff --git a/example/MODULE.bazel b/example/MODULE.bazel index 2189db9a..d6819adf 100644 --- a/example/MODULE.bazel +++ b/example/MODULE.bazel @@ -1,30 +1,23 @@ "Bazel dependencies" -bazel_dep(name = "aspect_rules_lint", version = "0.0.0", dev_dependency = True) -bazel_dep(name = "aspect_bazel_lib", version = "1.31.2", dev_dependency = True) -bazel_dep(name = "aspect_rules_js", version = "1.32.2", dev_dependency = True) -bazel_dep(name = "aspect_rules_ts", version = "1.3.3", dev_dependency = True) -bazel_dep(name = "rules_python", version = "0.26.0", dev_dependency = True) -bazel_dep(name = "bazel_skylib", version = "1.4.1", dev_dependency = True) - -# Needed due to rules_proto leaking the dependency -bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") +bazel_dep(name = "aspect_rules_lint", version = "0.0.0") +bazel_dep(name = "aspect_bazel_lib", version = "1.36.0") +bazel_dep(name = "aspect_rules_js", version = "1.32.6") +bazel_dep(name = "aspect_rules_ts", version = "1.3.3") +bazel_dep(name = "bazel_skylib", version = "1.4.2") bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "rules_python", version = "0.26.0") local_path_override( module_name = "aspect_rules_lint", path = "..", ) -rules_ts_ext = use_extension( - "@aspect_rules_ts//ts:extensions.bzl", - "ext", - dev_dependency = True, -) +rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext") rules_ts_ext.deps() use_repo(rules_ts_ext, "npm_typescript") -npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True) +npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm") npm.npm_translate_lock( name = "npm", npmrc = "//:.npmrc",