mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-13 00:16:19 +03:00
179d85362d
* update copyright * undo hack from #18168 * update hash in platform-independence-pre-check
96 lines
2.6 KiB
Python
96 lines
2.6 KiB
Python
# Copyright (c) 2024 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//bazel_tools:scala.bzl",
|
|
"da_scala_benchmark_jmh",
|
|
"da_scala_library",
|
|
"da_scala_test",
|
|
"da_scala_test_suite",
|
|
"lf_scalacopts",
|
|
"lf_scalacopts_stricter",
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "validation",
|
|
srcs = glob(["src/main/**/*.scala"]),
|
|
scala_deps = [
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
],
|
|
scalacopts = lf_scalacopts_stricter,
|
|
tags = ["maven_coordinates=com.daml:daml-lf-validation:__VERSION__"],
|
|
visibility = [
|
|
"//canton:__subpackages__",
|
|
"//canton-3x:__subpackages__",
|
|
"//compiler/scenario-service:__subpackages__",
|
|
"//daml-lf:__subpackages__",
|
|
# TODO https://github.com/digital-asset/daml/issues/15453
|
|
# Extract the error types into a separate package
|
|
# in order to decouple the error definitions
|
|
# from unnecessary daml-lf/validation dependencies
|
|
"//ledger/ledger-api-errors:__subpackages__",
|
|
],
|
|
deps = [
|
|
"//daml-lf/data",
|
|
"//daml-lf/language",
|
|
"//libs-scala/scala-utils",
|
|
],
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "validation-test-lib",
|
|
srcs = glob(["src/test/**/SpecUtil.scala"]),
|
|
scala_deps = [
|
|
"@maven//:org_scalactic_scalactic",
|
|
],
|
|
scalacopts = lf_scalacopts_stricter,
|
|
deps = [
|
|
":validation",
|
|
"//daml-lf/language",
|
|
"//daml-lf/parser",
|
|
],
|
|
)
|
|
|
|
da_scala_test_suite(
|
|
name = "tests",
|
|
size = "small",
|
|
srcs = glob(
|
|
["src/test/**/*.scala"],
|
|
exclude = ["src/test/**/*SpecUtil.scala"],
|
|
),
|
|
scalacopts = lf_scalacopts,
|
|
deps = [
|
|
":validation",
|
|
":validation-test-lib",
|
|
"//daml-lf/data",
|
|
"//daml-lf/language",
|
|
"//daml-lf/parser",
|
|
],
|
|
)
|
|
|
|
da_scala_benchmark_jmh(
|
|
name = "typechecking-benchmark",
|
|
srcs = glob(["src/bench/**/*.scala"]),
|
|
data = [
|
|
"//test-common:model-tests-default.dar",
|
|
],
|
|
scala_deps = [
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//bazel_tools/runfiles:scala_runfiles",
|
|
"//daml-lf/archive:daml_lf_archive_reader",
|
|
"//daml-lf/archive:daml_lf_dev_archive_proto_java",
|
|
"//daml-lf/data",
|
|
"//daml-lf/engine",
|
|
"//daml-lf/interpreter",
|
|
"//daml-lf/language",
|
|
"//daml-lf/scenario-interpreter",
|
|
"//daml-lf/transaction",
|
|
"//daml-lf/validation",
|
|
"//test-common:dar-files-default-lib",
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
],
|
|
)
|