mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 09:17:43 +03:00
94aea562d6
* scala codegen: add GenMap support * scala-codegen: use InsertOrdMap as underlying of Generic Map binding * Address Stephen's comments * make TextMap a strict subtype of immutable.Map to avoid overlap with GenMap Otherwise, attempted GenMap encodings like `Value.encode(InsertOrdMap("foo" -> "bar"))` (and any contract containing such a structure) are either ambiguous or, worse, yield the wrong result. * ensure better return types for InsertOrdMap and similar wrappers' operations * if is an expression * adapt various primitive encodings to newtype TextMap * easy cleanups of the TextMapApi * proper alias for deprecated Map * update deprecation releases * Revert "proper alias for deprecated Map" This reverts commit e85aa85b960c4bf5c4f9624896183ec6e2182bba. * remove useless invisible deprecated notice * add generic map tests for scala codegen * please restart CI
41 lines
1022 B
Python
41 lines
1022 B
Python
# Copyright (c) 2019 The DAML Authors. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
load(
|
|
"//bazel_tools:scala.bzl",
|
|
"da_scala_library",
|
|
"da_scala_test",
|
|
"lf_scalacopts",
|
|
)
|
|
|
|
da_scala_library(
|
|
name = "data",
|
|
srcs = glob(["src/main/**/*.scala"]),
|
|
plugins = [
|
|
"@maven//:org_spire_math_kind_projector_2_12",
|
|
],
|
|
scalacopts = lf_scalacopts,
|
|
tags = ["maven_coordinates=com.digitalasset:daml-lf-data:__VERSION__"],
|
|
visibility = [
|
|
"//visibility:public",
|
|
],
|
|
deps = [
|
|
"@maven//:com_google_protobuf_protobuf_java",
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
],
|
|
)
|
|
|
|
da_scala_test(
|
|
name = "data-test",
|
|
size = "small",
|
|
srcs = glob(["src/test/**/*.scala"]),
|
|
scalacopts = lf_scalacopts,
|
|
deps = [
|
|
":data",
|
|
"//daml-lf/data-scalacheck",
|
|
"@maven//:org_scalacheck_scalacheck_2_12",
|
|
"@maven//:org_scalaz_scalaz_core_2_12",
|
|
"@maven//:org_scalaz_scalaz_scalacheck_binding_2_12",
|
|
],
|
|
)
|