Releases: digital-asset/daml
v0.12.19
Ledger
-
Transaction filters in
GetTransactionsRequest
without any party are now rejected withINVALID_ARGUMENT
instead of yielding an empty streamSee #1250 for details.
DAML
- Contract keys: The syntactic restriction on contract keys has been removed. They can be arbitray expressions now.
DAML-LF
- Add new version 1.4 and make it the default version produced by
damlc
. It removes the syntactic restriction on contract keys.
Java Bindings
- Bots: A class called LedgerTestView was added to make bot unit testing possible
DAML
-
BREAKING CHANGE - Syntax: Records with empty update blocks, e.g.
foo with
, is now an error (the fact it was ever accepted was a bug). -
BREAKING CHANGE - Contract Keys: Before, maintainers were incorrectly not checked to be a subset of the signatories, now they are. See issue #1123
Sandbox
- When loading a scenario with
--scenario
, the sandbox no longer compiles packages twice, see
issue #1238. - When starting the sandbox, you can now choose to have it load all the
.dar
packages immediately
with the--eager-package-loading
flag. The default behavior is to load the packages only when
a command requires them, which causes a delay for the first command that requires a yet-to-be-compiled
package.
See issue #1230.
SDK tools
- The Windows installer is now signed. You might still see Windows
defender warnings for some time but the publisher should now show
"Digital Asset Holdings, LLC".
0.12.18
Assets
- daml-sdk-0.12.18-linux.tar.gz
- daml-sdk-0.12.18-macos.tar.gz
- daml-sdk-0.12.18-windows.exe
- daml-sdk-0.12.18-windows.tar.gz
Documentation
- Removed unnecessary dependency in the quickstart-java example project.
- Removed the Configure Maven section from the installation instructions. This step is not needed anymore.
SDK tools
-
DAML Assistant: We've built a new and improved version of the SDK assistant, replacing
da
commands withdaml
commands. The documentation is updated to use the new assistant in this release.For a full guide to what's changed and how to migrate, see support/new-assistant`. To read about how to use the new
daml
Assistant, see tools/assistant.
DAML
-
BREAKING CHANGE - DAML Compiler: It is now an error to omit method bodies in class
instance
s if the method has no default. Almost all instances of such behaviour were an error - add in a suitable definition. -
Contract keys: We've added documentation for contract keys, a way of specifying a primary key for contract instances. For information about how to use them, see daml/reference/contract-keys
-
BREAKING CHANGE - DAML Standard Library: Moved the
Tuple
andEither
types todaml-prim:DA.Types
rather than exposing internal locations.How to migrate:
- You don't need to change DAML code as a result of this change.
- People using the Java/Scala codegen need to replace
import ghc.tuple.*
orimport da.internal.prelude.*
withimport da.types.*
. - People using the Ledger API directly need to replace
GHC.Tuple
andDA.Internal.Prelude
withDA.Types
.
-
BREAKING CHANGE - DAML Standard Library: Don't expose the
TextMap
type via thePrelude
anymore.How to migrate: Always import
DA.TextMap
when you want to use theTextMap
type. -
DAML Standard Library: Add
String
as a compatibility alias forText
.
Ledger API
-
BREAKING Removed the unused field
com.digitalasset.ledger.api.v1.ExercisedEvent
fromcom.digitalasset.ledger.api.v1.Event
, because a :com.digitalasset.ledger.api.v1.Transaction
never contains exercised events (only created and archived events): Issue #960This change is backwards compatible on the transport level, meaning:
- new versions of ledger language bindings will work with previous versions of the Sandbox, because the field was never populated
- previous versions of the ledger language bindings will work with new versions of the Sandbox, as the field was removed without any change in observable behavior
How to migrate:
- If you check for the presence of
com.digitalasset.ledger.api.v1.ExercisedEvent
when handling acom.digitalasset.ledger.api.v1.Transaction
, you have to remove this code now.
-
Added the
agreement text
as a new fieldagreement_text
to theCreatedEvent
message. This means you now have access to the agreement text of contracts via the Ledger API.
The type of this field isgoogle.protobuf.StringValue
to properly reflect the optionality on the wire for full backwards compatibility.
See Google'swrappers.proto
https://github.com/protocolbuffers/protobuf/blob/b4f193788c9f0f05d7e0879ea96cd738630e5d51/src/google/protobuf/wrappers.proto#L31-L34 for more information aboutStringValue
.See #1110 for details.
-
Fixed: the
CommandService.SubmitAndWait
endpoint no longer rejects commands without a workflow identifier.See #572 for details.
Java Bindings
-
BREAKING Reflect the breaking change of Ledger API in the event class hierarchy:
- Changed
data.Event
from an abstract class to an interface, representing events in a flat transaction. - Added interface
data.TreeEvent
, representing events in a transaction tree. data.CreatedEvent
anddata.ArchivedEvent
now implementdata.Event
.data.CreatedEvent
anddata.ExercisedEvent
now implementdata.TreeEvent
.data.TransactionTree#eventsById
is nowMap<String, TreeEvent>
(was previouslyMap<String, Event>
).
How to migrate:
- If you are processing
data.TransactionTree
objects, you need to change the type of the processed events fromdata.Event
todata.TreeEvent
. - If you are checking for the presence of exercised events when processing
data.Transaction
objects, you can remove that code now. It would never have triggered in the first place, as transactions do not contain exercised events.
- Changed
-
Java Codegen: You can now call a method to get a
CreateAndExerciseCommand
for each choice, for example:
.. code-block:: java
CreateAndExerciseCommand cmd = new MyTemplate(owner, someText).createAndExerciseAccept(42L);
In this case MyTemplate
is a DAML template with a choice Accept
and the resulting command will create a contract and exercise the Accept
choice within the same transaction.
See #1092 for details.
-
Added agreement text of contracts: #1110
-
Java Bindings
- Added field
Optional<String> agreementText
todata.CreatedEvent
, to reflect the change in Ledger API.
- Added field
-
Java Codegen
- Added generated field
Optional<String> TemplateName.Contract#agreementText
. - Added generated static method
TemplateName.Contract.fromCreatedEvent(CreatedEvent)
.
This is the preferred method to use for converting aCreatedEvent
into aContract
. - Added generated static method
TemplateName.Contract.fromIdAndRecord(String, Record, Optional<String>)
.
This method is useful for setting up tests, when you want to convert aRecord
into a contract without having to create aCreatedEvent
first. - Deprecated generated static method
TemplateName.Contract.fromIdAndRecord(String, Record)
in favor of the new static methods in the generatedContract
classes. - Changed the generated :ref:
decoder utility class <daml-codegen-java-decoder-class>
to use the newfromCreatedEvent
method. - BREAKING Changed the return type of the
getDecoder
method in the generated decoder utility class fromOptional<BiFunction<String, Record, Contract>>
toOptional<Function<CreatedEvent, Contract>>
.
- Added generated field
How to migrate:
-
If you are manually constructing instances of
data.CreatedEvent
(for example, for testing), you need to add anOptional<String>
value as constructor parameter for theagreementText
field. -
You should change all calls to
Contract.fromIdAndRecord
toContract.fromCreatedEvent
... code-block:: java
// BEFORE CreatedEvent event = ...; Iou.Contract contract = Iou.Contract.fromIdAndRecord(event.getContractId(), event.getArguments())); // AFTER CreatedEvent event = ...; Iou.Contract contract = Iou.Contract.fromCreatedEvent(event);
-
Pass the
data.CreatedEvent
directly to the function returned by the decoder'sgetDecoder
method.
If you are using the decoder utility class methodfromCreatedEvent
, you don't need to change anything... code-block:: java
CreatedEvent event = ...; // BEFORE Optional<BiFunction<String, Record, Contract>> decoder = MyDecoderUtility.getDecoder(MyTemplate.TEMPLATE_ID); if (decoder.isPresent()) { return decoder.get().apply(event.getContractId(), event.getArguments(); } // AFTER Optional<Function<CreatedEvent, Contract>> decoder = MyDecoderUtility.getDecoder(MyTemplate.TEMPLATE_ID); if (decoder.isPresent()) { return decoder.get().apply(event); }
-
Scala Bindings
-
BREAKING You can now access the agreement text of a contract with the new field
Contract#agreementText: Option[String]
.How to migrate:
- If you are pattern matching on
com.digitalasset.ledger.client.binding.Contract
, you need to add a match clause for the added field. - If you are constructing
com.digitalasset.ledger.client.binding.Contract
values, for example for tests, you need to add a constructor parameter for the agreement text.
- If you are pattern matching on
-
CreateAndExercise
support viacreateAnd
method, e.g.MyTemplate(owner, someText).createAnd.exerciseAccept(controller, 42)
.
See issue #1092 for more information.
Ledger
- Renamed
--jdbcurl
to--sql-backend-jdbcurl
. Left--jdbcurl
in place for backwards compat. - Fixed issue when loading scenarios making use of
pass
into the sandbox, see #1079. - Fixed issue when loading scenarios that involve contract divulgence, see
#1166. - Contract visibility is now properly checked when looking up contracts in the SQL backend, see
#784. - The sandbox now exposes the agreement text of contracts in :ref:
CreatedEvents <com.digitalasset.ledger.api.v1.CreatedEvent>
. See #1110
Navigator
- Non-empty
agreement texts
are now shown on the contract page above the section ``Contract details...
v0.12.17
0.12.17 - 2019-05-13
-
Making transaction lookups performant so we can handle such requests for large ledgers as well
-
Sandbox: Transactions with a record time that is after the maximum record time (as provided in the original command) are now properly rejected instead of committed to the ledger.
See issue #987 for details.
-
SDK: The Windows installer no longer requires elevated privileges.
To try it out, download the windows exe installer below. The Windows SDK uses the new
daml
command-line which will soon also
become the default on Linux and MacOS.Documentation is still in progress, but you can see the Migration guide if you have previously used the DAML SDK on Linux or OSX.
v0.12.16: release (#985)
0.12.16 - 2019-05-07
-
Contract keys: Fixed two issues related to contract key visibility.
See issue #969 and `issue #973 for details. -
Java Codegen: Variants with unserializable cases are now accepted.
See issue #946 for details. -
Java Bindings:
CreateAndExerciseCommand
is now properly converted in the Java Bindings data layer.
See issue #979 for details. -
DAML Integration Kit: Alpha release of the kit for integrating your own ledger with DAML. See the DAML Integration Kit docs for how to try it out.
-
DAML Assistant: Added a
quickstart-scala
DAML Assistant project template. -
DAML-LF Engine: If all labels in a record are set, fields no longer need to be ordered.
See issue #988 for details.
v0.12.15
0.12.15 - 2019-05-06
-
Windows support: Beta release of the Windows SDK.
To try it out, download the installer from GitHub releases. The Windows SDK uses the new
daml
command-line which will soon also
become the default on Linux and MacOS.Documentation is still in progress, but you can see the Migration guide and the pull request for the updated documentation.
-
DAML Standard Library: Added
fromListWith
andmerge
toDA.TextMap
. -
DAML Standard Library: Deprecated
DA.Map
andDA.Set
. Use the newDA.Next.Map
andDA.Next.Set
instead. -
Ledger API: Added three new methods to the :ref:
CommandService <com.digitalasset.ledger.api.v1.commandservice>
:SubmitAndWaitForTransactionId
returns the transaction ID.SubmitAndWaitForTransaction
returns the transaction.SubmitAndWaitForTransactionTree
returns the transaction tree.
-
Ledger API: Added field
transaction_id
to command completions. This field is only set when a command is successful. -
DAML Standard Library: Added instances of
Functor
,Applicative
, andAction
for(->) r
(the reader monad).
0.12.14 - 2019-05-03
- DAML Standard Library: The
id
function was previously deprecated and has now been removed. Useidentity
instead. - DAML and Assistant: The compiler no longer supports DAML-LF 1.0.
- DAML-LF: As a new "dev" minor version, writing with
--target 1.dev
is now supported by all tools by default. - Ledger API: You can now look up flat transactions with the new TransactionService methods
GetFlatTransactionByEventId
andGetFlatTransactionById
.
0.12.13 - 2019-05-02
- Fix an issue with Postgres of potentially not stopping the transaction stream at required ceiling offset. See more here
v0.12.12: Release 0.12.12 (#792)
0.12.12 - 2019-04-30
- Sandbox: Added support for using a Postgres database as a back end for the Sandbox, which gives you persistent data storage. To try it out, see tools/sandbox
- DAML Integration Kit: Added documentation for /daml-integration-kit/index. The docs explain what the DAML Integration Kit is, what state it is in, and how it is going to evolve.
- DAML Integration Kit: Released the Ledger API Test Tool. To try it out, see /tools/ledger-api-test-tool/index.
- DAML-LF: Removed DAML-LF Dev major version, --target dev option, and sandbox --allow-dev option.
- A "1.dev" target will handle the intended "Dev" use cases in a future release.
- Ledger API: The list of DAML packages used during interpretation is now included in the produced transaction.
- Scala: Source JARs are now released for Scala libraries.
- DAML Standard Library: Renamed DA.TextMap.filter and DA.Map.filter to filterWithKey.
- Contract keys: Fixed bug related to visibility and contract keys. For details, see issue #751.
- Contract keys: Fixed bug related witness parties in transaction events. For details, see issue #794.
v0.12.11: Release 0.12.11 (#713)
0.12.11 - 2019-04-26
- Node.js bindings have been moved here.
- Add documentation for flexible controllers.
0.12.10 — 2019-04-25
- Make DAML-LF 1.3 the default compilation target for the DAML compiler. This means that contract keys and text maps are now available by default in DAML.
0.12.9 — 2019-04-23
- Addition of
DA.Math
library containing exponentiation, logarithms and trig functions - Add CreateAndExerciseCommand to Ledger API and DAMLe for creating a contract and exercising a choice on it within the same transaction. This can be used to implement "callable updates" (aka functions of type
Update a
that can be called from the Ledger API via a contract). - Publish the participant-state APIs and reference implementations.
- Add
-s
option to Sandbox CLI to have a shortened version for--static-time
as well - Change
--allow-dev
to be a hidden CLI option in Sandbox
0.12.7 — 2019-04-17
- Fix release pipeline (hopefully)
0.12.6 — 2019-04-16
- RxJava Bindings: remove blocking call inside Bot.wire, which could lead to an application not making progress in certain situations.
0.12.5 — 2019-04-15
- Fix release pipeline (hopefully)
- DAML-LF Archive packaging: the DAML-LF Archive Protobuf definitions are now packaged so that it's possible to use them without mangling the path.
0.12.4 — 2019-04-15
v0.12.3
0.12.3 — 2019-04-12
- Fix navigator and extractor packaging in the SDK.
0.12.2 — 2019-04-12
- Add flexible controllers and disjunction choices to DAML.
- Introduce experimental support for using Postgres as a backend for the Sandbox. The optional CLI argument for it named
--jdbcurl
is still hidden. - Node.js Bindings: fix validation for Ledger API timestamp values.
- Node.js Bindings: drop support for identifier names, replacing them with separated module and entity names.
- Node.js Bindings: use strings instead of numbers to represent Ledger API timestamps and dates.
- Node.js Bindings: use strings instead of numbers to represent Protobuf 64-bit precision integers to avoid a loss of precision.
- Java Codegen: support DAML TextMap primitive which is mapped to
java.util.Map
type with keys restricted tojava.lang.String
instances. - Java Codegen: leaner log output.
- Java Codegen: add flag for log verbosity:
-V LEVEL
or--verbosity LEVEL
, whereLEVEL
is a number between0
(least verbose) and4
(most verbose). - BREAKING Remove support for DAML 1.0 packages in the engine, and thus the sandbox. Note that the SDK has removed support for compiling DAML 1.0 months ago.
0.12.1 — 2019-04-04
- Fix release process
0.12.0 — 2019-04-04
-
Change in how values are addressed in Navigator's
frontend-config.js
.-
Old syntax for accessing values:
argument.foo.bar
-
New syntax:
import { DamlLfValue } from '@da/ui-core'; // Accessing field 'bar' of field 'foo' of the argument DamlLfValue.evalPath(argument, ["foo", "bar"]) DamlLfValue.toJSON(argument).foo.bar
-