Skip to content

Commit 3f06d72

Browse files
committed
Fix build failures in bzlmod/no-bzlmod and update CI
1 parent 26cd607 commit 3f06d72

File tree

3 files changed

+21
-49
lines changed

3 files changed

+21
-49
lines changed

.bazelci/presubmit.yml

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,19 @@ x_defaults:
4848
- "//tools/..."
4949

5050
tasks:
51-
# TODO: Uncomment once Bazel 8 is released
52-
# macos_7:
53-
# name: "Previous LTS"
54-
# bazel: 7.x
55-
# <<: *mac_common
51+
macos_7:
52+
name: "Previous LTS with no bzlmod"
53+
bazel: 7.x
54+
build_flags:
55+
- "--noenable_bzlmod"
56+
- "--enable_workspace"
57+
<<: *mac_common
5658

5759
macos_latest:
5860
name: "Current LTS"
5961
bazel: latest
6062
<<: *mac_common
6163

62-
macos_latest_bzlmod:
63-
name: "Current LTS using bzlmod"
64-
bazel: latest
65-
<<: *mac_common
66-
6764
macos_last_green:
6865
name: "Last Green Bazel"
6966
bazel: last_green
@@ -78,15 +75,17 @@ tasks:
7875
- .bazelci/update_workspace_to_deps_heads.sh
7976
<<: *mac_common
8077

81-
# TODO: Uncomment once Bazel 8 is released
82-
# ubuntu2004_7:
83-
# name: "Previous LTS"
84-
# bazel: 7.x
85-
# shell_commands:
86-
# - "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
87-
# - "mkdir $SWIFT_HOME"
88-
# - "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
89-
# <<: *linux_common
78+
ubuntu2004_7:
79+
name: "Previous LTS with no bzlmod"
80+
bazel: 7.x
81+
shell_commands:
82+
- "echo --- Downloading and extracting Swift $SWIFT_VERSION to $SWIFT_HOME"
83+
- "mkdir $SWIFT_HOME"
84+
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
85+
build_flags:
86+
- "--noenable_bzlmod"
87+
- "--enable_workspace"
88+
<<: *linux_common
9089

9190
ubuntu2004_latest:
9291
name: "Current LTS"
@@ -135,9 +134,5 @@ tasks:
135134
- "curl https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2004/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu20.04.tar.gz | tar xvz --strip-components=1 -C $SWIFT_HOME"
136135
test_targets:
137136
- "doc/..."
138-
# TODO: Remove this once stardoc is updated to 0.7.1+ (https://github.com/bazelbuild/stardoc/pull/238)
139-
test_flags:
140-
- "--action_env=PATH"
141-
- "--noincompatible_disallow_empty_glob"
142137

143-
buildifier: 6.3.2
138+
buildifier: 8.2.0

MODULE.bazel

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ bazel_dep(name = "apple_support", version = "1.21.0", repo_name = "build_bazel_a
1212
bazel_dep(name = "rules_cc", version = "0.0.2")
1313
bazel_dep(name = "rules_shell", version = "0.3.0")
1414
bazel_dep(name = "platforms", version = "0.0.9")
15-
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
15+
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf")
1616
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
1717
bazel_dep(name = "nlohmann_json", version = "3.6.1", repo_name = "com_github_nlohmann_json")
1818
bazel_dep(
@@ -45,7 +45,7 @@ register_toolchains("@build_bazel_rules_swift_local_config//:all")
4545
# Dev dependencies
4646
bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.5.0", dev_dependency = True)
4747
bazel_dep(name = "gazelle", version = "0.33.0", dev_dependency = True, repo_name = "bazel_gazelle")
48-
bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc")
48+
bazel_dep(name = "stardoc", version = "0.7.1", dev_dependency = True, repo_name = "io_bazel_stardoc")
4949

5050
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
5151

@@ -56,20 +56,3 @@ http_archive(
5656
strip_prefix = "swift-syntax-01fc3e3ed4d26121c06790abf8fe5ddaa22a4cc5",
5757
url = "https://github.com/apple/swift-syntax/archive/01fc3e3ed4d26121c06790abf8fe5ddaa22a4cc5.tar.gz",
5858
)
59-
60-
# TODO: Remove override when a protobuf release is available that supports
61-
# Bazel 8
62-
archive_override(
63-
module_name = "protobuf",
64-
integrity = "sha256-+dloYVexGlGsxKLTARuU4KXZ5ORo/BWPR6obFk73d+Q=",
65-
strip_prefix = "protobuf-b93b8e5f64ed922d101759380d7c6a2bbe474e26",
66-
urls = ["https://github.com/protocolbuffers/protobuf/archive/b93b8e5f64ed922d101759380d7c6a2bbe474e26.zip"],
67-
)
68-
69-
# TODO: Remove override when a protobuf release that marks `stardoc` as a
70-
# dev_dependency is available, until then it's upgrading our stardoc version
71-
# so override it here.
72-
single_version_override(
73-
module_name = "stardoc",
74-
version = "0.6.2",
75-
)

swift/internal/BUILD

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,6 @@ bzl_library(
229229
],
230230
)
231231

232-
bzl_library(
233-
name = "runfiles",
234-
srcs = ["runfiles.bzl"],
235-
visibility = ["//swift:__subpackages__"],
236-
)
237-
238232
bzl_library(
239233
name = "swift_autoconfiguration",
240234
srcs = ["swift_autoconfiguration.bzl"],

0 commit comments

Comments
 (0)