Commit Graph

98 Commits

Author SHA1 Message Date
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
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
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
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