Skip to content

Commit fa9ed47

Browse files
authored
Move nlohmann_json to bzlmod (#986)
1 parent 7caf02e commit fa9ed47

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ bazel_dep(name = "rules_cc", version = "0.0.2")
1515
bazel_dep(name = "platforms", version = "0.0.5")
1616
bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf")
1717
bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
18+
bazel_dep(name = "nlohmann_json", version = "3.6.1", repo_name = "com_github_nlohmann_json")
1819

1920
non_module_deps = use_extension("//swift:extensions.bzl", "non_module_deps")
2021
use_repo(
@@ -28,7 +29,6 @@ use_repo(
2829
"com_github_apple_swift_nio_transport_services",
2930
"com_github_apple_swift_protobuf",
3031
"com_github_grpc_grpc_swift",
31-
"com_github_nlohmann_json",
3232
)
3333

3434
# Dev dependencies

swift/repositories.bzl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,17 @@ def swift_rules_dependencies(include_bzlmod_ready_dependencies = True):
7373
strip_prefix = "rules_proto-d3702796e768abe7086d2dc7e299d3f7aeb1dd34",
7474
)
7575

76+
_maybe(
77+
http_archive,
78+
name = "com_github_nlohmann_json",
79+
urls = [
80+
"https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip",
81+
],
82+
sha256 = "69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf",
83+
type = "zip",
84+
build_file = "@build_bazel_rules_swift//third_party:com_github_nlohmann_json/BUILD.overlay",
85+
)
86+
7687
_maybe(
7788
http_archive,
7889
name = "com_github_apple_swift_protobuf",
@@ -136,17 +147,6 @@ def swift_rules_dependencies(include_bzlmod_ready_dependencies = True):
136147
build_file = "@build_bazel_rules_swift//third_party:com_github_apple_swift_log/BUILD.overlay",
137148
)
138149

139-
_maybe(
140-
http_archive,
141-
name = "com_github_nlohmann_json",
142-
urls = [
143-
"https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip",
144-
],
145-
sha256 = "69cc88207ce91347ea530b227ff0776db82dcb8de6704e1a3d74f4841bc651cf",
146-
type = "zip",
147-
build_file = "@build_bazel_rules_swift//third_party:com_github_nlohmann_json/BUILD.overlay",
148-
)
149-
150150
# It relies on `index-import` to import indexes into Bazel's remote
151151
# cache and allow using a global index internally in workers.
152152
# Note: this is only loaded if swift.index_while_building_v2 is enabled

0 commit comments

Comments
 (0)