Skip to content

Commit

Permalink
Fix examples with Bazel@HEAD (#500)
Browse files Browse the repository at this point in the history
Addressing #488

Failures mostly caused by
bazelbuild/bazel@5881c38
  • Loading branch information
meteorcloudy authored Sep 11, 2024
1 parent 922300e commit b3cd192
Show file tree
Hide file tree
Showing 10 changed files with 5,017 additions and 5,004 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ target/
node_modules
# Bazel lockfile
*MODULE.bazel.lock
# VScode
/.vscode/
1 change: 1 addition & 0 deletions android/firebase-cloud-messaging/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
common --enable_workspace
common --experimental_google_legacy_api
common --experimental_enable_android_migration_apis
# Necesary until bazel 7.2.0rc2 or later is released (https://github.com/bazelbuild/bazel/issues/22415)
Expand Down
1 change: 1 addition & 0 deletions android/ndk/.bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
common --enable_workspace
common --experimental_google_legacy_api
common --experimental_enable_android_migration_apis
# Necesary until bazel 7.2.0rc2 or later is released (https://github.com/bazelbuild/bazel/issues/22415)
Expand Down
6 changes: 3 additions & 3 deletions bzlmod/02-override_bazel_module/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ git_override(
remote = "https://github.com/meteorcloudy/gflags.git",
)

# Patch bazel skylib 1.2.0 with a local patch file.
bazel_dep(name = "bazel_skylib", version = "1.2.0")
# Patch bazel skylib 1.7.1 with a local patch file.
bazel_dep(name = "bazel_skylib", version = "1.7.1")
single_version_override(
module_name = "bazel_skylib",
patch_strip = 1,
patches = ["//:bazel_skylib.patch"],
version = "1.2.0",
version = "1.7.1",
)

# Depend on module lib_a at a local path.
Expand Down
4 changes: 2 additions & 2 deletions bzlmod/02-override_bazel_module/bazel_skylib.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ index dc7f0ef..47768d8 100644
--- a/version.bzl
+++ b/version.bzl
@@ -14,3 +14,4 @@
"""The version of bazel-skylib."""

version = "1.2.0"
# Keep in sync with MODULE.bazel and @bazel_skylib_gazelle_plugin//:MODULE.bazel
version = "1.7.1"
+hello_msg = "Hello skylib"
1 change: 1 addition & 0 deletions java-maven/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ bazel_dep(name = "aspect_bazel_lib", version = "2.8.1")
bazel_dep(name = "container_structure_test", version = "1.16.0")
bazel_dep(name = "rules_jvm_external", version = "5.3")
bazel_dep(name = "rules_oci", version = "1.4.0")
bazel_dep(name = "rules_java", version = "7.11.1")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
Expand Down
1 change: 1 addition & 0 deletions java-tutorial/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bazel_dep(name = "rules_java", version = "7.11.1")
3 changes: 3 additions & 0 deletions rules/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_python", version = "0.25.0")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "platforms", version = "0.0.10")

1 change: 1 addition & 0 deletions rust-examples/04-ffi/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module(

# https://github.com/bazelbuild/rules_rust/releases
bazel_dep(name = "rules_rust", version = "0.47.1")
bazel_dep(name = "rules_cc", version = "0.0.9")

# Rust toolchain
RUST_EDITION = "2021"
Expand Down
10,001 changes: 5,002 additions & 4,999 deletions rust-examples/04-ffi/MODULE.bazel.lock

Large diffs are not rendered by default.

0 comments on commit b3cd192

Please sign in to comment.