daml/daml-lf/interpreter/BUILD.bazel
nickchapman-da 51125991e5
Explicit discard in daml-lf/interpreter (#11067)
* Explicit discard to avoid NonUnitStatement.

CHANGELOG_BEGIN
CHANGELOG_END

* define lf_scalacopts_stricter in scala.bzl
2021-09-29 11:24:42 +00:00

111 lines
3.3 KiB
Python

# Copyright (c) 2021 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",
"lf_scalacopts_stricter",
)
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repl")
print(lf_scalacopts_stricter)
da_scala_library(
name = "interpreter",
srcs = glob(["src/main/**/*.scala"]),
scala_deps = [
"@maven//:io_spray_spray_json",
"@maven//:org_scala_lang_modules_scala_collection_compat",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_typelevel_paiges_core",
],
scalacopts = lf_scalacopts_stricter,
tags = ["maven_coordinates=com.daml:daml-lf-interpreter:__VERSION__"],
visibility = [
"//compiler/repl-service:__subpackages__",
"//compiler/scenario-service:__subpackages__",
"//daml-lf:__subpackages__",
"//daml-script:__subpackages__",
"//ledger:__subpackages__",
"//triggers:__subpackages__",
],
deps = [
"//daml-lf/data",
"//daml-lf/language",
"//daml-lf/transaction",
"//daml-lf/validation",
"//libs-scala/nameof",
"//libs-scala/scala-utils",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:org_slf4j_slf4j_api",
],
)
bigNumericTests = "src/test/scala/com/digitalasset/daml/lf/speedy/SBuiltinBigNumericTest.scala"
da_scala_test_suite(
name = "tests",
size = "small",
srcs = glob(
["src/test/**/*.scala"],
exclude = [bigNumericTests],
),
scala_deps = [
"@maven//:org_scala_lang_modules_scala_collection_compat",
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalatestplus_scalacheck_1_15",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalaz_scalaz_scalacheck_binding",
"@maven//:org_typelevel_paiges_core",
],
scalacopts = lf_scalacopts,
deps = [
":interpreter",
"//daml-lf/data",
"//daml-lf/interface",
"//daml-lf/language",
"//daml-lf/parser",
"//daml-lf/transaction",
"//daml-lf/transaction-test-lib",
"//daml-lf/validation",
"//libs-scala/logging-entries",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:org_scalatest_scalatest_compatible",
"@maven//:org_slf4j_slf4j_api",
],
)
da_scala_test(
name = "test_bignumeric",
srcs = [bigNumericTests],
scala_deps = [
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_freespec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
deps = [
":interpreter",
"//daml-lf/data",
"//daml-lf/language",
"//daml-lf/parser",
"@maven//:org_scalatest_scalatest_compatible",
],
)
scala_repl(
name = "interpreter@repl",
deps = [
":interpreter",
],
)