daml/language-support/ts/codegen/BUILD.bazel
Martin Huschenbett 712231c963 daml2ts: Don't produce unused imports (#3689)
Instead of importing _all_ other modules referenced from a module, only
import those that are actually referenced from the generated code. First,
this produces less noise within each generated file. Second and probably
more important, this allows for not generating files without any actual
definition at all.

https://github.com/digital-asset/davl/pull/81 demonstrates the effect of
this change on DAVL.
2019-12-01 11:38:56 +00:00

30 lines
701 B
Python

# Copyright (c) 2019 The DAML Authors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
load("//bazel_tools:haskell.bzl", "da_haskell_binary")
da_haskell_binary(
name = "daml2ts",
srcs = glob(["src/**/*.hs"]),
hackage_deps = [
"base",
"bytestring",
"containers",
"directory",
"extra",
"filepath",
"lens",
"optparse-applicative",
"text",
"zip-archive",
],
src_strip_prefix = "src",
visibility = ["//visibility:public"],
deps = [
"//compiler/daml-lf-ast",
"//compiler/daml-lf-proto",
"//compiler/daml-lf-reader",
"//libs-haskell/da-hs-base",
],
)