mirror of
https://github.com/wassname/ray.git
synced 2026-09-10 12:38:43 +08:00
Linting Bazel scripts (#4032)
* Use buildifier as bazel script linter * Checkout golang version in travis * Using golang-1.8-go in travis * Add golang apt-repository * Fix the bazel lint failure example. * Address comment
This commit is contained in:
+65
-55
@@ -2,51 +2,38 @@ load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library")
|
||||
|
||||
cc_library(
|
||||
name = "arrow",
|
||||
srcs = [
|
||||
"cpp/src/arrow/buffer.cc",
|
||||
"cpp/src/arrow/memory_pool.cc",
|
||||
"cpp/src/arrow/status.cc",
|
||||
"cpp/src/arrow/util/io-util.cc",
|
||||
"cpp/src/arrow/util/logging.cc",
|
||||
"cpp/src/arrow/util/thread-pool.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"cpp/src/arrow/buffer.h",
|
||||
"cpp/src/arrow/io/interfaces.h",
|
||||
"cpp/src/arrow/memory_pool.h",
|
||||
"cpp/src/arrow/status.h",
|
||||
"cpp/src/arrow/io/interfaces.h",
|
||||
"cpp/src/arrow/util/bit-util.h",
|
||||
"cpp/src/arrow/util/io-util.h",
|
||||
"cpp/src/arrow/util/logging.h",
|
||||
"cpp/src/arrow/util/macros.h",
|
||||
"cpp/src/arrow/util/string_builder.h",
|
||||
"cpp/src/arrow/util/string_view.h",
|
||||
"cpp/src/arrow/util/type_traits.h",
|
||||
"cpp/src/arrow/util/thread-pool.h",
|
||||
"cpp/src/arrow/util/type_traits.h",
|
||||
"cpp/src/arrow/util/visibility.h",
|
||||
"cpp/src/arrow/util/windows_compatibility.h",
|
||||
"cpp/src/arrow/vendored/string_view.hpp",
|
||||
"cpp/src/arrow/vendored/xxhash/xxhash.h",
|
||||
"cpp/src/arrow/vendored/xxhash/xxhash.c",
|
||||
],
|
||||
srcs = [
|
||||
"cpp/src/arrow/buffer.cc",
|
||||
"cpp/src/arrow/memory_pool.cc",
|
||||
"cpp/src/arrow/status.cc",
|
||||
"cpp/src/arrow/util/logging.cc",
|
||||
"cpp/src/arrow/util/thread-pool.cc",
|
||||
"cpp/src/arrow/util/io-util.cc",
|
||||
"cpp/src/arrow/vendored/xxhash/xxhash.h",
|
||||
],
|
||||
strip_include_prefix = "cpp/src",
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "plasma_client",
|
||||
visibility = ["//visibility:public"],
|
||||
hdrs = [
|
||||
"cpp/src/plasma/client.h",
|
||||
"cpp/src/plasma/common.h",
|
||||
"cpp/src/plasma/compat.h",
|
||||
"cpp/src/plasma/fling.h",
|
||||
"cpp/src/plasma/io.h",
|
||||
"cpp/src/plasma/malloc.h",
|
||||
"cpp/src/plasma/plasma.h",
|
||||
"cpp/src/plasma/protocol.h",
|
||||
"cpp/src/plasma/common_generated.h",
|
||||
"cpp/src/plasma/plasma_generated.h",
|
||||
],
|
||||
srcs = [
|
||||
"cpp/src/plasma/client.cc",
|
||||
"cpp/src/plasma/common.cc",
|
||||
@@ -56,23 +43,41 @@ cc_library(
|
||||
"cpp/src/plasma/plasma.cc",
|
||||
"cpp/src/plasma/protocol.cc",
|
||||
],
|
||||
deps = [":common_fbs", ":plasma_fbs", ":arrow"],
|
||||
hdrs = [
|
||||
"cpp/src/plasma/client.h",
|
||||
"cpp/src/plasma/common.h",
|
||||
"cpp/src/plasma/common_generated.h",
|
||||
"cpp/src/plasma/compat.h",
|
||||
"cpp/src/plasma/fling.h",
|
||||
"cpp/src/plasma/io.h",
|
||||
"cpp/src/plasma/malloc.h",
|
||||
"cpp/src/plasma/plasma.h",
|
||||
"cpp/src/plasma/plasma_generated.h",
|
||||
"cpp/src/plasma/protocol.h",
|
||||
],
|
||||
strip_include_prefix = "cpp/src",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":arrow",
|
||||
":common_fbs",
|
||||
":plasma_fbs",
|
||||
],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
name = "plasma_client_java.so",
|
||||
srcs = [
|
||||
"@bazel_tools//tools/jdk:current_java_runtime",
|
||||
"cpp/src/plasma/lib/java/org_apache_arrow_plasma_PlasmaClientJNI.cc",
|
||||
"cpp/src/plasma/lib/java/org_apache_arrow_plasma_PlasmaClientJNI.h"
|
||||
],
|
||||
"cpp/src/plasma/lib/java/org_apache_arrow_plasma_PlasmaClientJNI.h",
|
||||
"@bazel_tools//tools/jdk:current_java_runtime",
|
||||
],
|
||||
includes = [
|
||||
"cpp/src",
|
||||
"../../external/local_jdk/include"] + select({
|
||||
"@bazel_tools//src/conditions:darwin": ["../../external/local_jdk/include/darwin"],
|
||||
"//conditions:default": ["../../external/local_jdk/include/linux"]
|
||||
}),
|
||||
"../../external/local_jdk/include",
|
||||
] + select({
|
||||
"@bazel_tools//src/conditions:darwin": ["../../external/local_jdk/include/darwin"],
|
||||
"//conditions:default": ["../../external/local_jdk/include/linux"],
|
||||
}),
|
||||
linkshared = 1,
|
||||
linkstatic = 1,
|
||||
deps = [":plasma_client"],
|
||||
@@ -88,20 +93,24 @@ genrule(
|
||||
|
||||
filegroup(
|
||||
name = "plasma_client_java",
|
||||
visibility = ["//visibility:public"],
|
||||
srcs = select({
|
||||
"@bazel_tools//src/conditions:darwin": [":plasma_client_java.dylib"],
|
||||
"//conditions:default": [":plasma_client_java.so"],
|
||||
})
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "plasma_lib",
|
||||
srcs = [
|
||||
"cpp/src/plasma/dlmalloc.cc",
|
||||
"cpp/src/plasma/events.cc",
|
||||
"cpp/src/plasma/eviction_policy.cc",
|
||||
],
|
||||
hdrs = [
|
||||
"cpp/src/plasma/events.h",
|
||||
"cpp/src/plasma/eviction_policy.h",
|
||||
"cpp/src/plasma/store.h",
|
||||
"cpp/src/plasma/thirdparty/dlmalloc.c",
|
||||
"cpp/src/plasma/thirdparty/ae/ae.h",
|
||||
"cpp/src/plasma/thirdparty/ae/ae_epoll.c",
|
||||
"cpp/src/plasma/thirdparty/ae/ae_evport.c",
|
||||
@@ -109,24 +118,25 @@ cc_library(
|
||||
"cpp/src/plasma/thirdparty/ae/ae_select.c",
|
||||
"cpp/src/plasma/thirdparty/ae/config.h",
|
||||
"cpp/src/plasma/thirdparty/ae/zmalloc.h",
|
||||
"cpp/src/plasma/thirdparty/dlmalloc.c",
|
||||
],
|
||||
srcs = [
|
||||
"cpp/src/plasma/dlmalloc.cc",
|
||||
"cpp/src/plasma/eviction_policy.cc",
|
||||
"cpp/src/plasma/events.cc",
|
||||
],
|
||||
deps = [":plasma_client"],
|
||||
strip_include_prefix = "cpp/src",
|
||||
deps = [":plasma_client"],
|
||||
)
|
||||
|
||||
|
||||
cc_binary(
|
||||
name = "plasma_store_server",
|
||||
srcs = glob(
|
||||
[
|
||||
"cpp/src/plasma/store.cc",
|
||||
"cpp/src/plasma/thirdparty/ae/ae.c",
|
||||
],
|
||||
exclude = [
|
||||
"cpp/src/plasma/dlmalloc.cc",
|
||||
"cpp/src/plasma/events.cc",
|
||||
],
|
||||
),
|
||||
visibility = ["//visibility:public"],
|
||||
srcs = glob([
|
||||
"cpp/src/plasma/store.cc",
|
||||
"cpp/src/plasma/thirdparty/ae/ae.c",
|
||||
], exclude = ["cpp/src/plasma/dlmalloc.cc", "cpp/src/plasma/events.cc"]),
|
||||
deps = [":plasma_lib"],
|
||||
)
|
||||
|
||||
@@ -137,18 +147,18 @@ FLATC_ARGS = [
|
||||
]
|
||||
|
||||
flatbuffer_cc_library(
|
||||
name="common_fbs",
|
||||
srcs=["cpp/src/plasma/format/common.fbs"],
|
||||
flatc_args=FLATC_ARGS,
|
||||
out_prefix="cpp/src/plasma/"
|
||||
name = "common_fbs",
|
||||
srcs = ["cpp/src/plasma/format/common.fbs"],
|
||||
flatc_args = FLATC_ARGS,
|
||||
out_prefix = "cpp/src/plasma/",
|
||||
)
|
||||
|
||||
flatbuffer_cc_library(
|
||||
name="plasma_fbs",
|
||||
srcs=["cpp/src/plasma/format/plasma.fbs"],
|
||||
flatc_args=FLATC_ARGS,
|
||||
out_prefix="cpp/src/plasma/",
|
||||
includes = ["cpp/src/plasma/format/common.fbs"]
|
||||
name = "plasma_fbs",
|
||||
srcs = ["cpp/src/plasma/format/plasma.fbs"],
|
||||
flatc_args = FLATC_ARGS,
|
||||
includes = ["cpp/src/plasma/format/common.fbs"],
|
||||
out_prefix = "cpp/src/plasma/",
|
||||
)
|
||||
|
||||
exports_files(["cpp/src/plasma/format/common.fbs"])
|
||||
|
||||
Reference in New Issue
Block a user