mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
a51d0db8ff
* add -Xsource:2.13, -Ypartial-unification to common_scalacopts
* add now-referenced scalaz-core where needed
* work around bad type signatures in scalatest Aggregating, Containing
* unused Any suppression
* work around bad partial-unification wrought by type alias
* remove unused Conversions import
- not required in 4f68cfc480
either, so unsure how it's survived this long
* work around Future.traverse; remove unused show import
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* remove unused bounds
* remove -Ypartial-unification and -Xsource:2.13 where they were explicitly passed
* longer comment on what the options do
- suggested by @stefanobaghino-da; thanks
* forget Future.traverse, just use scalaz, it knows how to do this
182 lines
5.8 KiB
Python
182 lines
5.8 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_binary",
|
|
"da_scala_library",
|
|
"da_scala_test_suite",
|
|
)
|
|
|
|
navigator_scalacopts = [
|
|
"-Xelide-below",
|
|
"CONFIG",
|
|
]
|
|
|
|
# All frontend resource files.
|
|
# These come in a manually created JAR file, this rule is just wrapping it in
|
|
# a java_import, so that it is a valid target for the 'resources' property of
|
|
# scala_binary.
|
|
java_import(
|
|
name = "frontend-resources",
|
|
jars = [
|
|
"//navigator/frontend:frontend.jar",
|
|
],
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
# Static backend resources.
|
|
java_library(
|
|
name = "backend-resources",
|
|
resources = glob(["src/main/resources/**/*"]),
|
|
visibility = ["//visibility:public"],
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "navigator-library",
|
|
srcs = glob([
|
|
"src/main/scala/**/*.scala",
|
|
]),
|
|
scalacopts = navigator_scalacopts,
|
|
visibility = ["//visibility:public"],
|
|
runtime_deps = [
|
|
"@maven//:ch_qos_logback_logback_classic",
|
|
"@maven//:com_typesafe_akka_akka_slf4j_2_12",
|
|
"@maven//:org_xerial_sqlite_jdbc",
|
|
],
|
|
deps = [
|
|
"//daml-assistant/scala-daml-project-config",
|
|
"//daml-lf/archive:daml_lf_archive_reader",
|
|
"//daml-lf/archive:daml_lf_dev_archive_java_proto",
|
|
"//daml-lf/data",
|
|
"//daml-lf/interface",
|
|
"//daml-lf/language",
|
|
"//daml-lf/transaction",
|
|
"//language-support/scala/bindings",
|
|
"//ledger-api/rs-grpc-akka",
|
|
"//ledger-api/rs-grpc-bridge",
|
|
"//ledger-service/lf-value-json",
|
|
"//ledger/ledger-api-client",
|
|
"//ledger/ledger-api-common",
|
|
"//ledger/ledger-api-domain",
|
|
"//libs-scala/build-info",
|
|
"//libs-scala/grpc-utils",
|
|
"@maven//:com_chuusai_shapeless_2_12",
|
|
"@maven//:com_github_pureconfig_pureconfig_2_12",
|
|
"@maven//:com_github_scopt_scopt_2_12",
|
|
"@maven//:com_lihaoyi_sourcecode_2_12",
|
|
"@maven//:com_typesafe_akka_akka_actor_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_core_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_spray_json_2_12",
|
|
"@maven//:com_typesafe_akka_akka_stream_2_12",
|
|
"@maven//:com_typesafe_config",
|
|
"@maven//:com_typesafe_scala_logging_scala_logging_2_12",
|
|
"@maven//:io_grpc_grpc_netty",
|
|
"@maven//:io_netty_netty_handler",
|
|
"@maven//:io_spray_spray_json_2_12",
|
|
"@maven//:org_gnieh_diffson_core_2_12",
|
|
"@maven//:org_gnieh_diffson_spray_json_2_12",
|
|
"@maven//:org_jline_jline",
|
|
"@maven//:org_sangria_graphql_sangria_2_12",
|
|
"@maven//:org_sangria_graphql_sangria_marshalling_api_2_12",
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
"@maven//:org_slf4j_slf4j_api",
|
|
"@maven//:org_tpolecat_doobie_core_2_12",
|
|
"@maven//:org_tpolecat_doobie_free_2_12",
|
|
"@maven//:org_typelevel_cats_core_2_12",
|
|
"@maven//:org_typelevel_cats_effect_2_12",
|
|
"@maven//:org_typelevel_cats_free_2_12",
|
|
"@maven//:org_typelevel_cats_kernel_2_12",
|
|
],
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "navigator-tests-library",
|
|
srcs = glob(
|
|
["src/test/**/*.scala"],
|
|
exclude = [
|
|
"src/test/**/*Spec.scala",
|
|
"src/test/**/*Test.scala",
|
|
],
|
|
),
|
|
scalacopts = navigator_scalacopts,
|
|
runtime_deps = [
|
|
"@maven//:ch_qos_logback_logback_classic",
|
|
"@maven//:com_typesafe_akka_akka_stream_testkit_2_12",
|
|
"@maven//:io_grpc_grpc_netty",
|
|
"@maven//:org_xerial_sqlite_jdbc",
|
|
],
|
|
deps = [
|
|
":navigator-library",
|
|
"//daml-lf/data",
|
|
"//daml-lf/interface",
|
|
"//daml-lf/transaction",
|
|
"//language-support/scala/bindings",
|
|
"//ledger-service/lf-value-json",
|
|
"//ledger/ledger-api-common",
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
],
|
|
)
|
|
|
|
da_scala_binary(
|
|
name = "navigator-binary",
|
|
main_class = "com.daml.navigator.NavigatorBackend",
|
|
tags = [
|
|
"maven_coordinates=com.daml:navigator:__VERSION__",
|
|
"no_scala_version_suffix",
|
|
],
|
|
visibility = [
|
|
"//visibility:public",
|
|
],
|
|
deps = [
|
|
":backend-resources",
|
|
":frontend-resources",
|
|
":navigator-library",
|
|
],
|
|
)
|
|
|
|
# Static test resources.
|
|
java_library(
|
|
name = "test-resources",
|
|
resources = glob(["src/test/resources/**/*"]),
|
|
)
|
|
|
|
da_scala_test_suite(
|
|
name = "navigator-scala-tests",
|
|
size = "small",
|
|
srcs = glob([
|
|
"src/test/**/*Spec.scala",
|
|
"src/test/**/*Test.scala",
|
|
]),
|
|
scalacopts = navigator_scalacopts,
|
|
deps = [
|
|
":navigator-library",
|
|
":navigator-tests-library",
|
|
":test-resources",
|
|
"//daml-lf/data",
|
|
"//daml-lf/interface",
|
|
"//daml-lf/transaction",
|
|
"//language-support/scala/bindings",
|
|
"//ledger-service/lf-value-json",
|
|
"//ledger/ledger-api-common",
|
|
"//libs-scala/build-info",
|
|
"@maven//:com_typesafe_akka_akka_actor_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_core_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_spray_json_2_12",
|
|
"@maven//:com_typesafe_akka_akka_http_testkit_2_12",
|
|
"@maven//:com_typesafe_akka_akka_stream_2_12",
|
|
"@maven//:com_typesafe_config",
|
|
"@maven//:com_typesafe_scala_logging_scala_logging_2_12",
|
|
"@maven//:io_spray_spray_json_2_12",
|
|
"@maven//:org_sangria_graphql_sangria_2_12",
|
|
"@maven//:org_sangria_graphql_sangria_marshalling_api_2_12",
|
|
"@maven//:org_scalacheck_scalacheck_2_12",
|
|
"@maven//:org_scalatest_scalatest_2_12",
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
],
|
|
)
|
|
|
|
exports_files(["src/main/resources/logback.xml"])
|