Skip to content

Commit

Permalink
Merge pull request #2120 from hzeller/feature-20240225-json-rename
Browse files Browse the repository at this point in the history
Change name of "@jsonhpp" to "@jsonhpp//:json" for WORKSPACE
  • Loading branch information
hzeller authored Feb 25, 2024
2 parents 25611a8 + b00dcfe commit 8d7ea9b
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 21 deletions.
10 changes: 7 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,14 @@ http_archive(
http_archive(
name = "jsonhpp",
build_file = "//bazel:jsonhpp.BUILD",
sha256 = "081ed0f9f89805c2d96335c3acfa993b39a0a5b4b4cef7edb68dd2210a13458c",
strip_prefix = "json-3.10.2",
patch_args = ["-p1"],
patches = [
"//bazel:nlohmann-libname.patch",
],
sha256 = "0d8ef5af7f9794e3263480193c491549b2ba6cc74bb018906202ada498a79406",
strip_prefix = "json-3.11.3",
urls = [
"https://github.com/nlohmann/json/archive/refs/tags/v3.10.2.tar.gz",
"https://github.com/nlohmann/json/archive/refs/tags/v3.11.3.tar.gz",
],
)

Expand Down
11 changes: 11 additions & 0 deletions bazel/nlohmann-libname.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/BUILD.bazel 2024-02-25 09:22:53.424710790 -0800
+++ b/BUILD.bazel 2024-02-25 09:24:49.771990947 -0800
@@ -5,7 +5,7 @@
exports_files(["LICENSE"])

cc_library(
- name = "jsonhpp",
+ name = "json", # Be the same for WORKSPACE and MODULE.bazel
hdrs = [
"single_include/nlohmann/json.hpp",
],
8 changes: 4 additions & 4 deletions common/lsp/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ cc_library(
deps = [
"//common/util:logging",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand All @@ -71,7 +71,7 @@ cc_test(
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -161,7 +161,7 @@ cc_binary(
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand All @@ -175,7 +175,7 @@ cc_binary(
":message-stream-splitter",
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down
4 changes: 2 additions & 2 deletions common/text/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cc_library(
hdrs = ["token_info_json.h"],
deps = [
":token-info",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -412,7 +412,7 @@ cc_test(
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down
2 changes: 1 addition & 1 deletion common/tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ cc_test(
"@com_google_absl//absl/strings",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)
2 changes: 1 addition & 1 deletion common/tools/jcxxgen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ def jcxxgen(name, src, out, namespace = ""):
native.cc_library(
name = name,
hdrs = [out],
deps = ["@jsonhpp"],
deps = ["@jsonhpp//:json"],
)
4 changes: 2 additions & 2 deletions verilog/CST/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ cc_library(
"//verilog/parser:verilog-token-classifications",
"//verilog/parser:verilog-token-enum",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -952,6 +952,6 @@ cc_test(
"//verilog/analysis:verilog-analyzer",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)
4 changes: 2 additions & 2 deletions verilog/analysis/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ cc_library(
"//common/analysis:file-analyzer",
"//common/strings:line-column-map",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -132,7 +132,7 @@ cc_test(
"//common/util:logging",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down
10 changes: 5 additions & 5 deletions verilog/tools/ls/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ cc_library(
"//verilog/parser:verilog-token-enum",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -142,7 +142,7 @@ cc_library(
"//verilog/CST:seq-block",
"//verilog/CST:verilog-nonterminals",
"@com_google_absl//absl/flags:flag",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -248,7 +248,7 @@ cc_library(
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand All @@ -269,7 +269,7 @@ cc_test(
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down Expand Up @@ -322,6 +322,6 @@ cc_test(
"@com_google_absl//absl/strings:string_view",
"@com_google_googletest//:gtest",
"@com_google_googletest//:gtest_main",
"@jsonhpp",
"@jsonhpp//:json",
],
)
2 changes: 1 addition & 1 deletion verilog/tools/syntax/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ cc_binary(
"@com_google_absl//absl/status",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:string_view",
"@jsonhpp",
"@jsonhpp//:json",
],
)

Expand Down

0 comments on commit 8d7ea9b

Please sign in to comment.