Daml Connect 1.11.0 has been released on Wednesday March 10th. You can install it using:
daml install latest
Want to know what's happening in our developer community? Check out the latest update for this month.
daml test
now includes coverage output so you can easily see which Templates and Choices are tested.
The only impact of this release is that with the switch from Daml-LF 1.8 to Daml-LF 1.11, the “no” contract-id-seeding mode in Sandbox Classic is no longer available by default. As already indicated in the Daml Connect 1.10 release notes, users must either pin the Daml-LF version to Daml-LF 1.8, or explicitly choose a new seeding mode. The recommended mode is “strong”.
Background
Daml-LF is Daml’s intermediary language, analogous to Java bytecode. With Daml Connect 1.11, Daml-LF 1.12 is now stable and frozen, and Daml-LF 1.11 is the new default version. Daml-LF 1.12 is supported by Daml Ledger API 1.10 upwards. The changes in Daml-LF 1.12 are non-functional. Significantly smaller transaction sizes on the wire and in storage provide performance improvements.
Daml-LF 1.12 will become the new default version with the April 2021 Daml Connect release. Until then, you can enable Daml-LF 1.12 in your daml.yaml
file by adding the stanza:
build-options:
- --target=1.12
Specific Changes
Impact and Migration
Sandbox Classic’s default contract seeding mode no
is not compatible with Daml-LF 1.11. If you use Sandbox Classic, you need to either pin the Daml-LF version to <= 1.8 or switch contract seeding mode. If you do neither, Sandbox Classic will present you with an error informing you that you need to do one or the other.
We recommend doing one of the following:
If you are relying on the human-readable, stable contract-ids for demo purposes, pin the Daml-LF version by adding this stanza to your daml.yaml
:
build-options:
- --target=1.8
If you would like Sandbox Classic to resemble production ledgers more closely, switch contract id seeding mode by adding:
sandbox-options:
- --contract-id-seeding=strong
Background
The daml test
command runs all Daml Scripts (and Scenarios) in a Daml project and reports their results. A common feature request has been to also report on test coverage and allow the inclusion of tests in dependencies, thus offering better support for multi-package projects. The new features provide both of these capabilities.
Specific Changes
daml test
command has gained a flag --all
, which includes scripts and scenarios from dependencies in the list of tests being run.daml test
command has gained a flag --show-coverage
, which shows a test coverage report.
daml/User.daml:test: ok, 2 active contracts, 3 transactions.
test coverage: templates 50%, choices 50%
templates never created:
User:MyTemplate
choices never executed:
User:MyTemplate:Archive
User:MyTemplate:MyChoice
Impact and Migration
This is a purely additive change.
Background
Successful Daml Script executions in Daml Studio show a tabular view of the final ledger state by default. With this change, that view is now also available for failed executions, making debugging a failure easier.
Specific Changes
Impact and Migration
This is a purely additive change.
Background
The Daml Driver for PostgreSQL has gained two new features that make it easier and safer to operate in a production environment.
Specific Changes
--sql-start-mode migrate-only
. See the documentation for full details. --database-connection-pool-size
flag.
{- DLINT ignore functionName "hintName" -}
to your Daml source files. For example:
{- DLINT ignore noHint "Use concatMap" -}
noHint f xs = concat (map f xs)
--log-level=INFO
. A sample message is
17:06:27.099 [sandbox-akka.actor.default-dispatcher-4] INFO c.d.p.a.s.ApiSubmissionService - Submitting transaction (context: {readAs=[], submittedAt=2021-03-03T16:06:27.093385Z, applicationId=myproject, deduplicateUntil=2021-03-04T16:06:27.093385Z, actAs=[Alice], commandId=91f433da-daae-49d3-9336-783b86956a60})
--log-level=DEBUG
. A sample message is
17:11:35.771 [sandbox-akka.actor.default-dispatcher-9] DEBUG c.d.p.a.s.t.ApiTransactionService - Responding with transactions: List(Map(commandId -> 8863aaac-3597-4001-b839-e1813f4576ba, transactionId -> 0A2439343435613763382D316665352D333635382D383933612D393033373966313763353231, workflowId -> , offset -> 00000000000000070000000000000000)) (context: {startExclusive=00000000000000050000000000000000, endInclusive=, parties=[Alice]})
Set
was fixed. See #8854 for details.
ByteString
in kvutils are now strongly typed. Users of kvutils will need to use the Raw.Bytes
subtypes to represent the various keys and values that flow through a kvutils-based driver. ByteStrings representing keys need to be wrapped in either Raw.LogEntryId
or Raw.StateKey
, and ByteStrings representing value envelopes need to be wrapped in Raw.Envelope
. This prevents accidentally confusing one for the other. Implicit conversions have been provided for Scala users, which should ease the transition. They are marked @deprecated
and will be removed before the release of Daml SDK v1.12.