Skip to content

Commit

Permalink
fix: Fix broken head (#911)
Browse files Browse the repository at this point in the history
Closes #896

Bump all dependencies and set `--enable_workspace` since this is now
built with Bazel 8

I plan to come up with a few follow up PRs, for now this was my "minimal
changes" attempt to make head green.
  • Loading branch information
tonyaiuto authored Jan 13, 2025
2 parents 5c6aec6 + c6304b5 commit f2f0180
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 172 deletions.
2 changes: 1 addition & 1 deletion .bazelci/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ common: &common
tasks:
integration:
name: rolling_distro
platform: ubuntu1804
platform: ubuntu2204
<<: *common
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build --enable_workspace
12 changes: 6 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ module(
)

# Do not update to newer versions until you need a specific new feature.
bazel_dep(name = "rules_license", version = "0.0.7")
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_python", version = "1.0.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")

# Only for development
bazel_dep(name = "platforms", version = "0.0.9", dev_dependency = True)
bazel_dep(name = "rules_cc", version = "0.0.9", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True)
bazel_dep(name = "platforms", version = "0.0.10", dev_dependency = True)
bazel_dep(name = "rules_cc", version = "0.0.17", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.7.2", dev_dependency = True)

# Find the system rpmbuild if one is available.
find_rpm = use_extension("//toolchains/rpm:rpmbuild_configure.bzl", "find_system_rpmbuild_bzlmod", dev_dependency = True)
Expand Down
16 changes: 8 additions & 8 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "platforms",
sha256 = "5eda539c841265031c2f82d8ae7a3a6490bd62176e0c038fc469eabf91f6149b",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
urls = [
"https://github.com/bazelbuild/platforms/releases/download/0.0.9/platforms-0.0.9.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
)

Expand All @@ -60,10 +60,10 @@ experimental_find_system_git(

http_archive(
name = "bazel_stardoc",
sha256 = "c9794dcc8026a30ff67cf7cf91ebe245ca294b20b071845d12c192afe243ad72",
sha256 = "0e1ed4a98f26e718776bd64d053d02bb34d98572ccd03d6ba355112a1205706b",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.5.0/stardoc-0.5.0.tar.gz",
"https://github.com/bazelbuild/stardoc/releases/download/0.5.0/stardoc-0.5.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/stardoc/releases/download/0.7.2/stardoc-0.7.2.tar.gz",
"https://github.com/bazelbuild/stardoc/releases/download/0.7.2/stardoc-0.7.2.tar.gz",
],
)

Expand All @@ -73,9 +73,9 @@ stardoc_repositories()

http_archive(
name = "rules_cc",
sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf",
strip_prefix = "rules_cc-0.0.9",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"],
sha256 = "abc605dd850f813bb37004b77db20106a19311a96b2da1c92b789da529d28fe1",
strip_prefix = "rules_cc-0.0.17",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.17/rules_cc-0.0.17.tar.gz"],
)

load("@rules_cc//cc:repositories.bzl", "rules_cc_dependencies")
Expand Down
3 changes: 1 addition & 2 deletions distro/packaging_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def testVersionsMatch(self):
content = inp.read()
if _VERBOSE:
print('=== Expect', want)
module_block_re = re.compile
m = re.search(
r"""module\([^)]+\)""",
content,
Expand Down Expand Up @@ -92,7 +91,7 @@ def CopyTestFile(source_name, dest_name):
CopyTestFile('BUILD.tpl', 'BUILD')

os.chdir(tempdir)
build_result = subprocess.check_output(['bazel', 'build', ':dummy_tar'])
build_result = subprocess.check_output(['bazel', 'build', '--enable_workspace', ':dummy_tar'])
if _VERBOSE:
print('=== Build Result ===')
print(build_result)
Expand Down
11 changes: 0 additions & 11 deletions doc_build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,11 @@ filegroup(
srcs = [
"BUILD",
] + glob([
"*.bzl",
"*.py",
]),
visibility = ["//distro:__pkg__"],
)

exports_files(
glob([
"*.bzl",
]),
visibility = [
"//distro:__pkg__",
"//doc_build:__pkg__",
],
)

# pairs of rule name and the source file to get it from
# buildifier: leave-alone, do not sort
ORDER = [
Expand Down
13 changes: 7 additions & 6 deletions examples/naming_package_files/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ module(
version = "0.0.1",
)

# Temporarilly using WORKSPACE.bzlmod until CI switches to bazel past 7.0.0
#local_path_override(
# module_name = "rules_pkg",
# path = "../..",
#)
bazel_dep(name = "rules_pkg")
local_path_override(
module_name = "rules_pkg",
path = "../..",
)

bazel_dep(name = "rules_cc", version = "0.0.2")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.0.17")
33 changes: 0 additions & 33 deletions examples/naming_package_files/WORKSPACE

This file was deleted.

8 changes: 0 additions & 8 deletions examples/naming_package_files/WORKSPACE.bzlmod

This file was deleted.

13 changes: 13 additions & 0 deletions examples/rich_structure/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module(
name = "rules_pkg_examples",
version = "0.0.1",
)

bazel_dep(name = "rules_pkg")
local_path_override(
module_name = "rules_pkg",
path = "../..",
)

bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "rules_cc", version = "0.0.17")
37 changes: 0 additions & 37 deletions examples/rich_structure/WORKSPACE

This file was deleted.

10 changes: 10 additions & 0 deletions examples/time_stamping/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module(
name = "rules_pkg_examples",
version = "0.0.1",
)

bazel_dep(name = "rules_pkg")
local_path_override(
module_name = "rules_pkg",
path = "../..",
)
24 changes: 0 additions & 24 deletions examples/time_stamping/WORKSPACE

This file was deleted.

10 changes: 10 additions & 0 deletions examples/where_is_my_output/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module(
name = "rules_pkg_examples",
version = "0.0.1",
)

bazel_dep(name = "rules_pkg")
local_path_override(
module_name = "rules_pkg",
path = "../..",
)
24 changes: 0 additions & 24 deletions examples/where_is_my_output/WORKSPACE

This file was deleted.

24 changes: 12 additions & 12 deletions pkg/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,36 @@ def http_archive(**kwargs):
def rules_pkg_dependencies():
http_archive(
name = "bazel_skylib",
sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa",
sha256 = "bc283cdfcd526a52c3201279cda4bc298652efa898b10b4db0837dc51652756f",
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.2/bazel-skylib-1.4.2.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz",
],
)

http_archive(
name = "platforms",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.10/platforms-0.0.10.tar.gz",
],
sha256 = "3a561c99e7bdbe9173aa653fd579fe849f1d8d67395780ab4770b1f381431d51",
sha256 = "218efe8ee736d26a3572663b374a253c012b716d8af0c07e842e82f238a0a7ee",
)

http_archive(
name = "rules_python",
sha256 = "0a8003b044294d7840ac7d9d73eef05d6ceb682d7516781a4ec62eeb34702578",
strip_prefix = "rules_python-0.24.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.24.0/rules_python-0.24.0.tar.gz",
sha256 = "4f7e2aa1eb9aa722d96498f5ef514f426c1f55161c3c9ae628c857a7128ceb07",
strip_prefix = "rules_python-1.0.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/1.0.0/rules_python-1.0.0.tar.gz",
)

http_archive(
name = "rules_license",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz",
"https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/1.0.0/rules_license-1.0.0.tar.gz",
"https://github.com/bazelbuild/rules_license/releases/download/1.0.0/rules_license-1.0.0.tar.gz",
],
sha256 = "4531deccb913639c30e5c7512a054d5d875698daeb75d8cf90f284375fe7c360",
sha256 = "26d4021f6898e23b82ef953078389dd49ac2b5618ac564ade4ef87cced147b38",
)

def rules_pkg_register_toolchains():
Expand Down

0 comments on commit f2f0180

Please sign in to comment.