Skip to content

Commit

Permalink
fix: CI shouldn't skip the root folder for bzlmod (#219)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle authored May 4, 2023
1 parent 0efc512 commit 38f819e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ jobs:

bzlmodEnabled: [true, false]
exclude:
# Broken due to stardoc usage, see
# https://github.com/bazelbuild/stardoc/issues/117#issuecomment-1380744704
- folder: .
bzlmodEnabled: true
# Don't test bzlmod with Bazel 5 (not supported)
- bazelversion: 5.3.2
bzlmodEnabled: true
Expand Down
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary")

gazelle_binary(
name = "gazelle_bin",
languages = ["@bazel_skylib//gazelle/bzl"],
languages = ["@bazel_skylib_gazelle_plugin//bzl"],
)

# gazelle:exclude examples/**
Expand Down
7 changes: 5 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ module(
version = "0.0.0",
)

bazel_dep(name = "aspect_bazel_lib", version = "1.28.0")
bazel_dep(name = "aspect_bazel_lib", version = "1.30.2")
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "rules_pkg", version = "0.7.0", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.5")

oci = use_extension("//oci:extensions.bzl", "oci")
oci.toolchains(crane_version = "v0.14.0")
use_repo(oci, "oci_crane_toolchains", "oci_crane_registry_toolchains", "oci_auth_config")

register_toolchains("@oci_crane_toolchains//:all", "@oci_crane_registry_toolchains//:all")

bazel_dep(name = "rules_pkg", version = "0.7.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.29.0", repo_name = "bazel_gazelle", dev_dependency = True)
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True)
6 changes: 6 additions & 0 deletions internal_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def rules_oci_internal_deps():
],
)

http_archive(
name = "bazel_skylib_gazelle_plugin",
sha256 = "0a466b61f331585f06ecdbbf2480b9edf70e067a53f261e0596acd573a7d2dc3",
urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-gazelle-plugin-1.4.1.tar.gz"],
)

http_archive(
name = "io_bazel_stardoc",
sha256 = "c9794dcc8026a30ff67cf7cf91ebe245ca294b20b071845d12c192afe243ad72",
Expand Down
4 changes: 3 additions & 1 deletion oci/private/pull.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,9 @@ buildozer 'set digest "sha256:{digest}"' 'remove tag' 'remove platforms' {option
name = rctx.attr.name,
target_name = rctx.attr.target_name,
platform_map = {
str(k): v
# Workaround bug in Bazel 6.1.0, see
# https://github.com/bazel-contrib/rules_oci/issues/221
str(k).replace("@@", "@"): v
for k, v in rctx.attr.platforms.items()
},
)
Expand Down

0 comments on commit 38f819e

Please sign in to comment.