Commit Graph

27 Commits

Author SHA1 Message Date
Nick Smith
6f6f3337c7
Fixes 895: Improve DA Bazel rules for building javadocs. (#896)
* 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.
2019-05-14 09:40:30 +02:00
Gerolf Seitz
8158269b7d
Remove ExercisedEvent in Event oneof. (#1067)
* 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.
2019-05-13 14:36:13 +02:00
Michał Majcherski
9610d74b50
windows: back to official rules_scala repo (#1040) 2019-05-09 13:53:47 +02:00
Stefano Baghino
f9839a7e4c
Re-order fields in records if all labels are provided (#989)
* 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>
2019-05-08 12:54:53 +02:00
Nick Smith
d725d50be9 add result of exercise to transaction -- fixes #479 (#583)
Modify the DAML Engine, Ledger API and Sandbox to pass the result of the
exercise as a field of the transactions.
2019-05-06 14:33:44 +02:00
Francesco Mazzoli
e8261f2fd9
clarify the role of party sets in various locations (#766)
* clarify role of party sets in various locations

* use 1.dev for tests...

...so that we're sure we're testing the latest value / tx versions.
2019-05-03 17:09:59 +02:00
Gerolf Seitz
ecf6ece8c4
CommandService returns useful data for successful submissions (#875)
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
2019-05-03 16:01:41 +02:00
Gerolf Seitz
f4d8e134e3
Add TransactionService methods for looking up flat transactions (#830)
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
2019-05-03 09:03:12 +02:00
Bernhard Elsner
cf35c9c4f0 Improve comment on SubmitRequest (#651)
* 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
2019-04-24 23:36:21 +00:00
nickchapman-da
2e30477fb3 Generate and compile Haskell for Ledger API protos (#676)
* 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
2019-04-24 20:03:22 +00:00
Neil Mitchell
85c72f87d1 Move to using proto3-wire from upstream (#480)
* 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
2019-04-24 15:59:08 +00:00
Beth Aitman
a8648abed6 Remove outdated documentation things (#626)
* Remove outdated documentation things

* Remove outdated release section

* More outdated stuff

* Fix link
2019-04-23 14:01:45 +00:00
Michał Majcherski
a6215f1ceb
windows: more targets (#571)
* windows: more targets
* generate Haskell from ledger-api protos - genrule fix
2019-04-23 11:12:21 +02:00
nickchapman-da
702c52bc25 generate Haskell from ledger-api protos (#607)
* first cut bazel rule to generate Haskell from ledger-api protos

* untabify

* formatting fixes
2019-04-18 17:56:26 +00:00
Gerolf Seitz
7f8dbfeca0 Add CreateAndExercise command throughout the stack (#563)
* 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
2019-04-18 16:05:16 +00:00
Gerolf Seitz
2a932d9b22
Include google/rpc/*.proto into ledger-api-scalapb (#477)
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.
2019-04-15 14:57:43 +02:00
gleber
aa70c7f64e
Enforce consistent formatting of BUILD files. (#412)
* 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.
2019-04-12 13:10:16 +02:00
moritzkiefer-da
fa4067ad1b
Move POM file generation to Bazel rules (#374)
* Move POM file generation to Bazel rules
2019-04-11 11:24:52 +02:00
Remy
07858455c1
Fix DAML runtime for the new DAML-LF type Map (#204)
* add a test for daml-lf/interface
* fix scala code gen
* fix extractor
* fix navigator backend/frontend
* key of Map are strings in proto/json
2019-04-10 21:30:33 +02:00
Gabor Aranyossy
094b4b6959
Sandbox Sql fixture (#247)
* 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
2019-04-10 17:04:47 +02:00
Beth Aitman
233b814469
Move protobuf docs into rst format (#334)
* 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
2019-04-10 16:42:35 +02:00
Stefano Baghino
e775b4974e
Amend the Node.js bindings Ledger API values representation (#338)
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.
2019-04-10 10:47:29 +02:00
Stefano Baghino
fa5c704e7e
Map Protobuf's 64 bit integers to strings in JS (#324) 2019-04-09 15:19:32 +02:00
Beth Aitman
9d6c7af0fc
Tidying up proto docs (#303)
* Tidying up proto docs

* Fix typo

Co-Authored-By: bethaitman-da <42940582+bethaitman-da@users.noreply.github.com>

* Add extra newline
2019-04-09 11:11:11 +02:00
Stefano Baghino
7467925aa1
Fetch status.proto from remote, simplify JS gRPC codegen (#285)
* 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
2019-04-09 10:30:01 +02:00
Brian Healey
0205a1a932 #233 remove changelogs 2019-04-04 16:08:52 -04:00
Digital Asset GmbH
05e691f558 open-sourcing daml 2019-04-04 09:33:38 +01:00