Skip to content

Commit

Permalink
chore: finish migration to bzlmod
Browse files Browse the repository at this point in the history
- bump bazel to 6.4.0
- bump rules_go, gazelle, platforms
- enable bzlmod
- remove WORKSPACE
- remove `gofmt`, github.com//issues/136
- remove Go MacOS x86_64 tests, github.com//issues/10
  • Loading branch information
Motiejus Jakštys committed Dec 14, 2023
1 parent f3c605e commit 5ee87d5
Show file tree
Hide file tree
Showing 14 changed files with 2,114 additions and 739 deletions.
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
common --enable_bzlmod

test --sandbox_default_allow_network=false
test --test_output=errors

Expand All @@ -7,4 +9,4 @@ build --worker_sandboxing
build --experimental_reuse_sandbox_directories
build --incompatible_enable_cc_toolchain_resolution
build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
build --experimental_output_directory_naming_scheme=diff_against_baseline
build --experimental_output_directory_naming_scheme=diff_against_dynamic_baseline
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.0
6.4.0
29 changes: 26 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ module(
version = "2.1.3",
)

bazel_dep(name = "platforms", version = "0.0.6")
bazel_dep(name = "platforms", version = "0.0.8")

bazel_dep(name = "rules_go", version = "0.41.0", dev_dependency = True)
bazel_dep(name = "rules_go", version = "0.43.0", dev_dependency = True)

go_sdk = use_extension(
"@rules_go//go:extensions.bzl",
Expand All @@ -14,7 +14,7 @@ go_sdk = use_extension(
)
use_repo(go_sdk, "go_default_sdk")

bazel_dep(name = "gazelle", version = "0.32.0", dev_dependency = True)
bazel_dep(name = "gazelle", version = "0.34.0", dev_dependency = True)

go_deps = use_extension(
"@gazelle//:extensions.bzl",
Expand All @@ -24,5 +24,28 @@ go_deps = use_extension(
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_stretchr_testify",
"com_github_bazelbuild_buildtools",
)

toolchains = use_extension("//toolchain:ext.bzl", "toolchains")
use_repo(toolchains, "zig_sdk")

register_toolchains(
# if no `--platform` is specified, these toolchains will be used for
# (linux,darwin,windows)x(amd64,arm64)
"@zig_sdk//toolchain:linux_amd64_gnu.2.28",
"@zig_sdk//toolchain:linux_arm64_gnu.2.28",
"@zig_sdk//toolchain:darwin_amd64",
"@zig_sdk//toolchain:darwin_arm64",
"@zig_sdk//toolchain:windows_amd64",
"@zig_sdk//toolchain:windows_arm64",

# amd64 toolchains for libc-aware platforms:
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.28",
"@zig_sdk//libc_aware/toolchain:linux_amd64_gnu.2.31",
"@zig_sdk//libc_aware/toolchain:linux_amd64_musl",
# arm64 toolchains for libc-aware platforms:
"@zig_sdk//libc_aware/toolchain:linux_arm64_gnu.2.28",
"@zig_sdk//libc_aware/toolchain:linux_arm64_musl",
)
Loading

0 comments on commit 5ee87d5

Please sign in to comment.