daml/daml-lf/engine/BUILD.bazel
Remy ce3c3c89a4
LF: redesign engine configuration (#6763)
This PR redesigns the engine Configuration as described in #5164. 

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-22 12:17:07 +02:00

93 lines
2.7 KiB
Python

# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load(
"//bazel_tools:scala.bzl",
"da_scala_library",
"da_scala_test",
"da_scala_test_suite",
"lf_scalacopts",
)
da_scala_library(
name = "engine",
srcs = glob(["src/main/**/*.scala"]),
scalacopts = lf_scalacopts,
tags = ["maven_coordinates=com.daml:daml-lf-engine:__VERSION__"],
visibility = ["//visibility:public"],
deps = [
"//daml-lf/data",
"//daml-lf/interpreter",
"//daml-lf/language",
"//daml-lf/transaction",
"@maven//:org_scalaz_scalaz_core_2_12",
"@maven//:org_typelevel_paiges_core_2_12",
],
)
da_scala_test_suite(
name = "tests",
srcs = glob(
[
"src/test/**/*Spec.scala",
"src/test/**/*Test.scala",
],
exclude = [
"src/test/**/LargeTransactionTest.scala",
],
),
data = [
"//daml-lf/tests:BasicTests.dar",
"//daml-lf/tests:Optional.dar",
],
plugins = [
"@maven//:com_github_ghik_silencer_plugin_2_12_11",
],
scalacopts = lf_scalacopts + ["-P:silencer:checkUnused"],
deps = [
":engine",
"//bazel_tools/runfiles:scala_runfiles",
"//daml-lf/archive:daml_lf_archive_reader",
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
"//daml-lf/data",
"//daml-lf/interpreter",
"//daml-lf/language",
"//daml-lf/parser",
"//daml-lf/transaction",
"@maven//:com_github_ghik_silencer_lib_2_12_11",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_storm_enroute_scalameter_core_2_12",
"@maven//:org_scalatest_scalatest_2_12",
"@maven//:org_scalaz_scalaz_core_2_12",
],
)
da_scala_test(
name = "test-large-transaction",
timeout = "moderate",
srcs = glob([
"src/test/**/LargeTransactionTest.scala",
"src/test/**/InMemoryPrivateLedgerData.scala",
]),
data = [
"//daml-lf/tests:LargeTransaction.dar",
],
# We setup a large heap size to reduce as much as possible GC overheads.
initial_heap_size = "2g",
max_heap_size = "2g",
scalacopts = lf_scalacopts,
deps = [
":engine",
"//bazel_tools/runfiles:scala_runfiles",
"//daml-lf/archive:daml_lf_archive_reader",
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
"//daml-lf/data",
"//daml-lf/language",
"//daml-lf/transaction",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:com_storm_enroute_scalameter_core_2_12",
"@maven//:org_scalatest_scalatest_2_12",
"@maven//:org_scalaz_scalaz_core_2_12",
],
)