* Update bazel-common to fix javadoc issues
Specifically, to fix the following error
```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
javadoc_library(name = 'rs-grpc-bridge_javadoc')
File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```
* Define Maven deps using rules_jvm_external
* Pin artifacts
* Remove bazel-deps generated targets
* Remove bazel-deps
* Switch to rules_jvm_external targets
* update bazel documentation
* pom_file: There are no more bazel-deps targets
* BAZEL-JVM.md `maven_install` typo
* Fix automatic retry mechanism in scala bindings.
This fix only affects the usage of
com.digitalasset.ledger.client.binding.LedgerClientBinding#retryingConfirmedCommands
The retry mechanism didn't distinguish between submission failures and
final completion failures. Retrying completion failures with the same
commandId doesn't make sense, as the deduplication mechanism will kick
in.
The new mechanism now only retries commands with an updated LET and MRT
in case the server responds with a RESOURCE_EXHAUSTED status code (i.e.
backpressure).
Fixes#3057.
* Add UNAVAILABLE as retryable error code
* fix unreleased.rst
* Add helper to Java Bindings to prepare transformator for Bot.wire. Fixes#3097
* Java bindings: rename to contractTransformer
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Rename to transformer
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Keep error info for invalid class
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Add generic info to declaration
* Add test for contract tranformer
* Add license header
* Improve contractTransformer by storing reflection results
* Rename folder scala to java
* Add maven coordinates tag
* rename bazel goal back to bindings-java-tests
* integrate contract transformation test with codegen
* manual merge on unreleased.rst
* add daml model for integration testing
* stack setup for HLB and Nim
* build_packages.sh and daml-ledger.cabal
* update README
* export-package for daml-ledger
* export-package, run here
* find tmp daml-ledger
* update README for review comments
* ref daml instructions
* further improve the process and documentation in response to comments
* have -with-rtsopts match the bazel build
* fixes for Gary
* add Numeric.java
* ledger-api: rename `decimal` field to `numeric` in value protobuf
* Address Gerolf's comment
* ledger-api: add missing renammings
* ledger-api: relax syntax of numbers that can be sent as numerics
* extractor: fix
* leger-api: change format of number though ledger api
* daml-lf: fix numeric regexp
* ledger: fix tests
* hlb, remove dependency on DAML-LF libs
* Update language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs
newtype instead of data
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Refactor gRPC request cancellation support in gRPC-haskell
Previously, we had a separate constructor that took an additional
callback that had access to the client call so that we could use that
for cancellation. This PR removes the separate constructor and instead
changes the callback accepted by ClientReaderRequest (and for
consistency also the one accepted by ClientBiDiRequest) to pass the
client call.
This seems like a simpler solution so I’m more hopeful that we will be
able to upstream this change (this is the only API breaking change we
made afaik). There are two caveats here:
1. This will break existing consumers that use ClientReaderRequest. At
this stage in gRPC-haskell this is very reasonable and upstream
doesn’t seem to try very hard to avoid those.
2. The callback is called slightly later than the custom callback we
added before so you have to wait a bit longer until you can cancel
things. At least on our test suite that doesn’t seem to make a
difference.
* Go back to building grpc-haskell-core using c2hs
This should hopefully avoid issues like the CSize vs CULong issue we
had a while back and might fix some of the issues we have been seeing
on CI.
I’m marking the Haskell ledger bindings as non-flaky for now so we can
see if the issues reappear.
* Fix path
* Fix c2hs runfiles
* s/basedir/dirname/
* Fix varname
* Remove fixme \o/
* Mark hs ledger bindings flaky again
The only tests that relied on this, were the ones for package
management and party management but we can fairly easily remove that
dependency by only checking the diff in packages and thereby folding
the listKnown* and uploadParty/uploadDar file into a combined test.
I’ve also bumped one timeout that I’ve seen fail on CI and managed to
get to fail locally under load.
I am unable to get the tests to fail now locally so I’ve marked them
as non-flaky on everything but Windows (we’ve seen weird segfaults
there).
* Use per-test parties in HS ledger bindings tests
This should hopefully solve the flakiness issues caused by the reset
service. For now, there is a very small number of tests that we run on
an isolated sandbox namely the tests for party management and package
management.
* shut up hlint
* Disable reset tests
* Supporting producing sdist tarballs for the HS ledger bindings
The README.md has an explanation for how you can use this.
This should hopefully allow others to experiment with the bindings.
* Read stakeholders through the active contract service
Fixes#2070
Also standardizes the use of American English spelling for `serialize`
and `deserialize`. Standardize. Serialize. Americanize.
* Remove Haskell bindings test workaround
* Address https://github.com/digital-asset/daml/pull/2316#discussion_r308193661
This is a breaking change on the ledger api. So far we could rely on the
assumption that contractId == eventId. This assumption doesn't hold
anymore in a daml-on-x setting, where the eventId is created by the
api server, but the absolute contractId is created by the ledger
implementation.
Instead of going through weird contortions to store the relevant data in
the existing database schema, it is more viable in the long term to
remove that field and instead provide facilities to lookup transactions
by contractId.
Contributes to #2068.