mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
df78f9cb1e
* participant-integration-api: Encapsulate the initial configuration. * participant-integration-api: Reduce usage of `LedgerConfiguration`. * Inline `LedgerConfiguration` wherever it's used. Most things don't need all its constituent parts; this reduces the amount of unused properties. CHANGELOG_BEGIN - [Integration Kit] The ``LedgerConfiguration`` class has been removed in favor of ``InitialLedgerConfiguration``. Its usage has been changed accordingly, with the ``configurationLoadTimeout`` property becoming part of ``ApiServerConfig`` instead. The default options provided by ``LedgerConfiguration`` have been removed; you are now encouraged to come up with sensible values for your own ledger. The ``Configuration.reasonableInitialConfiguration`` value may help. CHANGELOG_END * Correct the initial configuration submission delay for KV ledgers. * kvutils: Mark supertype unused parameters as unused. * kvutils: Extract out common configuration submission delays. These values are specific to kvutils; other drivers should come up with their own. * configuration: Delete `NoGeneration`, as it's unused.
123 lines
3.9 KiB
Python
123 lines
3.9 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_binary",
|
||
"da_scala_library",
|
||
)
|
||
|
||
script_scalacopts = ["-P:wartremover:traverser:org.wartremover.warts.%s" % wart for wart in [
|
||
"NonUnitStatements",
|
||
]]
|
||
|
||
test_script_sources = [
|
||
"src/main/scala/com/digitalasset/daml/lf/engine/script/TestMain.scala",
|
||
]
|
||
|
||
da_scala_library(
|
||
name = "script-runner-lib",
|
||
srcs = glob(
|
||
["src/main/scala/**/*.scala"],
|
||
exclude = test_script_sources,
|
||
),
|
||
scala_deps = [
|
||
"@maven//:com_github_scopt_scopt",
|
||
"@maven//:com_typesafe_akka_akka_http",
|
||
"@maven//:com_typesafe_akka_akka_http_core",
|
||
"@maven//:com_typesafe_akka_akka_http_spray_json",
|
||
"@maven//:com_typesafe_akka_akka_stream",
|
||
"@maven//:com_typesafe_akka_akka_parsing",
|
||
"@maven//:io_spray_spray_json",
|
||
"@maven//:org_scala_lang_modules_scala_collection_compat",
|
||
"@maven//:org_scalaz_scalaz_core",
|
||
"@maven//:org_typelevel_paiges_core",
|
||
],
|
||
scalacopts = script_scalacopts,
|
||
visibility = ["//visibility:public"],
|
||
deps = [
|
||
"//daml-lf/archive:daml_lf_archive_reader",
|
||
"//daml-lf/archive:daml_lf_dev_archive_proto_java",
|
||
"//daml-lf/data",
|
||
"//daml-lf/engine",
|
||
"//daml-lf/interface",
|
||
"//daml-lf/interpreter",
|
||
"//daml-lf/language",
|
||
"//daml-lf/scenario-interpreter",
|
||
"//daml-lf/transaction",
|
||
"//daml-script/converter",
|
||
"//language-support/scala/bindings",
|
||
"//language-support/scala/bindings-akka",
|
||
"//ledger-api/rs-grpc-bridge",
|
||
"//ledger-service/cli-opts",
|
||
"//ledger-service/jwt",
|
||
"//ledger-service/lf-value-json",
|
||
"//ledger/ledger-api-auth",
|
||
"//ledger/ledger-api-client",
|
||
"//ledger/ledger-api-common",
|
||
"//libs-scala/auth-utils",
|
||
],
|
||
)
|
||
|
||
# Spun out into a separate library to avoid pulling in a sandbox
|
||
# dependency where we don’t need it.
|
||
[
|
||
da_scala_library(
|
||
name = "script-test-lib-{}".format(edition),
|
||
srcs = test_script_sources,
|
||
scala_deps = [
|
||
"@maven//:com_typesafe_akka_akka_stream",
|
||
"@maven//:io_spray_spray_json",
|
||
"@maven//:org_scalaz_scalaz_core",
|
||
],
|
||
scalacopts = script_scalacopts,
|
||
visibility = ["//visibility:public"],
|
||
deps = [
|
||
":script-runner-lib",
|
||
"//daml-lf/archive:daml_lf_archive_reader",
|
||
"//daml-lf/data",
|
||
"//daml-lf/interpreter",
|
||
"//daml-lf/language",
|
||
"//daml-lf/transaction",
|
||
"//language-support/scala/bindings",
|
||
"//language-support/scala/bindings-akka",
|
||
"//ledger-api/rs-grpc-bridge",
|
||
"//ledger/caching",
|
||
"//ledger/ledger-api-auth",
|
||
"//ledger/ledger-api-client",
|
||
"//ledger/ledger-api-common",
|
||
"//ledger/ledger-configuration",
|
||
"//ledger/ledger-resources",
|
||
"//ledger/participant-integration-api",
|
||
"//ledger/sandbox-classic:sandbox-classic-{}".format(edition),
|
||
"//ledger/sandbox-common",
|
||
"//libs-scala/ports",
|
||
"//libs-scala/resources",
|
||
],
|
||
)
|
||
for edition in [
|
||
"ce",
|
||
"ee",
|
||
]
|
||
]
|
||
|
||
da_scala_binary(
|
||
name = "script-runner",
|
||
main_class = "com.daml.lf.engine.script.RunnerMain",
|
||
resources = glob(["src/main/resources/**/*"]),
|
||
scalacopts = script_scalacopts,
|
||
visibility = ["//visibility:public"],
|
||
deps = [":script-runner-lib"],
|
||
)
|
||
|
||
da_scala_binary(
|
||
name = "test-runner",
|
||
main_class = "com.daml.lf.engine.script.TestMain",
|
||
resources = glob(["src/main/resources/**/*"]),
|
||
scalacopts = script_scalacopts,
|
||
visibility = ["//visibility:public"],
|
||
deps = [":script-test-lib-ce"],
|
||
)
|
||
|
||
exports_files(["src/main/resources/logback.xml"])
|