Releases: digital-asset/daml
v0.13.5
Sandbox
- Introduced a new API for package management.
See [#1311]. - Fixed a bug in migration scripts that could cause databases originally created with older versions of the Sandbox to not upgrade schemas properly.
See [#1682].
Java Codegen
- Support generic types (including tuples) as contract keys in codegen.
See [#1728].
Ledger API
- A new command
ExerciseByKeyallows to exercise choices on active contracts referring to them by their key.
See [#1366].
Java Bindings
- The addition of the
ExerciseByKeyto the Ledger API is reflected in the bindings.
See [#1366]. - Release the Java Bindings to the public Maven Central repository. To move to using the Maven Central repository, remove the
<repository>...</repository>and<pluginRepository>...</pluginRepository>blocks from Maven POM files that use version 0.13.5 (or later) of the Java Bindings.
See [#1205].
DAML Studio
- Closing and reopening scenario results will now show the results
instead of an empty view.
See [#1606]. - The IDE now executes tasks in parallel.
Docs
- Added 'An introduction to DAML'.
- Added 'Visualizing DAML Contracts'.
Language
- Add an instance for
IsParties (Optional Party), allowingOptionalvalues to be used insignatory,observerandmaintainerclauses.
v0.13.0
SDK
- This marks the first release that is no longer released for the
daassistant. It is still possible to use it to get older SDK
releases. Take a look at documentation for the newdaml
assistant for migration instructions.
Sandbox
- Fixed a bug in an internal data structure that broke contract keys.
See #1623.
DAML Studio
- Double the gRPC message limit used for the scenario service. This
avoids issues on large projects.
Ledger API
- Slash (/) is now an allowed character in contract, workflow, application
and command identifiers.
v0.12.25
0.12.25 — 2019-06-13
DAML Integration Kit
- Added new CLI flag
--all-teststo the Ledger API Test Tool to run all default and optional tests. - Added new CLI flag
--command-submission-ttl-scale-factorto the
Ledger API Test Tool. It scales time-to-live of commands sent for ledger processing (captured as Maximum Record Time in submitted transactions) for some suites. Useful to tune Maximum Record Time depending on the environment and the Ledger implementation under test. - Fixed various bugs in the daml-on-x ledger api server and index service.
Sandbox
- Introduced a new API for party management.
See #1312.
Scala bindings
- New
--rootcommand-line option for limiting what templates are selected for codegen.
See #1210.
Ledger API
- Contract keys are now available for created events from the transaction service.
See #1268.
Java Bindings
- The addition of contract keys on created events in the Ledger API is reflected in the bindings.
See #1268.
Java Codegen
- Contracts decoded from the transaction service now expose their contract key (if defined).
See #1268.
v0.12.24
0.12.24 - 2019-06-06
DAML Studio
- Fix errors due to unhandled
$/cancelRequestandtextDocument/willSaverequests from showing up in the output tab in VSCode. These errors also caused an automatic switch from the problems tab to the output tab which should now no longer happen. - Note that upgrading the VSCode extension requires launching it via
daml studio. If you launch VSCode directly, you might get issues due to an outdated extension.
0.12.23 - 2019-06-05
SQL Extractor
- 50MiB is no longer hard-coded on extractor input for sandbox or any other server, permitting large packages, e.g. pass
--ledger-api-inbound-message-size-max 62914560to extractor to get a 60MiB limit. See #1520. - Improving logging. See #1518.
DAML Language
- BREAKING CHANGE: Contract key maintainers must now explicitly be computed from the contract key using the implicit
keyvariable. For instance, if you havekey (bank, accountId) : (Party, Text)and wantbankto be the maintainer, you have to writemaintainer key._1(before, you could writemaintainer bank).
DAML Compiler
-
BREAKING CHANGE: Drop support for DAML-LF 1.3. Compiling to DAML-LF 1.4 should work without any code changes, although we highly recommend not specifying a target DAML-LF version at all. (The ledger server still supports DAML-LF 1.3.)
-
Fix initialization of package-db for non-default DAML-LF versions. This fixes issues when using
daml build --target 1.3(or other target versions).
DAML Standard Library
- Add
enumeratefunction.
Navigator
- Fixed a regression where Navigator console was not able to inspect contracts and events. See #1454.
- 50MiB is no longer hard-coded on extractor input for sandbox or any other server, permitting large packages, e.g. pass
--ledger-api-inbound-message-size-max 62914560to extractor to get a 60MiB limit. See #1520.
Sandbox
- Added recovery around failing ledger entry persistence queries using Postgres. See #1505.
v0.12.22
0.12.22 - 2019-05-29
DAML Studio
- Fixed a bug where type check errors would persist if there was a subsequent parse error.
DAML Compiler
- BREAKING CHANGE: Drop support for DAML-LF 1.2. Compiling to DAML-LF 1.3 should work without any code changes, although we highly recommend not specifying a target DAML-LF version at all.
- BREAKING CHANGE: By default
damlc testmust be executed in a project and will test the whole project. Testing individual files, potentially outside a project, requires passing the new--filesflag.
SQL Extractor
-
The extractor
--partyoption may now specify multiple parties, separated by commas;
e.g. instead of--party Bobyou can say--party Bob,Bar,Bazand get the contracts
for all three parties in the database.
See#1360 <https://github.com/digital-asset/daml/pull/1360>__. -
The extractor
--templatesoption to specify template IDs in the format:
<module1>:<entity1>,<module2>:<entity2>. If not provided, extractor subscribes to all available templates.
See#1352 <https://github.com/digital-asset/daml/issues/1352>__.
Sandbox
- Fixed a bug in the SQL backend that caused transactions with a fetch node referencing a contract created in the same transaction to be rejected.
See issue #1435.
v0.12.21
Release Notes
SDK version: 0.12.21
Release date: 2019-05-28
DAML Assistant
-
The
exposed-modulesfield indaml.yamlis now optional. If it is
not specified, all modules in the project are exposed.
See #1328. -
You can now see all available versions with
daml versionusing the--allflag.
DAML Compiler
-
BREAKING CHANGE: Drop support for DAML-LF 1.1. Compiling to DAML-LF 1.2 should work without any code changes, although we highly recommend not specifying a target DAML-LF version at all.
-
Make DAML-LF 1.5 the default version produced by the compiler.
DAML Standard Library
parseIntandparseDecimalnow work at more extremes of values and accept leading plus signs.
DAML-LF
- Add new version 1.5. See DAML-LF 1 specification for details.
v0.12.20
DAML Assistant
The daml assistant is now ready to be used and the old da assistant will be deprecated in the near future. See https://docs.daml.com/tools/assistant.html for migration instructions.
Sandbox
- Contract keys: Support arbitrary key expressions (this was accidentally omitted from 0.12.19).
v0.12.19
Ledger
-
Transaction filters in
GetTransactionsRequestwithout any party are now rejected withINVALID_ARGUMENTinstead 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
.darpackages immediately
with the--eager-package-loadingflag. 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
dacommands withdamlcommands. 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
damlAssistant, see tools/assistant.
DAML
-
BREAKING CHANGE - DAML Compiler: It is now an error to omit method bodies in class
instances 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
TupleandEithertypes todaml-prim:DA.Typesrather 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.TupleandDA.Internal.PreludewithDA.Types.
-
BREAKING CHANGE - DAML Standard Library: Don't expose the
TextMaptype via thePreludeanymore.How to migrate: Always import
DA.TextMapwhen you want to use theTextMaptype. -
DAML Standard Library: Add
Stringas a compatibility alias forText.
Ledger API
-
BREAKING Removed the unused field
com.digitalasset.ledger.api.v1.ExercisedEventfromcom.digitalasset.ledger.api.v1.Event, because a :com.digitalasset.ledger.api.v1.Transactionnever 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.ExercisedEventwhen handling acom.digitalasset.ledger.api.v1.Transaction, you have to remove this code now.
-
Added the
agreement textas a new fieldagreement_textto theCreatedEventmessage. This means you now have access to the agreement text of contracts via the Ledger API.
The type of this field isgoogle.protobuf.StringValueto properly reflect the optionality on the wire for full backwards compatibility.
See Google'swrappers.protohttps://github.com/protocolbuffers/protobuf/blob/b4f193788c9f0f05d7e0879ea96cd738630e5d51/src/google/protobuf/wrappers.proto#L31-L34 for more information aboutStringValue.See #1110 for details.
-
Fixed: the
CommandService.SubmitAndWaitendpoint 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.Eventfrom an abstract class to an interface, representing events in a flat transaction. - Added interface
data.TreeEvent, representing events in a transaction tree. data.CreatedEventanddata.ArchivedEventnow implementdata.Event.data.CreatedEventanddata.ExercisedEventnow implementdata.TreeEvent.data.TransactionTree#eventsByIdis nowMap<String, TreeEvent>(was previouslyMap<String, Event>).
How to migrate:
- If you are processing
data.TransactionTreeobjects, you need to change the type of the processed events fromdata.Eventtodata.TreeEvent. - If you are checking for the presence of exercised events when processing
data.Transactionobjects, 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
CreateAndExerciseCommandfor 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> agreementTexttodata.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 aCreatedEventinto 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 aRecordinto a contract without having to create aCreatedEventfirst. - Deprecated generated static method
TemplateName.Contract.fromIdAndRecord(String, Record)in favor of the new static methods in the generatedContractclasses. - Changed the generated :ref:
decoder utility class <daml-codegen-java-decoder-class>to use the newfromCreatedEventmethod. - BREAKING Changed the return type of the
getDecodermethod 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 theagreementTextfield. -
You should change all calls to
Contract.fromIdAndRecordtoContract.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.CreatedEventdirectly to the function returned by the decoder'sgetDecodermethod.
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.Contractvalues, for example for tests, you need to add a constructor parameter for the agreement text.
- If you are pattern matching on
-
CreateAndExercisesupport viacreateAndmethod, e.g.MyTemplate(owner, someText).createAnd.exerciseAccept(controller, 42).
See issue #1092 for more information.
Ledger
- Renamed
--jdbcurlto--sql-backend-jdbcurl. Left--jdbcurlin place for backwards compat. - Fixed issue when loading scenarios making use of
passinto 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 textsare 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
damlcommand-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.