Commit Graph

115 Commits

Author SHA1 Message Date
Martin Huschenbett
0851a00f20 Don't expose TextMap type via the Prelude anymore (#1144)
This is not the perfect fix since the definition `data TextMap` is still
living in the wrong module, see issue #1142. However, this PR forces people
to import `DA.TextMap` when they want to use the `TextMap` type, which is
the desired behaviour for the future.
2019-05-15 08:34:44 +00:00
Beth Aitman
befcb0995c Move release note (#1113) 2019-05-14 11:40:26 +00:00
Francesco Mazzoli
186cf14729 fix duplicate contract ids when loading scenarios with pass (#1105)
* rename --jdbcurl to --postgres-backend

* increment ledger end correctly when loading from scenarios

fixes #1079
2019-05-14 10:05:43 +00:00
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
Beth Aitman
1b6df13861 Improve docs flow (#1101)
* Improve docs flow

* Move integration kit as Simon requested

* Update daml-foundations/daml-ghc/base-rst-prefix.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
2019-05-13 18:24:18 +00:00
Beth Aitman
8c8bd5e6b9 Full documentation for the new assistant (#740)
* First draft of new assistant docs

* Quick pass to fix up references

* Apply suggestions from code review

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

* Apply suggestions from code review

* Fix links

* Fill out assistant docs somewhat

* Update docs/source/tools/extractor.rst

* Update quickstart guide from #720

* Fixes

* daml new changes

* Update docs/source/getting-started/quickstart.rst

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

* Fix build

* Fix todos about protobuf

* Final tidying up

* Add installer link

* Apply suggestions from code review

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

* A couple of corrections

* Add release note

* Fix release notes

* AAAAAAAAAARGH
2019-05-13 16:33:59 +00:00
Neil Mitchell
ed431b4717
Move Tuple and Either types to DA.Types (#1099)
* Add a helper function to qualify things with respect to a module

* Supress some warnings I saw when building

* Move Tuple* and Either to daml-prim:DA.Types, so they have a nice name for Java users (instead of GHC.Tuple or DA.Internal.Prelude)

* Add copyright header

* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>

* Update the daml-lf translation of tuple types

* Fix up the scala bindings for how to use types

* Clarify what action people need to take following the release notes

* Fix an expected test

* Clarify the changelogs even more

* Run ScalaFmt

* Clean up the release notes a bit

* Use the changelog from Beth

* Update the release notes again

* Update docs/source/support/release-notes.rst

Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>

* Fix up the scenario error messages
2019-05-13 16:36:21 +01:00
Gerolf Seitz
17df4e78e1
Java Codegen: generate methods for CreateAndExerciseCommand (#1107)
The Java Codegen now generates methods for creating a
CreateAndExerciseCommand for a particular choice given a template.

Contributes to #1092.
2019-05-13 16:11:10 +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
Gerolf Seitz
199d0a4740 Update release instructions and add missing release label (#1078) 2019-05-13 08:04:20 +00:00
Neil Mitchell
88d166d642
Add String compatibility helper (#1070)
* Add a Compatibility alias for String, for people coming from Haskell

* Clean up the deprecated messages, no point saying which DAML version given its no longer interesting information
2019-05-10 14:17:09 +01:00
Moritz Kiefer
debe58e351 Release 0.12.17 (#1071) 2019-05-10 13:02:53 +01:00
Beth Aitman
348e302370 Cleaning up release notes (#1042)
* Cleaning up release notes

* Finish cleaning up release notes

* use non-stupid link syntax

* And fix the note at the top too

* Correct DAML to DAML stdlib
2019-05-10 10:22:26 +00:00
Gabor Aranyossy
4abc18d8a1
avoiding linear searching for transactions from genesis (#994)
* avoiding linear searching for transactions from genesis

* validating transaction ids

* one more failing test nailed down

* fixing off by 1 error

* docs + release notes

* fixing EventIdFormatterSpec

* fixing broken validation test
2019-05-10 11:28:14 +02:00
Gerolf Seitz
c89f3bdebe
Sandbox: Respect MRT (#990)
Transactions with a record time > maximum record time are now rejected
with a timeout error instead of being committed to the ledger.
2019-05-09 11:10:54 +02:00
Gary Verhaegen
ef82cbe5ea add anchors to release notes (#999) 2019-05-08 16:01:09 +00:00
Leonid Shlyapnikov
0ca414f09c
quickstart-scala daml assistant template cleanup (#614) (#1007) 2019-05-08 11:18:22 -04: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
gleber
2aa14338a1
Release DAML Integration Kit as ALPHA. (#892) 2019-05-07 18:20:27 +02:00
Francesco Mazzoli
bd4ca991ec
release (#985)
* release

* update release notes
2019-05-07 17:57:08 +02:00
Leonid Shlyapnikov
8534e2837f
quickstart-scala DAML Assistant template (#745)
* Add quickstart-scala IOU example, DAML Assistant template, #614

* Move all scala examples under language-support/scala/examples

* Removing target dirs which don't get excluded by the glob, #614
2019-05-07 11:41:29 -04:00
Gerolf Seitz
bac5c4a6f4 Java Bindings: Properly convert CreateAndExerciseCommand (#982)
The conversion of the CreateAndExerciseCommand in the Command base class
was missing. This also adds a missing test for that.

Fixes #979.
2019-05-07 17:04:48 +02:00
Francesco Mazzoli
bb6f21373d
record keys locally to a single update, fixes #969 (#970)
* record keys locally to a single update, fixes #969

* do not delete keys in machine for nonconsuming choices, fixes #973

* amend release notes

* actualize new test results
2019-05-07 16:09:52 +02:00
Gerolf Seitz
2c04e1fd6d
Java Codegen: Generate types with multiple name components (#946)
If a variant itself is not serializable, but the synthesized record for
one of its constructors is, then said record is returned by the
interface reader in the set of type declarations, when the variant type
itself is not.
When constructing the InterfaceTree in preparation of the codegen, we
previously rejected such a situation.

We now generate Java code for such a synthesized record, as it is a more
generally correct way of interpreting DAML LF (i.e. the DAML compiler
could decide tomorrow to create such multi-component record names for
regular records).

In any case, we consider this to be an edge case, as the synthesized
record for the variant constructor cannot be used directly either from
DAML or the Ledger API.
2019-05-07 11:12:42 +02:00
Beth Aitman
d77384bcb6 Migration guide for new assistant (#768)
* Migration guide for new assistant

* Add some more words about the changes and start explaining config file.

* Flesh out migration of configs.

* Fix summary of changes.

* Fix formatting of list

* Tidying up migration guide
2019-05-06 14:55:20 +00:00
Beth Aitman
d34afb7502 Signposting the Node.js bindings (#931)
* Signposting the Node.js bindings

* Change link to actually point to the docs
2019-05-06 09:42:42 +00:00
Moritz Kiefer
7f42f2e556
Release 0.12.15 (#925) 2019-05-06 09:57:15 +02:00
Martin Huschenbett
0ebdcb961e
Add fromListWith and merge to DA.TextMap and DA.Next.Map (#898)
Also, resurrect the tests we had for both functions when we still tested
`DA.Map`.
2019-05-03 20:41:11 +02:00
Martin Huschenbett
16ea1ceacd
Add Functor/Applicative/Action instances for reader monad (#888)
* Add Functor/Applicative/Action instances for reader monad

This is possible because we dropped DAML-LF 1.0 support from the
compiler lately.

* Add release notes

* Fix language-server-tests
2019-05-03 17:01:09 +02:00
Martin Huschenbett
59abe7e384
Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set} (#886)
* Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set}

`DA.Next.{Map, Set}` were known as `DA.Experimental.{Map, Set}` until now.

We also remove the tests for `DA.{Map, Set}` because our test infrastructure
can't nicely deal with tons of deprecation warning. Since we're not going to
change these files anymore, this seems to be a fair trade-off.

* Fix code spans in release notes
2019-05-03 16:53:50 +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
Beth Aitman
78b586d5be some broken formatting (#872) 2019-05-03 11:16:16 +00:00
Moritz Kiefer
45101fe0f9
Release 0.12.14 (again) (#874)
Apparently I haven’t had enough coffee and forgot to update the
VERSION in the previous commit …
2019-05-03 11:27:46 +02:00
Stephen Compall
f5490a5454 add LF 1.dev "minor dev version" (#709)
* clean up v3 contract key case in TransactionVersions

* clean up duplicate cases in ValueVersions.assignVersion

* make LanguageMinorVersion a proper ADT, aliased LanguageVersion.Minor

* port DecodeV1 to LanguageMinorVersion ADT via implicit conversion

- @remyhaemmerle-da might prefer the explicit application of Stable/Dev

* make releasePrecedes private

* add dev versions to the timeline

* copyright header for LanguageMinorVersion

* build the package database for 1.dev, support 1.dev as --target

* test presence and new-ness of "dev" in timeline

* report dev versions in engine info; note 1.dev target in release notes

* spec and governance rules on 1.dev and minor dev in general

* make the governance rule about dev more direct

* 1.x

* missed plural; thanks @leo-da

* further definition of 1.dev in LFv1 spec; thanks @remyhaemmerle-da
2019-05-03 10:36:45 +02:00
Moritz Kiefer
b081a8320f
Release 0.12.14 (#870) 2019-05-03 09:31:16 +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
Neil Mitchell
4b89903a73 Delete the id function (#851)
* Delete the `id` function

* Fix documentation that referred to id

* Fix some DAML-LF tests that relied on id
2019-05-02 22:57:52 +00:00
Brian Healey
ed22a1e061
Update urllib version to avoid security vulns warning (#864) 2019-05-02 15:39:32 -04:00
Martin Huschenbett
df230912c7
Drop DAML-LF 1.0 support from compiler (#863)
* Drop DAML-LF 1.0 support from compiler

This will enable us to add `Functor`, `Applicative` and `Monad` instances
for `(->) r` in the `daml-stdlib`. We'll do this in a separate PR.

* Remove codegen test for DAML-LF 1.0
2019-05-02 21:35:06 +02:00
Jussi Mäki
9d66ee4fa2
Release version 0.12.13 (#856) 2019-05-02 18:49:43 +02:00
Francesco Mazzoli
cf89366ac6 respect contract visibility when looking up contract keys (#753)
* remove outdated flags from comments

* update tests in preparation for visibility rules

* check visibility of contract keys, fixes #751

* add release notes

* include visibility check in scenario runner

* stephen's suggestions

* fix type error in api server example

* scalafmt

* bring TransactionFiltration.scala up to speed with disclosure

see
<faf1cde1a1/ledger-api/grpc-definitions/com/digitalasset/ledger/api/v1/event.proto>
for an in-depth description. fixes #794.

* add tests for contract key visibility

* move a lot of ledger testing utils out of command checks

* move a lot of ledger testing utils out of command checks

* remove useless checks regarding divulgence

* add tests regarding event witnesses

* update release notes

* re-introduce safety when disclosing
2019-05-02 14:02:30 +00:00
Gabor Aranyossy
c501d64264
fixing bug for mishandling potential offset gaps (#802)
* hedging against possibly gaps in offsets

* doing the math right

* adding some notes

* extracting pipeline logic
 Please enter the commit message for your changes. Lines starting

* extracting "run until" logic to be testable

* testing _run until_ logic

* adding release note

* copyright

* adding link to PR

* changing lookUpByTransactionId to use TransactionPipeline

* fixing issue identified by Extractor tests
2019-05-02 15:00:41 +02:00
Moritz Kiefer
053b2ad160
Release 0.12.12 (#792)
We need a release for a client, I’ll take care of testing it and
making it public.
2019-04-30 15:29:55 +02:00
Martin Huschenbett
033e637209
Rename DA.TextMap.filter into filterWithKey (#731)
* Rename DA.TextMap.filter into filterWithKey

`filterWithKey` reflects better that the predicate used for filtering
takes the key as an argument.

* Add filter back as deprecated and change DA.Map as well

* Adapt tests to renaming
2019-04-30 11:45:13 +02:00
Beth Aitman
79f4bde160 Clarify how you get DAML studio (#765) 2019-04-29 16:03:04 +00:00
Jussi Mäki
d887b21036
Release scala source jars to bintray (#767)
Tested with a dry run:
Copying .../com_github_digital_asset_daml/bazel-out/k8-fastbuild/bin/ledger/api-server-damlonx/api-server-damlonx_src.jar
to .../com/daml/ledger/api-server-damlonx_2.12/100.12.11/api-server-damlonx_2.12-100.12.11-sources.jar
2019-04-29 17:11:01 +02:00
Gabor Aranyossy
8e54bf2e67
documenting persistence with Postgres in SDK docs (#722)
* documenting persistence with Postgres in SDK docs

* revealing jdbcurl flag as it's docuemnted now

* updating release notes

* Update docs/source/tools/sandbox.rst

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* Update docs/source/tools/sandbox.rst

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* Update docs/source/tools/sandbox.rst

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* Apply suggestions from code review

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>

* changed release note entry as suggested

* Apply suggestions from code review

Co-Authored-By: gaboraranyossy-da <gabor.aranyossy@digitalasset.com>
2019-04-29 15:22:05 +02:00
gleber
c095a2e20c Ledger api test tool release (#756)
* release: make 'ci/release.sh' runnable for dry runs.

release-dry-run.sh is outdated and duplicates logic from ci/release.sh, so it
got deleted.

* ledger-api-test-tool: release the tool together with the SDK components.

* ledger-api-test-tool: update docs to reflect distribution mechanism.

* ledger-api-test-tool: further docs refinements.

* Add Ledger API Test Tool mention into release notes.
2019-04-29 12:16:19 +00:00
gleber
0ef84c19b3 Add Ledger API Test Tool docs into DAML docs (#587)
* docs: add structure for Ledger API Test Tool

* docs: ledger-api-test-tool: move docs to DAML docs.

* docs: dlik: add copyrights

* ledger-api-test-tool: improve docs

* ledger-api-test-tool: further docs refinements.

* ledger-api-test-tool: expose stacktraces of SemanticTester to the user.

Previously timeout errors would produce no useful output. This gives some -
albeit low quality - output to help pinpoing the issues. This needs improvement
for better UX.

* docs: dlik: summarize how to use the tool against a DAML ledger.
2019-04-29 09:14:14 +00:00
Jussi Mäki
fce04b9e4a Track the packages used to produce a transaction (#735)
Add field 'usedPackages' to Transaction to record the packages
that were used during interpretation to produce said transaction.
This serves as a hint to specify what packages are required to
validate the transaction. Note that this may not be sufficient
for future implementations that e.g. compile DAML-LF to JVM
bytecode and require packages containing only type definitions
as inputs.

This hint is mainly required for ledger implementations for which the
packages are tracked similarly to contract instances, and which
require that all inputs to their transaction must be declared
beforehand.

This work is required for the participant-state key-value utilities
described in issue #410 and implemented in PR #637.
2019-04-27 01:12:04 +00:00