daml/language-support/hs/bindings/BUILD.bazel
Moritz Kiefer 42c586f8d4
Bump ghcide (#3943)
* Bump ghcide

* Fix ghcide build

* Include bugfix for Windows
2020-01-04 07:51:51 +01:00

104 lines
2.5 KiB
Python

# Copyright (c) 2020 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load("//bazel_tools:haskell.bzl", "da_haskell_binary", "da_haskell_library", "da_haskell_repl", "da_haskell_test")
load("//rules_daml:daml.bzl", "daml_compile")
load("@os_info//:os_info.bzl", "is_windows")
da_haskell_library(
name = "hs-ledger",
srcs = glob(["src/**/*.hs"]),
hackage_deps = [
"async",
"base",
"bytestring",
"containers",
"exceptions",
"extra",
"mtl",
"grpc-haskell",
"proto3-suite",
"retry",
"sorted-list",
"text",
"time",
"transformers",
"unliftio",
"utf8-string",
"vector",
],
visibility = ["//visibility:public"],
deps = [
"//ledger-api/grpc-definitions:ledger-api-haskellpb",
],
)
daml_compile(
name = "for-tests",
srcs = glob(["test/daml/for-tests/*.daml"]),
main_src = "test/daml/for-tests/Main.daml",
)
daml_compile(
name = "for-upload",
srcs = glob(["test/daml/for-upload/ExtraModule.daml"]),
main_src = "test/daml/for-upload/ExtraModule.daml",
)
da_haskell_test(
name = "test",
srcs = glob(["test/**/*.hs"]),
data = [
":for-tests.dar",
":for-upload.dar",
"//ledger/sandbox:sandbox-binary",
],
# The tests are flaky probably due to issues in gRPC-haskell.
flaky = True,
hackage_deps = [
"aeson",
"async",
"base",
"bytestring",
"containers",
"filepath",
"directory",
"extra",
"jwt",
"process",
"random",
"retry",
"safe",
"tasty",
"tasty-hunit",
"text",
"time",
"utf8-string",
"uuid",
"vector",
"zip-archive",
],
main_function = "DA.Ledger.Tests.main",
src_strip_prefix = "test",
visibility = ["//visibility:public"],
deps = [
"//compiler/daml-lf-ast",
"//compiler/daml-lf-proto",
"//compiler/daml-lf-reader",
"//language-support/hs/bindings:hs-ledger",
"//libs-haskell/bazel-runfiles",
],
)
da_haskell_repl(
name = "repl",
testonly = True,
visibility = ["//visibility:public"],
deps = [
"//language-support/hs/bindings:hs-ledger",
"//language-support/hs/bindings:test",
"//language-support/hs/bindings/examples/chat",
"//language-support/hs/bindings/examples/nim",
],
)