CHANGELOG_BEGIN
- [User Management]: add support for managing participant node users and authenticating
requests as these users using standard JWT tokens.
CHANGELOG_END
Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
Co-authored-by: Adriaan Moors <90182053+adriaanm-da@users.noreply.github.com>
* Update TODOs to outdated issues.
In particular update a lot of defunct interface TODOs to the LF 1.15
issue (or add the LF 1.15 issue if it's also relevant).
changelog_begin
changelog_end
* typo
* remove numeric/bignumeric todo
* scalafmt!!
* drop choice observer TODO
* Move toInterfaceContractId and fromInterfaceContractId out of Implements class
* Split Implements class into single-method classes
* Define toInterface outside its class to swap type arguments
This allows users to call 'toInterface @Interface', since the type of the template can usually be inferred
* Move interface classes and functions to DA.Internal.Interface
changelog_begin
changelog_end
Closes#11317
* Add warning for uses of 'controller ... can' syntax
* Remove uses of 'controller ... can' syntax
* Add test cases for -W{,no-}controller-can
* Update docs to reflect 'controller ... can' syntax deprecation
changelog_begin
* Deprecate 'controller ... can' syntax.
* It will be removed in a future version of Daml.
* Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
* Limit supported input versions in damlc to >= LF 1.8
1.8 was the version that introduced type synonyms, we really don’t
gain much by dropping more since data-dependencies mainly depends on
that. and this provides for a very natural upgrade path for users
where pretty much everyone should be able to upgrade directly to SDK
2.0 without having to go through intermediate versions.
changelog_begin
- [Daml Compiler] The supported input LF versions for
data-dependencies are now limited to LF 1.8 and newer.
changelog_end
* fix some tests
changelog_begin
changelog_end
* Drop export 1.6 tests
changelog_begin
changelog_end
* Drop daml2js support for LF < 1.8
changelog_begin
- [Daml2js] DARs with LF version < 1.8 are no longer supported.
changelog_end
* .
changelog_begin
changelog_end
* bash is bad, stop using it
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
This adds support for fixed choices to the TS codegen. However,
currently this fails because the JSON API does not accept interface
template ID's when exercising a choice.
CHANGELOG_BEGIN
CHANGELOG_END
* Drop LF < 1.14 from supported damlc output versions
fixes#11319
We keep test coverage by depending on the most recent snapshot which
still has 1.14 support.
changelog_begin
- [Daml Compiler] Damlc can only produce Daml-LF 1.14 or
newer. Passing aynthing older to `--target` is an error. If you
need to produce older versions, use an older SDK.
changelog_end
* Switch around legacy_compiler_lf_versions
changelog_begin
changelog_end
* drop since-lf
changelog_begin
changelog_end
* [Self-service error codes] Enabled by default
* Flag changed to `use-pre-1.18-error-codes` (disabled by default)
CHANGELOG_BEGIN
[Ledger API Specification] The Ledger API returns enriched error codes (see https://docs.daml.com/error-codes/self-service/index.html)
For backwards-compatibility, a new API flag `--use-pre-1.18-error-codes` is introduced for preserving the legacy behavior for
clients that want to migrate incrementally to the changed gRPC status code responses and error details format.
CHANGELOG_END
* Adapted HttpServiceIntegrationTest
* Renamed `Feature Flag` to `Configuration` in docs
* Fix Daml Script tests
changelog_begin
changelog_end
* Fix Repl functests
changelog_begin
changelog_end
* Fix haskell binding tests
changelog_begin
changelog_end
* Fix CommandClientIT test
* Fixed Sandbox and CommandServiceBackpressureIT tests
Please enter the commit message for your changes. Lines starting
* Adapt //compiler/damlc/tests:repl-functests again
* Fix more tests and address Miklos' comments
* Flag name changed to `grpc-status-codes-compatibility-mode`
* Remove useless flags sandbox-classic
* Sandbox-classic tests fix for ContractKeysIT and ExceptionsIT
* Created 2 deprecated test suites that have the more generic assertions as returned
by the deprecated in-memory backend
* More fixes for CommandServiceIT
* Fixes compilation issue with the deprecated exceptionsIT class for Sandbox-classic in-memory
* Compatibility mode for old test tools
* Change flag name to `use-pre-1.18-error-codes`
* Apply suggestions from code review
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
* Update ghc patch
* Replace Implements proxy datatype with a class
* Expose 'Implements' class in Prelude
* Add DA.Internal.Desugar.HasMethod class
This allows us to get the type of a method of an interface through the functional dependency
* Convert interfaces from new desugaring
* Update Interface daml-test-file to use Interface class functions
* Update InterfaceDesugared daml-test-file
* Replace remaining uses of Is<Interface> methods with Implements
* Document HasMethod, Method and mkMethod
* Ignore _method_ bindings in convertBind
* Ignore interface desugaring types/classes/instances/functions in LF conversion
* update snapshot after pin on windows
changelog_begin
changelog_end
* Update to Java 11
changelog_begin
changelog_end
* Fix RoundingMode deprecation warnings
* Fix dep-ann warning
* Integer constructor
* JavaX annotation dependency
* javax.xml.bind was removed in Java 11
Using Guava as a replacement, since it is already a project dependency.
* JDK 11 no longer has a separate JRE tree
* Remove unused jdk_nix import
* remove now redundant jdk11_nix
* Java 8 --> 9 increased Instant.now() precision
See https://bugs.openjdk.java.net/browse/JDK-8068730
The precision of `Instant.now()` increased between Java 8 and Java 9.
On Linux and MacOS this doesn't seem to be a problem, as the precision
still seems to be at micro seconds. However, on Windows this now causes
errors of the following form:
```
java.lang.IllegalArgumentException: Conversion of Instant
2021-11-05T13:58:56.726875100Z to microsecond granularity would result
in loss of precision.
```
Suggesting that it now offers sub-microsecond precision.
`TimestampConversion.instantToMicros` had a check to fail if the
conversion lead to a loss of precision. In the specific failing test
case this is not a concern, so this adds a `roundInstantToMicros`
variant that avoids this kind of error.
* TMP round timestamps
* Revert "TMP round timestamps"
This reverts commit af8e261278.
* Skip versions before 1.6.0 in migration tests
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
The encoder just took the keys & values as is which clearly falls
apart once those actually contain anything else that requires encoding
changelog_begin
- [Typescript Bindings] Fix an issue where nested maps did not get
encoded properly before sent to the JSON API which caused requests
to fail with a decoding error on the JSON API.
changelog_end
I’ve kept the infrastructure for versioned_scala_deps around because
I’m optimistic and hope that eventually we’ll do another Scala upgrade.
changelog_begin
changelog_end
* Changes to renable ws multiplexing
CHANGELOG_BEGIN
[TS-BINDINGS] Re-enable ws multiplexing for stream queries after resolving the reconnect connection close bug associated with ws state and liveness.
CHANGELOG_END
* websocket is passed as an argument to the onMessage handler
* consistently use 'manager' reference instead of 'this' in the handleQueries change method
CHANGELOG_BEGIN
[TS-Bindings] Ws multiplexing for stream queries is disabled by default as we investigate issues
of intermittent websocket closures.
CHANGELOG_END
* Use error validators in ApiPackageManagementService
CHANGELOG_BEGIN
CHANGELOG_END
* Exclude PackageManagementServiceIT from compatibility tests after 1.17
CHANGELOG_BEGIN
CHANGELOG_END
* Remove virtual choices
* Remove choices without a body in 'interface' definition
* Remove choices in 'template ... implements' section
part of #11372
changelog_begin
changelog_end
* Remove virtual choices cont.
Switch uses of virtual choices to fixed choice with method implementation
* update snapshot after pin on windows
* Disable failing interface tests with TODO #10810
See #11358.
CHANGELOG_BEGIN
- [@daml/react] Our React bindings now request the `react` library as a
peer dependency, and will accept React 17 in addition to the current
React 16. For new projects, the `create-daml-app` template now uses
React 17.
CHANGELOG_END
* Initial work-in-progress
changelog_begin
[TS bindings] When using daml-react and daml-ledger, all streaming request to the query endpoint will be multiplexed through a single web socket.
changelog_end
* Minor touches, renaming
* Handle offsets received from the JSON API
* Create state array once per downstream consumer
* Handle reconnections as streamSubmit does
* Don't share mutable state between events
* Fix compilation errors
* Remove language-support/ts/package-lock.json
* Remove --downlevelIteration option, materialize iterators, fix one test
* I will refrain from commenting on the meaning of `this` in JavaScript
* WebSocket does not have a removeAllListeners method
* Remove unnecessary docstring from `handleQueriesChange`
* Address https://github.com/digital-asset/daml/pull/10221#discussion_r670441680
* Address https://github.com/digital-asset/daml/pull/10221#discussion_r670427941
* Address https://github.com/digital-asset/daml/pull/10221#discussion_r670448474
* Address https://github.com/digital-asset/daml/pull/10221#discussion_r670473307
* Fix some failing tests and linting fixes
* fix reconnect on server close test
* fix failing tests in test.ts and create-daml-app tests
* Update language-support/ts/daml-ledger/index.ts
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Update language-support/ts/daml-ledger/index.ts
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Update language-support/ts/daml-ledger/index.test.ts
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Update language-support/ts/daml-ledger/index.test.ts
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* changes based on code review comments
Co-authored-by: Akshay <akshay.shirahatti@digitalasset.com>
Co-authored-by: akshayshirahatti-da <86774832+akshayshirahatti-da@users.noreply.github.com>
* Add DA.Internal.NatSyn as a stable package
This module exposes a type NatSyn, to be used for encoding
type synonyms of Nat-kinded types
* Add generalized roundtrip test helpers in LFConversion tests
roundtripTestsBy and roundtripTestsPartialBy are like their
non-By versions, except they take an explicit equality predicate
instead of relying on the Eq instance. This allows the source
and target types to differ.
* Define encoder/decoder for type synonyms
This works by saturating the RHS of the declaration with artificial
variable names and adding the corresponding parameters on the LHS
In the case of Nat type synonyms, the Proxy-like
DA.Internal.NatSyn.NatSyn type is used to wrap the value into
something of kind star.
* Use type synonym encoder/decoder when generating/consuming DALF
This closes#11226
changelog_begin
changelog_end
* Extend type synonyms over data-dependencies test
* Add test cases for multi-param type class synonyms
* interface: adding interfaces to the TS codegen
We add TS interfaces corresponding to Daml interfaces to the generated
TS code.
CHANGELOG_BEGIN
CHANGELOG_END
* Update language-support/ts/codegen/README.md
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Update language-support/ts/codegen/src/TsCodeGenMain.hs
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* comment on pure interface methods
* added comment on substitutions
* extend example/tests to two implementations
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* [Self-service error codes] Implement V2 in Authorizer
CHANGELOG_BEGIN
CHANGELOG_END
* Added unit test for authorize (non-streamed)
* Fix after rebase
* Do not expose the error codes switching mechanism to the Java bindings
* Adjust InternalAuthorizationError to be SystemInternalAssumptionViolated
* Parameter names in test
* Testing AuthorizationInterceptor with regard to returned error codes
* Do not use default error code version switchers at instance creation
* Addressed Pawel's review comments
* Using ErrorFactories for error dispatching
* Pass loggingContext to Authorizer where available
* Generic internal authorization error
* a model for trapping client errors in Scala bindings shim and reporting correctly
* clean up some nesting with an alias
* filter out client-side command service errors
* fix flattening error propagation of CommandService errors in endpoints
* remove todo
* Daml evaluation triggers INVALID_ARGUMENT; handle this for creates/exercises
* clean up lookupResult
* remove stripLeft utility; it is unused
* proper error propagation for /parties endpoint
* map grpc status codes to HTTP error codes
* add a case to pass-through gRPC errors in Endpoints errors
* handle gRPC status in all explicit top-level catches
* pass through gRPC errors in CommandService as well
* treat a gRPC status anywhere in the causal chain as indicating participant-server error
* propagate ContractsService errors without assuming they will always be ServerErrors
* filter ServerErrors' contents when rendering errorful streams
* log errors from websocket output instead of rendering full messages
* hide message in ServerError case
* remove Aborted
* transfer with bad contract ID now returns 409
* mention new error codes
* add changelog
CHANGELOG_BEGIN
- [JSON API] Several kinds of gRPC server errors are now reported with
associated HTTP statuses; for example, a Daml-LF interpreter error now
returns a 400 instead of a 500, and an exercise on an archived contract
returns a 409 Conflict instead of a 500. Errors internal to JSON API
(e.g. internal assertion failures) are no longer detailed in the HTTP
response; their details are only logged.
See `issue #11184 <https://github.com/digital-asset/daml/pull/11184>`__.
CHANGELOG_END
* remove unused Show and liftErr utility
* adapt daml-script to new error codes
* adapt typescript tests to new error codes
* adapt json-api failure tests to new error codes
* For the client binding propagate the full original completion.
Because more fields are added to the completion it gets more difficult to deconstruct it into our own models while keeping the same external API. Because of this, we are propagating the full completion as well
CHANGELOG_BEGIN
java-client-bindings - the original full completion is included in the `CompletionResponse` when available
CHANGELOG_END
changelog_begin
changelog_end
Visualizes the top-most exception as part of the test failure when the expected
gRPC error code is not found in the stack trace. This should hopefully improve
our chances to identify the cause of flakes such as the one reported as part of
https://github.com/digital-asset/daml/issues/10974.
Example output in case of a failing match:
```
- should deny access without sufficient authorization *** FAILED *** (39 milliseconds)
listPackages java.lang.RuntimeException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: did not equal DEADLINE_EXCEEDED (AuthMatchers.scala:38)
```
Before this commit, the output for a similar failure would be the something like:
```
- should deny access without sufficient authorization *** FAILED *** (208 milliseconds)
getPackageStatus <iterator> was empty (AuthMatchers.scala:16)
```
* Add daml interfaces to the Haskell LF AST
Just copied from Sofia’s PR with no changes and stubbed all usages of
it that aren’t trivial.
changelog_begin
changelog_end
Fixes#10383
CHANGELOG_BEGIN
- [Java Bindings] DamlLedgerClient.Builder allows to set a timeout for command using `withTimeout`.
CHANGELOG_END
Co-authored-by: Stefano Baghino <stefano.baghino@digitalasset.com>
* Add the LedgerClientWithoutLedgerId class
* Minimize diff
changelog_begin
changelog_end
* Minimize diff further
* Add missing license header & reformat
* Update language-support/scala/bindings-akka/src/main/scala/com/digitalasset/ledger/client/binding/LedgerClientBinding.scala
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Update ledger/ledger-api-client/src/main/scala/com/digitalasset/ledger/client/LedgerClient.scala
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Add changelog
changelog_begin
- [Ledger Client Scala Bindings] A new variant of the LedgerClient class
was added called `LedgerClientWithoutLedgerId`. This class does not
need a ledger id at initialization. It was added to allow skipping
any checks at initialization for use cases where either the
ledger id is not known at initalization or no valid token can be fed
at initialization for checking the ledger id. Furthermore for each
classes `ActiveContractSetClient`, `CommandClient`, `PackageClient`,
`TransactionClient`, `VersionClient` now exists a variant which
doesn't depend on a ledger id at initialization and instead requires
one for every function as parameter. Moreover the existing classes
are extending these classes with overriding the methods and setting
the default of the parameter with the given ledger id from
initialization. The class `LedgerClientWithoutLedgerId` already
makes usage of these variants e.g. `PackageClientWithoutLedgerId`.
changelog_end
* More changelog
changelog_begin
- [Ledger Client Scala Bindings] The function `transactionSource` of the
class `LedgerClientBinding` now optionally accepts a token which is
passed on to the unterlying call.
changelog_end
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* participant-integration-api: On submit and wait, capture a deadline.
We need this deadline to make sure we terminate the stream.
* ledger-api-client: Use the specified expiry time for tracking.
Not the command deduplication time.
CHANGELOG_BEGIN
- [Ledger API Server] The command deduplication time is no longer used
for determining the period of time to track the command before giving
up. Instead, the gRPC deadline is used. If no deadline is provided
(or if the deadline exceeds the command tracker retention period), the
tracker retention period is used instead.
CHANGELOG_END
* ledger-api-client: Keep supporting the `deduplication_time` timeout.
* ledger-api-client: Improve comments in CommandTrackerFlow and its tests.
Co-Authored-By: Miklos <57664299+miklos-da@users.noreply.github.com>