* use with syntax in Daml
* attend to code review comments
* move ledger services implementation to own sub-module
* use ledger reset service when running tests for haskell-ledger-bindings
* expose LL.ClientCall in high level interface
* cancel streaming gRPC calls when attached stream is closed
* fix modification to gRPC-haskell so existing interface in preserved
* ClientCall and clientCallcancel were already available on HighLevel interface
* Add RemoteApiProxy fixture type.
This is in preparation for using Sandbox IT suite as part of the Ledger API Test
Tool.
* ledger-api-test-tool: Drop reset functionality.
This is no longer necessary for the tool and it does not scale with the types of
tests in the suite.
* integration-tests: Fail if the server under fixture is stuck.
This makes sure that a server getting stuck will get detected by a test, instead
of ignoring it and potentially allowing the server to linger.
* integration-test: Make semantic testing runs independent.
It manges parties and command identifier to include a unique (random) suffix in
all ledger-commited identifiers. This allows the test to run against a Ledger
API without reseting it.
* ledger-api-test-tool: Unify test code using scenario runner with IT suite.
This reuses the scenario runner test code from the IT suite, instead of
reimplementing it. This should be a no-op (except for tests reports formatting).
* Review fixes.
* Ledger API Test Tool: Provide logback config.
This quites Ledger API Test Tool output.
* Make sure akka threads are terminated at end of test runs.
This makrs Akka threads to be daemons, hence forcing them to be closed at the
end of Ledger Api Test Tool.
* Use Ledger API Test Tool in tests of reference server.
* Add Apache commons-lang3.
* Ledger API Test Tool: Implement custom test reporter.
This addresses two needs:
- avoid using buggy scalatest test reporter;
- pretty-prints test results prettier.
* dade-copyright-headers: return success on successful reformatting.
These files were used to publish the `.proto` files on NPM so that the
dependency could be defined in the Node.js bindings package manifest.
These files are not longer used and can be safely removed from this
repository.
* Added agreement_text field to the CreatedEvent in Ledger API.
* Changed java bindings + java codegen
* Changed utilities for scala codegen
* Made necessary changes in Sandbox to propagate the agreement text from ContractInst to the CreatedEvent
* Made changes to the navigator to show the agreement text in the contract details page when it is set and not empty
Fixes#1110
* Fixes 895: Improve DA Bazel rules for building javadocs.
Extend the da_java_library Bazel macro to also build the Javadoc for the
target. Add the Javadoc artefacts to the release procedure.
* Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.
HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.
* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event
Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).
Fixes#960.
* Re-order fields in records if all labels are provided
Fixes#988
* Add line to release notes
* Fix line on release notes
* Document change on the Ledger API definition
* Simplify pattern matching
* Improve and fix tests
Integration tests now look for the "Missing field label" rather then the
"Mismatching record label" when inspecting errors. Furthermore, a test
has been added that ensures that repetitions in labels still raise an
error.
* Add comment
Comment about relationship between fields length check and fields reordering based on labels
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Improve Ledger API docstring
Explicitly state the semantics of labeled fields (i.e. repeated keys are not accepted)
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
Submitting a command via the CommandService now returns either the
transaction id (SubmitAndWaitForTransactionId), the flat transaction
(SubmitAndWaitForTransactionResponse), or the transaction tree
(SubmitAndWaitForTransactionTreeResponse).
This means that users don't have to wade through the transaction stream
to retrieve the resulting transaction. This is particularly useful in
combination with #479.
Fixes#406
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
* Improve comment on `SubmitRequest`
Point out that `commands` corresponds to top-level actions and that order is preserved.
* Correct correspondence between commands and events
* Fix markup from MD to RST
* Update command_submission_service.proto
* Improve bazel to generate Haskell for more protos. Get the generated Haskell to compile.
* adapt to @haskell_proto3__suite//:compile-proto-file
* haskell_proto3__suite now works for proto files contains map<key,value>
* remove unnecessary bash loop
* Move to using proto3-wire from upstream
* Move to upstream proto3-suite, with some custom patches in my fork
* Delete the BUILD.bazel for hte proto3 stuff, not used and the test was failing
* Delete the old proto3-wire and proto3-suite forks
* Delete proto3-wire
* Prettify BUILD.bazel files, sort the deps
* Remove some special cases from the license checker
* Delete unused Nix files from grpc-haskell
* Switch to upstream proto3-suite
* Make old-time work on Windows
* Formatting
* Patch rules_haskell to use a response file for -optP to avoid overflowing argument size limits on Windows
* Update 3rdparty/haskell/BUILD.old-time
Co-Authored-By: neil-da <35463327+neil-da@users.noreply.github.com>
* Update the comments in old-time
* Use the revised location of proto3-suite
* Add release notes entry
* Add CreateAndExercise command to Java Bindings data layer
* Add CreateAndExercise command to DAMLe
The CreateAndExerciseCommand allows users to create a contract and
exercise a choice on it within the same transaction. Users can use this
method to implement "callable update functions" by creating a template
that calls the update function in a choice body.
Fixes#382.
* Add CreateAndExercise command handling to the sandbox
* Add CreateAndExercise command to the Ledger API
Considering that there is no canonical source for status.proto generated
for scalapb (for java it is pulled in via a transitive dependency of
grpc-protobuf), we should rather compile and include it in the
ledger-api-scalapb artefact.
* Add buildifier targets.
The tool allows to check and format BUILD files in the repo.
To check if files are well formatted, run:
bazel run //:buildifier
To fix badly-formatted files run:
bazel run //:buildifier-fix
* Cleanup dade-copyright-headers formatting.
* Fix dade-copyright-headers on files with just the copyright.
* Run buildifier automatically on CI via 'fmt.sh'.
* Reformat all BUILD files with buildifier.
Excludes autogenerated Bazel files.
* SandboxSQL fixture + fixing various issues
WIP - playing around with Resources to support Sandbox Fixture with Postgres
Sandbox with Postgres fixture works - LedgerIdentityServiceGivenIT PASSES
adding guards for empty collections in PostgresLedgerDao
CommandCompletionServiceITi passed for both fixtures
fixing EventID formatting problem
another formatting fix
changed wrong autoCommit behaviour
CommandStaticTimeIT passed on both ledgers
rolling back transaction on duplicates
dealing with duplicate commands in postgres
fixing mismapped record_time
adding extra logging for fatal errors
disabling sql support as it's not finished yet
cleanup
removed unnecessary test classes
cleanup
formatting
* ADT was missing Product with Serializable
* fixed the compilation error
* Attempt to move template to rst
* Removing pandoc from export
* Get rst tables working
* Move proto comments into rst format
* More tidying up proto docs to work in rst
* Remove unnecessary whitespace
* Add back some necessary whitespace
* Correcting rst whitespace, again
* Remove processing script
* Clean up proto files
* Remove broken link from pdf toc
* Reinstate post-process script
* Try to fix process script
* Fix permissions issue
Finishes the work started in #324:
- drops deprecated `name` in identifiers, adopting `moduleName` and `entityName`
- use string to represent `timestamp`s to avoid a loss of precision
- use string for `date`s too for consistency and future-proofness
The work unconvered a quite serious bug caused by the lack of coverage
on the validation of timestamps: the model was expecting timestamps to
be of type timestamp, whereas in Ledger API values they are represented
by numbers.
* Fetch status.proto from remote, simplify JS gRPC codegen
Fetch the `status.proto` file (part of the standard gRPC distribution)
from a distribution channel. _Moreover_, use the recently introduced
`proto_gen` rule to simplify how the gRPC code for the Node.js bindings
are generated (and remove the need to have `google/rpc/status.proto`
locally in the repository.
* Add plugin_runfiles option to proto_gen
This allows use to add additional files to the bazel sandbox so that
plugins can refer to them. This will subsequently be used by the
protoc-gen-doc plugin.
Also, pass the plugin options via --name_opt parameter.
* Add missing status.proto dependency /language-support/java and /ledger
* Build proto docs using the proto_gen rule
To make this work, I had to turn on the bazel build flag
`--protocopt=--include_source_info` because we cannot turn enable this
flag only for specific build rules.
* Make /ledger-api/grpc-definitions:docs public again
* Revert to the old style of passing plugin arguments to --name_out=options:path
* Suppress output of unzipping
* Fix link for google.rpc.Status in proto-docs