daml/ledger/error/BUILD.bazel

108 lines
3.6 KiB
Python

# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//bazel_tools:scala.bzl",
"da_scala_binary",
"da_scala_library",
"da_scala_test_suite",
)
da_scala_library(
name = "error",
srcs = glob(["src/main/scala/**/*.scala"]),
scala_deps = [
"@maven//:io_spray_spray_json",
],
tags = ["maven_coordinates=com.daml:error:__VERSION__"],
visibility = ["//visibility:public"],
deps = [
"//daml-lf/archive:daml_lf_archive_reader",
"//daml-lf/data",
"//daml-lf/engine",
"//daml-lf/language",
"//daml-lf/transaction",
"//daml-lf/validation",
"//ledger-api/grpc-definitions:ledger_api_proto_scala",
"//ledger/ledger-grpc",
"//ledger/participant-integration-api:participant-integration-api-proto_scala",
"//ledger/participant-state",
"//libs-scala/contextualized-logging",
"//libs-scala/logging-entries",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_grpc_grpc_api",
"@maven//:io_grpc_grpc_protobuf",
"@maven//:org_slf4j_slf4j_api",
],
)
da_scala_library(
name = "error-test-utils",
srcs = glob(["src/test/utils/**/*.scala"]),
scala_deps = [],
visibility = ["//:__subpackages__"],
deps = [
":error",
"//libs-scala/contextualized-logging",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_grpc_grpc_api",
"@maven//:org_slf4j_slf4j_api",
],
)
da_scala_library(
name = "error-test-lib",
srcs = glob(["src/test/lib/**/*.scala"]),
scala_deps = [
"@maven//:org_scalactic_scalactic",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
],
tags = ["maven_coordinates=com.daml:error-test-lib:__VERSION__"],
visibility = ["//ledger:__subpackages__"],
deps = [
"//ledger/error",
"//ledger/test-common",
"//libs-scala/contextualized-logging",
"//libs-scala/scala-utils",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_grpc_grpc_api",
"@maven//:io_grpc_grpc_protobuf",
"@maven//:org_scalatest_scalatest_compatible",
],
)
da_scala_test_suite(
name = "error-test-suite",
srcs = glob(["src/test/suite/scala/**/*.scala"]),
resources = ["src/test/resources/logback-test.xml"],
scala_deps = [
"@maven//:org_scalactic_scalactic",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
],
deps = [
":error",
":error-test-lib",
":error-test-utils",
"//ledger/test-common",
"//libs-scala/contextualized-logging",
"//libs-scala/logging-entries",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:ch_qos_logback_logback_core",
"@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:io_grpc_grpc_api",
"@maven//:io_grpc_grpc_protobuf",
"@maven//:org_scalatest_scalatest_compatible",
"@maven//:org_slf4j_slf4j_api",
],
)