daml/daml-lf/interpreter/BUILD.bazel
Stephen Compall d4086080ea
proper GenMap Gen with key Value order (#5526)
* add Order instances to various types in LF data, transaction

* define scope-dependent Order for Value; test compatibility with SValue order

* support Order in TypedValueGenerators

* generate properly-ordered ValueGenMaps in TypedValueGenerators

* factor genAddend and genAddendNoListMap

* test Value.orderInstance fidelity with well-typed Orders

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* shrink Maps for better debugging

* line up base List and GenMap orders with svalue

* unhandled cases in custom comparator for ApiValueToLfValueConverter tests

- hazards of not using match2

* adapt to PureCompiledPackages changes
2020-04-24 17:57:12 -04:00

63 lines
1.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_suite",
"lf_scalacopts",
)
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repl")
da_scala_library(
name = "interpreter",
srcs = glob(["src/main/**/*.scala"]),
scalacopts = lf_scalacopts,
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",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:org_scalaz_scalaz_core_2_12",
"@maven//:org_slf4j_slf4j_api",
"@maven//:org_typelevel_paiges_core_2_12",
],
)
da_scala_test_suite(
name = "tests",
size = "small",
srcs = glob(["src/test/**/*.scala"]),
scalacopts = lf_scalacopts,
deps = [
":interpreter",
"//daml-lf/data",
"//daml-lf/language",
"//daml-lf/parser",
"//daml-lf/transaction",
"//daml-lf/transaction-scalacheck",
"//daml-lf/validation",
"@maven//:org_scalacheck_scalacheck_2_12",
"@maven//:org_scalatest_scalatest_2_12",
"@maven//:org_scalaz_scalaz_core_2_12",
"@maven//:org_slf4j_slf4j_api",
],
)
scala_repl(
name = "interpreter@repl",
deps = [
":interpreter",
],
)