From 692dac665d4659f1399a0f56478450c596bf318a Mon Sep 17 00:00:00 2001 From: Remy Date: Thu, 4 Nov 2021 19:02:16 +0100 Subject: [PATCH] LF: deprecate remaining type alias in Transaction (#11554) CHANGELOG_BEGIN CHANGELOG_END --- .../main/scala/com/digitalasset/daml/lf/speedy/Pretty.scala | 6 +++--- .../com/digitalasset/daml/lf/transaction/Transaction.scala | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Pretty.scala b/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Pretty.scala index fb4e67fe4939..43d64262c029 100644 --- a/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Pretty.scala +++ b/daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Pretty.scala @@ -13,7 +13,7 @@ import com.daml.lf.ledger._ import com.daml.lf.data.Ref._ import com.daml.lf.scenario.ScenarioLedger.TransactionId import com.daml.lf.scenario._ -import com.daml.lf.transaction.{Node, NodeId, TransactionVersion => TxVersion, Transaction => Tx} +import com.daml.lf.transaction.{Node, NodeId, TransactionVersion => TxVersion} import com.daml.lf.speedy.SError._ import com.daml.lf.speedy.SValue._ import com.daml.lf.speedy.SBuiltin._ @@ -193,7 +193,7 @@ private[lf] object Pretty { // the maintainers are induced from the key -- so don't clutter prettyValue(false)(key.key) - def prettyVersionedKeyWithMaintainers(key: Node.KeyWithMaintainers[Tx.Value]): Doc = + def prettyVersionedKeyWithMaintainers(key: Node.KeyWithMaintainers[VersionedValue]): Doc = // the maintainers are induced from the key -- so don't clutter prettyValue(false)(key.key.value) @@ -307,7 +307,7 @@ private[lf] object Pretty { def prettyIdentifier(id: Identifier): Doc = text(id.qualifiedName.toString) + char('@') + prettyPackageId(id.packageId) - def prettyVersionedValue(verbose: Boolean)(v: Tx.Value): Doc = + def prettyVersionedValue(verbose: Boolean)(v: VersionedValue): Doc = prettyValue(verbose)(v.value) // Pretty print a value. If verbose then the top-level value is printed with type constructor diff --git a/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/Transaction.scala b/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/Transaction.scala index 1e40c2a28c50..48e42a11c398 100644 --- a/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/Transaction.scala +++ b/daml-lf/transaction/src/main/scala/com/digitalasset/daml/lf/transaction/Transaction.scala @@ -733,6 +733,7 @@ sealed abstract class HasTxNodes { object GenTransaction { + @deprecated("use com.daml.transaction.GenTransaction directly", since = "1.18.0") type WithTxValue = GenTransaction private[this] val Empty = GenTransaction(HashMap.empty, ImmArray.Empty) @@ -781,13 +782,15 @@ object GenTransaction { object Transaction { + @deprecated("use com.daml.value.Value.VersionedValue directly", since = "1.18.0") type Value = Value.VersionedValue @deprecated("use com.daml.value.Value.VersionedContractInstance", since = "1.18.0") type ContractInstance = Value.VersionedContractInstance - /** Transaction nodes */ + @deprecated("use com.daml.transaction.Node.Action directly", since = "1.18.0") type ActionNode = Node.Action + @deprecated("use com.daml.transaction.Node.LeafOnlyAction directly", since = "1.18.0") type LeafNode = Node.LeafOnlyAction @deprecated("use com.daml.transaction.VersionedTransaction", since = "1.18.0")