Skip to content

Commit

Permalink
disentangle grpc deps from skywalking data definition (#54)
Browse files Browse the repository at this point in the history
* disentangle grpc deps from skywalking data definition

* fix

* fix
  • Loading branch information
Shikugawa authored Jan 26, 2021
1 parent 05ff62e commit 591e0dc
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 103 deletions.
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.7.2
16 changes: 0 additions & 16 deletions cpp2sky/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,6 @@ cc_library(
"time.h",
],
deps = [
"@com_github_grpc_grpc//:grpc++",
"@skywalking_data_collect_protocol//language-agent:tracing_protocol_cc_grpc",
":config_cc_proto",
],
visibility = ["//visibility:public"],
)

cc_library(
name = "cpp2sky_internal_interface",
hdrs = [
"internal/async_client.h",
"internal/random_generator.h",
],
deps = [
"@com_github_grpc_grpc//:grpc++",
"@skywalking_data_collect_protocol//language-agent:tracing_protocol_cc_grpc",
":config_cc_proto",
],
visibility = ["//visibility:public"],
Expand Down
24 changes: 24 additions & 0 deletions cpp2sky/internal/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library")
load("@rules_proto//proto:defs.bzl", "proto_library")

licenses(["notice"]) # Apache 2

cc_library(
name = "async_client_interface",
hdrs = [
"async_client.h",
],
deps = [
"@com_github_grpc_grpc//:grpc++",
"@skywalking_data_collect_protocol//language-agent:tracing_protocol_cc_grpc",
],
visibility = ["//visibility:public"],
)

cc_library(
name = "random_generator_interface",
hdrs = [
"random_generator.h",
],
visibility = ["//visibility:public"],
)
2 changes: 1 addition & 1 deletion source/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ cc_library(
"@skywalking_data_collect_protocol//language-agent:tracing_protocol_cc_proto",
"@skywalking_data_collect_protocol//language-agent:tracing_protocol_cc_grpc",
"@com_github_grpc_grpc//:grpc++",
"//cpp2sky/internal:async_client_interface",
"//cpp2sky:cpp2sky_interface",
"//cpp2sky:cpp2sky_internal_interface",
"//source/utils:util_lib",
],
visibility = ["//visibility:public"],
Expand Down
1 change: 0 additions & 1 deletion source/grpc_async_client_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <thread>

#include "cpp2sky/exception.h"
#include "utils/grpc_status.h"

namespace cpp2sky {

Expand Down
3 changes: 1 addition & 2 deletions source/utils/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ cc_library(
hdrs = [
"base64.h",
"random_generator.h",
"grpc_status.h",
"circular_buffer.h",
],
deps = [
"//cpp2sky:cpp2sky_internal_interface",
"//cpp2sky/internal:random_generator_interface",
],
visibility = ["//visibility:public"],
)
82 changes: 0 additions & 82 deletions source/utils/grpc_status.h

This file was deleted.

3 changes: 2 additions & 1 deletion test/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ cc_library(
deps = [
"@skywalking_data_collect_protocol//language-agent:tracing_protocol_cc_proto",
"@com_google_googletest//:gtest_main",
"//cpp2sky:cpp2sky_internal_interface",
"//cpp2sky/internal:async_client_interface",
"//cpp2sky/internal:random_generator_interface",
]
)

Expand Down

0 comments on commit 591e0dc

Please sign in to comment.