daml/libs-scala/concurrent/BUILD.bazel
Stephen Compall d48e9d251d
ExecutionContext[EC] phantom for control, Future[EC, A] (#7347)
* add phantom-tagged ExecutionContext and Future to scala-utils concurrent package

* many new operations for Futures

* Future, ExecutionContext combinators from porting ledger-on-sql

- picked from 546b84ab9cdf4de2d93ec5682bdee6cfd6b385f8

* move Future, ExecutionContext companions into normal package

* lots of new docs

* many new Future utilities

* working zipWith

* tests for ExecutionContext resolution, showing what will be picked under different scenarios

* even more tests for ExecutionContext resolution

* tests showing some well-typed and ill-typed Future combinator usage

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* missed scalafmt

* one more doc note

* split concurrent package to concurrent library

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-09-17 07:36:50 +00:00

45 lines
1.1 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",
"lf_scalacopts",
)
scalacopts = lf_scalacopts + [
"-P:wartremover:traverser:org.wartremover.warts.NonUnitStatements",
]
da_scala_library(
name = "concurrent",
srcs = glob(["src/main/scala/**/*.scala"]),
plugins = [
"@maven//:org_spire_math_kind_projector_2_12",
],
scalacopts = scalacopts,
tags = ["maven_coordinates=com.daml:concurrent:__VERSION__"],
visibility = [
"//visibility:public",
],
deps = [
"@maven//:org_scalaz_scalaz_core_2_12",
],
)
da_scala_test(
name = "test",
srcs = glob(["src/test/scala/**/*.scala"]),
plugins = [
"@maven//:com_github_ghik_silencer_plugin_2_12_11",
],
scalacopts = scalacopts + ["-P:silencer:checkUnused"],
deps = [
":concurrent",
"@maven//:com_chuusai_shapeless_2_12",
"@maven//:com_github_ghik_silencer_lib_2_12_11",
"@maven//:org_scalaz_scalaz_core_2_12",
],
)