mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
424faa923a
* Port damlc dependencies to Scala 2.13 I got a bit fed up by the fact that going directory by directory didn’t really work since there are two many interdependencies in tests (e.g., client tests depend on sandbox, sandbox tests depend on clients, engine tests depend on DARs which depend on damlc, …). So before attempting to continue with the per-directory process, this is a bruteforce approach to break a lot of those cycles by porting all dependencies of damlc which includes client bindings (for DAML Script) and Sandbox Classic (also for DAML Script). If this is too annoying to review let me know and I’ll try to split it up into a few chunks. changelog_begin changelog_end * Update daml-lf/data/src/main/2.13/com/daml/lf/data/LawlessTraversals.scala Co-authored-by: Stephen Compall <stephen.compall@daml.com> * fixup lawlesstraversal changelog_begin changelog_end * less iterator more view changelog_begin changelog_end * document safety of unsafeWrapArray changelog_begin changelog_end Co-authored-by: Stephen Compall <stephen.compall@daml.com>
100 lines
2.8 KiB
Python
100 lines
2.8 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",
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "engine",
|
|
srcs = glob(["src/main/**/*.scala"]),
|
|
scala_deps = [
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
"@maven//:org_typelevel_paiges_core",
|
|
],
|
|
scalacopts = lf_scalacopts,
|
|
tags = ["maven_coordinates=com.daml:daml-lf-engine:__VERSION__"],
|
|
versioned_scala_deps = {
|
|
"2.12": ["@maven//:org_scala_lang_modules_scala_collection_compat"],
|
|
},
|
|
visibility = ["//visibility:public"],
|
|
deps = [
|
|
"//daml-lf/data",
|
|
"//daml-lf/interpreter",
|
|
"//daml-lf/language",
|
|
"//daml-lf/transaction",
|
|
"//daml-lf/validation",
|
|
],
|
|
)
|
|
|
|
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",
|
|
],
|
|
scala_deps = [
|
|
"@maven//:com_storm_enroute_scalameter_core",
|
|
"@maven//:org_scalatest_scalatest",
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
],
|
|
scalacopts = lf_scalacopts,
|
|
deps = [
|
|
":engine",
|
|
"//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/interpreter",
|
|
"//daml-lf/language",
|
|
"//daml-lf/parser",
|
|
"//daml-lf/transaction",
|
|
"//daml-lf/transaction-test-lib",
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
],
|
|
)
|
|
|
|
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",
|
|
scala_deps = [
|
|
"@maven//:com_storm_enroute_scalameter_core",
|
|
"@maven//:org_scalatest_scalatest",
|
|
"@maven//:org_scalaz_scalaz_core",
|
|
],
|
|
scalacopts = lf_scalacopts,
|
|
deps = [
|
|
":engine",
|
|
"//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/language",
|
|
"//daml-lf/transaction",
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
],
|
|
)
|