mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-10 10:46:11 +03:00
e1af564bcc
* Switch from `@silent` to `@nowarn`. This annotation is native to Scala 2.12.13+ and 2.13.2+. It replaces most usages of `@silent`. I had to get creative about a couple of use cases that didn't work. Specifically: 1. Suppressing deprecation warnings works, but Scala 2.12 erroneously complains that the `@nowarn` is unnecessary. I had to suppress this warning too with `-Ywarn-unused:-nowarn`. 2. I can't seem to suppress the warning, "The outer reference in this type test cannot be checked at run time." Instead, I have refactored the code to remove the warning. We still need to use the silencer plugin to suppress some warnings about unused imports (because of compatibility between Scala 2.12 and 2.13), but this means we no longer need the library, and therefore it is not a transitive dependency that downstream consumers need to worry about. CHANGELOG_BEGIN CHANGELOG_END * Add some comments around `@nowarn` support. * language-support/scala: Fix a warning suppression. * Revert to the default warnings. Compatibility was complaining. |
||
---|---|---|
.. | ||
src | ||
BUILD.bazel | ||
README.md |
Ledger Client Binding
This module contains the glue code between nanobot-framework
, scala-codegen
and prototype-client
(Scala binding for the ledger API). The gRPC API provided
by prototype-client
as it is is not type-safe. The incomming Transaction
s
from LedgerClient
is routed to DomainTransactionMapper
, which will:
- convert the data in
Transaction
to type-safe types coming fromapi-refinements
- call the
EventDecoder
provided byscala-codegen
for created events - verify that the messages contain all the neccessary fields, and remove
Optional
wrappers
The result of this will be the Domain*
classes.
In the other directions (for the commands coming out from the nanobots) the
'CompositeCommandAdapter' will be used to transform back to the gRPC interface
(SubmitRequest
). After the command submission, the outcoming Completion
will
be used to check the result, and based on that the CommandRetryFlow
can decide
wether the command should be retried or an error should be reported.