Commit Graph

112 Commits

Author SHA1 Message Date
Neil Mitchell
c5776bcb54
Add enumerate function (#1477) 2019-05-31 15:06:35 +01:00
Andreas Herrmann
9cc1c13fe6
release-notes: damlc test --files (#1464)
* release-notes: damlc test --files

* Address review comments
2019-05-31 10:47:41 +02:00
Leonid Shlyapnikov
ef21af698a Extractor to support template filtering (#1361)
* Add support for optional `--templates` configuration, #1352

template configs can be passed in the format:
`--templates <module1>:<entity1>,<module2>:<entity2>`

if no templates passed, use `Filters.defaultInstance`,
which means subscribe for all templates

* TemplateConfigs is a Set now

converting set to a sorted list, when validating previous startup params
so we have a deterministic order of template configs.

* Adding test case for template filtering and logging

Test fails: Template filtration is not supported on GetTransactionTrees
RPC. To get filtered data, use the GetTransactions RPC
Some refactoring will follow.

* Proper template ID filtering, more tests

have to convert Identifier to tuple

* Updating release notes.

* Replacing filter-map chain with collect
2019-05-31 07:26:34 +00:00
Robert Autenrieth
fe96e79987
Add missing column in Navigator database (#1455)
Fixes #1454
2019-05-29 21:59:24 +02:00
Francesco Mazzoli
43d7cb0e82
release 0.12.22 (#1448) 2019-05-29 14:55:45 +02:00
Gerolf Seitz
70f748379a
Use effective_at to populate contracts loaded in SqlBackend (#1436)
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.

Fixes #1435.
2019-05-29 12:40:03 +02:00
Stephen Compall
fd02a91a19
extractor: subscribe to multiple parties (#1360)
The extractor --party option may now specify multiple parties, separated
by commas; e.g. instead of --party Bob you can say --party Bob,Bar,Baz
and get the contracts for all three parties in the database.

Fixes #1353.

* refactor figuring the TransactionFilter to give to API

* replace ExtractorConfig#party with parties

* adjust remainder of extractor main code to handle multiple parties

* previous extractor tests pass

* factor dar production for extractor tests

* configureExtractor to change ExtractorConfig elements

* test that party-set extracts the inclusive union of visible contracts (and only that)

* release note for extractor multi-party support

* test faithfulness of --party splitting, including with spaces

* remove unused mixins from MultiPartySpec

* update --party's help text regarding multiple parties

* report malformed party errors at extractor cmdline option parse time
2019-05-28 15:13:54 -04:00
Martin Huschenbett
80d7bf6ca3
Drop support for DAML-LF 1.2 from damlc (#1428)
This is part of #853.
2019-05-28 16:30:39 +02:00
Moritz Kiefer
330ede08b5
Separate diagnostics from rule results (#1423) 2019-05-28 14:18:59 +02:00
Martin Huschenbett
435eee5abe
Release SDK 0.12.21 (#1420) 2019-05-28 13:21:43 +02:00
Martin Huschenbett
bd2773048e Allow leading plus sign in parseInt/parseDecimal (#1416)
* Allow leading plus sign in parseInt/parseDecimal

This behaviour is in line with the newly added DAML-LF primitives
`FROM_TEXT_INT64` and `FROM_TEXT_DECIMAL`.

* Update release notes

* Allow leading plus in parseDecimal as well
2019-05-28 07:30:27 +00:00
Martin Huschenbett
2605f00804 Freeze DAML-LF 1.dev into DAML-LF 1.5 (#1408)
* Freeze DAML-LF 1.dev into DAML-LF 1.5

In other words, we release DAML-LF 1.5.

This is required for generic templates (#1387).

* description of FROM_TEXT_INT64 & FROM_TEXT_DECIMAL

* amend version history

add ``FROM_TEXT_INT64`` and ``FROM_TEXT_DECIMAL`` in the specification changelog

* typos

* Fix markup in DAML-LF spec

* Add release notes
2019-05-27 21:11:37 +00:00
Martin Huschenbett
34d436d77d Drop support for DAML-LF 1.1 from damlc (#1231)
* Drop support for DAML-LF 1.1 from damlc

Part of #853.

* Fix docs test

* Add show party test back

* Update release notes

* Remove target version from Java codegen test
2019-05-27 16:07:35 +00:00
Neil Mitchell
784411f647
Improve parseInt/parseDecimal at the edge cases (#1389)
* Improve parseInt/parseDecimal at the edge cases

* Update the change log
2019-05-25 14:16:45 +01:00
A. F. Mota
489244886c List all available versions, and persist version data. (#1339)
* List all available versions.

* Add --all flag in daml version

* Save version list to cache

* Update version cacheing logic.

* Linting error

* PR revisions.

* Update release notes.

* Update daml-assistant/src/DAML/Assistant/Version.hs

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

Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
2019-05-23 14:33:07 +00:00
Moritz Kiefer
1c580d84a5
Make exposed-modules field in daml.yaml optional (#1345)
If unspecified, we expose all modules in the project.

Fixes #1328
2019-05-23 15:37:37 +02:00
Martin Huschenbett
99de88c7cb
Release SDK 0.12.20 (#1330) 2019-05-23 11:49:30 +02:00
Moritz Kiefer
56acea648c
Release SDK 0.12.19 (#1308) 2019-05-22 14:54:58 +02:00
Neil Mitchell
7a3cf358e6
Disallow empty record updates (#1301)
* If you write an invalid range annotation for a test, raise an error, rather than making something garbage up

* Make empty record with an error, just like in Haskell

* Update the release notes
2019-05-22 10:49:56 +01:00
Moritz Kiefer
0c8070bbd5
Sign the Windows installer (#1274)
* Sign the Windows installer

* Address review comments

* Mention signing in release notes
2019-05-22 09:26:15 +02:00
Martin Huschenbett
ee02c9ee6e Make DAML-LF 1.4 the default version output by damlc (#1283)
* Make DAML-LF 1.4 the default version output by damlc

This removes the syntactic restriction on contract keys.

* Add DAML-LF 1.4 to release notes
2019-05-21 14:33:44 +00:00
Francesco Mazzoli
8d9c2721ec allow to load packages eagerly, and do not compile twice with --scenario (#1248)
fixes #1238 and should help with #1230.
2019-05-21 14:14:59 +00:00
Stefano Baghino
9684e1325e
Reject transaction filters without any party (#1257)
Fixes #1250

The previous behavior when receiving a transaction filter without any
party was to reply with an empty stream. Since, given the current
situation, no data could ever be served for such request, it represents
a better feedback for the user to reject such requests as carrying an
`INVALID_ARGUMENT`.
2019-05-21 15:21:09 +02:00
Francesco Mazzoli
95e8dd01c7 Maintainers must be signatories (#1124)
* check that maintainers are a subset of signatories

fixes #1123

* add note on why `fetchByKey` gets you the contract data
2019-05-21 11:59:59 +00:00
gaborh-da
4259ad28bc Expose a testable ledger view (#1236) 2019-05-21 12:29:07 +02:00
Moritz Kiefer
e8a5e8e2c0
Release 0.12.18 (#1234)
* Release 0.12.18

We have accumulated quite a few fixes and improvements in the last
week so it’s time for another release.

* tidy up release notes

* mark breaking change as such
2019-05-20 13:43:57 +02:00
Stephen Compall
53058001e6 add createAnd syntax to prepare CreateAndExercise commands from Scala codegen contracts (#1197)
* add createAnd syntax to prepare CreateAndExercise commands from Scala codegen contracts

* open-style ExerciseOn typeclass

* GADT-style ExerciseOn works perfectly well, so let's go with that instead

* testing implicit conversion + ExerciseOn TC lookup

* use scalatest-style typesafe === to avoid Anys

* many more ExerciseOn tests

* support ExerciseOn polymorphism in Primitive.exercise

* generate ExerciseOn references in Scala codegen, permitting `createAnd` to combine with exercise* methods

* refactor testCreateContractAndReceiveEvent to support other commands

* compare create and createAnd's command generation behavior in a simple test

* bazel style

* test CreateAndExercise from Scala codegen against sandbox

* release note for Scala codegen create-and-exercise support
2019-05-20 07:43:08 +00:00
Neil Mitchell
2bb32fc6ee
Warn if there are any missing methods in type classes in DAML (#1196)
* Warn if there are any missing methods in type classes in DAML

Helps with #1194

* Make missing methods a fatal warning

* Update release-notes.rst

* Fix a test that had no signatories

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2019-05-19 07:55:10 +01:00
Gerolf Seitz
3de9b12c6e Fixed typo in release notes (#1226) 2019-05-17 19:39:24 +00:00
Stefano Baghino
2858f55bd2
Unify command validation logic (#1227)
* Unify command validation logic

Fixes #572

* Fix formatting
2019-05-17 17:24:35 +02:00
Gerolf Seitz
c645348ca1
Expose a contract's agreement text on the Ledger API (#1151)
* 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
2019-05-17 11:22:05 +02:00
Gerolf Seitz
c94a411e3b
Fix Maven setup instructions (#1209)
The DAML Bintray repository is now accessible without
credentials. Therefore our users don't need to change their local
maven settings.xml file. Considering that this particular step has shown
to be somewhat a barrier or hurdle to overcome, I am removing the
instructions for the settings.xml setup, and adding a note to the java
bindings documentation about adding the repository to the project's
pom.xml file.

Fixes #1207.
2019-05-17 10:53:14 +02:00
Nick Smith
943fd852bd
Fixes #1177: Remove unused dependency from quickstart-java (#1206) 2019-05-17 09:58:42 +02:00
Beth Aitman
a9f8bd6525 Contract keys documentation (#1112)
* First stab at contract keys docs

* Fix sphinx warnings

* Apply Martin's suggestions

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

* Add missing bits to contract keys doc

* Contract keys release note

* More explanation

* Apply suggestions from code review

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-Authored-By: Francesco Mazzoli <f@mazzo.li>

* Address review comments

* Add message about changes coming soon
2019-05-16 16:37:26 +00:00
A. F. Mota
241d81850a
Add daml init to the docs. (#1158)
* Add daml init to the docs.

* Separate migration instructions into two subsections.
2019-05-16 10:13:04 +02:00
Robert Autenrieth
b4506ca370 Check contract visibility in SQL sandbox (#959)
* Store divulgence info for contracts

* Store divulgence info for contracts

* some documenting refactors

* Use fail instead of sys.error in test

* Add release note

* Rename migration files

* Fix typo

* Fix updating divulgence info in scenarios

The ACS was comparing differently formatted contract IDs.

Fixes #1166
2019-05-16 09:54:21 +02:00
Stephen Compall
90a43b53ea extractor: use RFC-3339-format strings for JSON output of dates and timestamps (#1175)
* use RFC-3339-format strings for JSON output of dates and timestamps

* release note for JSON changes
2019-05-16 07:53:43 +00:00
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