Commit Graph

604 Commits

Author SHA1 Message Date
Stephen Compall
7882080207
warn on unknown template IDs in searchForever (#4312)
* in searchForever, warn on unknown template IDs as long as at least one is known

* remove unused resolveTemplateId

* factor out WS request parts in WS integration test

* factor out IOU create

* test early template ID warning in searchForever stream

* document warnings case for searchForever

CHANGELOG_BEGIN
- [JSON API - Experimental] Precede stream with warnings of unknown template IDs, if any,
  rather than failing outright.
  See `issue #4290 <https://github.com/digital-asset/daml/issues/4290>`_.
CHANGELOG_END
2020-01-30 16:13:40 -05:00
Shayne Fletcher
9a628ccb9b
Adjust with suggestions from review feedback (#4261)
changelog_begin
changelog_end
2020-01-30 11:31:08 -05:00
Robin Krom
a1a56002a3
release 0.13.49 (#4279)
* release 0.13.49

CHANGELOG_BEGIN
CHANGELOG_END

* Rearrange release notes

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-01-30 17:27:50 +01:00
Richard Kapolnai
325e07e120
Minor clarifications in intro docs about transaction consequences (#4169) 2020-01-30 11:21:38 +01:00
Robin Krom
d9dffc13c4
release 0.13.48 (#4269)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 19:22:41 +01:00
daravep
215f751acf
Minor update to daml reference docs (#4243)
Before, we didn't mention in the docs that sum-types need to derive from
(Eq,Show) if they are to be used as arguments of templates or choices.
Now we do.

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 16:30:23 +01:00
Martin Huschenbett
34ac1b0cb8
Release DAML SDK 0.13.47 (#4258)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-29 15:24:54 +01:00
Shayne Fletcher
a56caa0190
daml2ts : Explain DAML/TypeScript mappings (#4196)
changelog_begin
changelog_end

Co-authored-by: Shayne Fletcher <shayne.fletcher@digitalasset.com>
2020-01-27 12:25:13 -05:00
Stefano Baghino
b87ff49e95 Document consumability qualifiers in the reference docs (#4134)
* Document consumability qualifiers and their privacy implications in the reference docs

CHANGELOG_BEGIN
[Documentation] Documented consumability qualifiers in the DAML reference docs, along with their privacy implications
CHANGELOG_END

* Fix WARNING: Title underline too short.

* Fix DAML compile errors on reference docs code

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369706887

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369707047

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369707740

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369707972

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369708826

* Review and fix according to improvements part of #4164

* Addresses https://github.com/digital-asset/daml/pull/4134#discussion_r369709216

* Grammar fix

* Address https://github.com/digital-asset/daml/pull/4134#discussion_r370195737

* Address https://github.com/digital-asset/daml/pull/4134#discussion_r370337305

* Address https://github.com/digital-asset/daml/pull/4134#pullrequestreview-347806117
2020-01-24 15:50:13 +00:00
Leonid Shlyapnikov
9ab419f96b CHANGELOG_BEGIN (#4192)
[JSON API - Experimental] Rename ``argument`` field to ``payload`` in the ``command/create`` request. See #4189.

CHANGELOG_END
2020-01-24 09:04:03 +01:00
Leonid Shlyapnikov
78b29852d3
JSON API documentation update (#4173)
Document error handling

Document query store

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-23 14:54:12 -05:00
Gerolf Seitz
1866374bbf
Remove the doc sections on the rxjava bots (#3872)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-23 13:55:44 +01:00
Robin Krom
8e1e91dcf6
release 0.13.46 (#4171)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-22 20:15:57 +01:00
anticlimactic
4978901f71 Fixed typo in glossary.rst (#4063)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-22 14:29:46 +01:00
Robert Autenrieth
3f95c2ec13
Change sandbox JWT format (#4070)
* Introduce new JWT payload format
... the reader still supports old formats

CHANGELOG_BEGIN
[Sandbox] The sandbox uses a new payload format for authentication tokens (JWTs).
          The old format is deprecated, but still works.
[JSON API] The HTTP JSON API now uses the same payload format for authentication tokens as the sandbox.
           The old format is deprecated, but still works.
CHANGELOG_END

* Add helper function for getting token party

* Support sandbox tokens in JSON API

* Add warning for deprecated formats

* Update documentation

* Add explicit test for new format

* Update JSON API documentation

* Fix test
2020-01-22 14:26:57 +01:00
Moritz Kiefer
a771bf6627 Release 0.13.45 (#4154)
* Release 0.13.45

changelog_begin
changelog_end

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

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-01-22 09:20:38 +00:00
Richard Kapolnai
600066691a
Fix minor issues in docs (#4151)
* Change Oblique to opaque.

* Fix docs: unfinished sentence about contract keys

* Update 3_Data.rst

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-21 23:19:35 +01:00
Stefano Baghino
8edd16396d
Improvements to glossary (#4146)
CHANGELOG_BEGIN
[Documentation] Improved glossary
CHANGELOG_END
2020-01-21 17:18:02 +01:00
Ognjen Maric
589f710313
Prohibit contract IDs in contract keys and add key maintainers to exercises (#4048)
Prohibit contract IDs in contract keys and add key maintainers to exercises

CHANGELOG_BEGIN

- [DAML-LF] Prohibit contract IDs in contract keys completely. Previously, creating keys containing absolute (but not relative) contract IDs was allowed, but `lookupByKey` on such a key would crash. 

CHANGELOG_END

Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Stephen Compall <scompall@nocandysw.com>
2020-01-20 16:36:38 +01:00
Gary Verhaegen
8811006617
docs cron: more reliable checksums (#4102)
The docs build is currently not reproducible as it include to-the-minute
time-of-build information. It also includes some Sphinx binary caches
which I suppose will also not be reproducible (though I have not checked
the details there).

This commit attempts to remove all sources of non-reproducibility from
the docs build, though this is hard to test without having a stable,
older release to compare with.

CHANGELOG_BEGIN
CHANGELOG_END
2020-01-20 16:21:34 +01:00
Leonid Shlyapnikov
c8c55c4408
Exercise by key (#4049)
* Implement exercise by key

ExerciseCommand got a new required element: `reference` of polymorphic type.

* Add test case: exercise Archive by contractKey

* Add test case for ExerciseCommand JSON protocol

* flatten contract reference in ExerciseCommand JSON protocol

* formatting

* Update exercise by key

* Update documentation

CHANGELOG_BEGIN

- [JSON API - Experimental] Support Exercise by Key. See #4009.

CHANGELOG_END

* Address code review comments
2020-01-18 09:06:52 -05:00
Stephen Compall
3d183b7f3e
for searchForever, use a similar response format to exercise results (#4078)
* for searchForever, use a similar response format to exercise results

CHANGELOG_BEGIN
- [JSON API - Experimental] Response format in ``searchForever`` changed to be more like ``exercise``.
  See `issue #4072 <https://github.com/digital-asset/daml/issues/4072>`__.
CHANGELOG_END

* typo left from add->created replacement

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

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-01-17 15:44:25 -05:00
Stephen Compall
0520fdfa84
in query argument, rename %templates to templateIds, and nest query under 'query' field (#4082)
* in query argument, rename %templates to templateIds, and nest query under 'query' field

CHANGELOG_BEGIN
- [JSON API - Experimental] In 'search' endpoint arguments, %templates is now templateIds.
  Additionally, all contract query fields must occur under 'query'.
  See `issue #3450 <https://github.com/digital-asset/daml/issues/3450>`__.
CHANGELOG_END

* fix other old query format usages
2020-01-17 14:34:27 -05:00
Moritz Kiefer
02c8273514
Release 0.13.44 (#4083)
changelog_begin
changelog_end
2020-01-17 09:05:23 +01:00
Stephen Compall
2103802839 document that null Optional-in-record shortcut *not* used in JSON output (#4076)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-16 19:10:15 +00:00
Robin Krom
0a26591849
upgrading to newest nodejs_rules (#4057)
* upgrading to newest nodejs_rules

CHANGELOG_BEGIN
CHANGELOG_END

* addressing andreas comments
2020-01-16 15:55:32 +01:00
anticlimactic
8f5e9744fa Fixed typo in Introduction to DAML docs (Parties) (#4064)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-16 13:20:59 +01:00
Stephen Compall
3ae0438b73
websocket variant of query endpoint (#3936)
* minor improvements on websocket and add websocketIT

* add it for websocket, and support config args

* add one more test case

* make ws config optional

* avoid fromTryCatchNonFatal when derivative already exists

* spelling and missing type parameter

* use richer Matchers in WebsocketServiceIntegrationTest

* scalafmt

* IDEs may love braces but we don't

* utility for simplifying FanOutShape2s; use in ContractsService

* split matSecondOut into generalization; make compile again

* match matSecondOut utility with standard utility methods

* spelling

* getCreatesAndArchivesSince doesn't need to query the transaction boundary

* boolean newtype utility

* split up transactionMessageHandler into components

* decodeAndParsePayload passes through the Jwt

* clean up config and default WS config

* take multiple template IDs for insertDeleteStepSource

* replace websocket return with {errors, add, remove}, based on acsFollowingAndBoundary

* parse ValuePredicate in websocket

* remove unused lfvToJson

* nominal internal state for emitted WS steps-and-errors

* missing copyright headers

* add filtering to convertFilterContracts

* add step conflation to websocket output

* move conflation to static function

* rename /transactions endpoint to /contracts/searchForever

* empty requests are not allowed; numConns is per-service

* option for GetCreatesAndArchiveSince to not terminate; use in WebsocketService

* start of searchForever documentation

* stub searchForever longer test

* use valueOr

* don't run all other tests again with WebsocketServiceIntegrationTest

* start of websocket delta test

* solve init order problem with AbstractHttpServiceIntegrationTestFuns

- previous order caused test set to be cleared; mutation is intuitive
  for sure!

* full flow test, fails for lack of create/exercise yet

* passing full flow test

* full documentation examples

* rename add/remove to created/archived

* cleaner NewBoolean.Named

* document heartbeats

* document subprotocols for searchForever

* note about the tests mysteriously terminating

* ensure create has happened before attempting query in tests

* reorganize multi-step WS test so its states and assertions are clearer

* filter out heartbeats in raw string tests

* factor out ContractDelta

* make exercisePayload easier to read

* filter out heartbeats in conversation test

* remove type lambda

* accept chunked queries

- clients may not be in control of how query bodies are delivered to the
  server, so we should be agnostic in that respect

* add changelog

CHANGELOG_BEGIN

- [JSON API - Experimental] WebSocket contract search at ``/contracts/searchForever``.
  See `issue #3936 <https://github.com/digital-asset/daml/pull/3936>`_.

CHANGELOG_END

* adapt to #3991 template ID strings

* adapt to #3971 argument -> payload

* fix create command for test (string template ID redux)

* adapt to #4014 ResolveTemplateId change

* update copyright headers

* rebuild WS example output to match latest changes

- thanks @leo-da

* SeqOps is not a safe name

* don't need breakOut anymore

* use util library form of partitionMap

- thanks @leo-da for pointing it out

Co-authored-by: lima-da <54044170+lima-da@users.noreply.github.com>
2020-01-15 18:11:45 -05:00
Martin Huschenbett
2dcf3f82c5
Release DAML SDK 0.13.43 (#4052)
CHANGELOG_BEGIN
CHANGELOG_END
2020-01-15 16:20:22 +01:00
Leonid Shlyapnikov
3381681874 /contracts/search should return HTTP 200 and report unresolved Template IDs in the warnings element (#4014)
* WIP

* test cases updated

* `PackageService.resolveTemplateId` returns `Option[TemplateId]` now

used to return `Error \/ TemplateId`. There are scenarios when unresolved
TemplateID is a warning and not an error, which was the initial design

* CHANGELOG_BEGIN

[JSON API - Experimental]
``/contracts/search`` endpoint reports unresolved template IDs as warnings, see #3771::

    {
        "warnings": {
            "unknownTemplateIds": ["UnknownModule:UnknownEntity"]
        },
        "result": [{...}, ...],
        "status": 200
    }

CHANGELOG_END

* Addressing codereview comments

* `partitionMap` is now part of `http.util.Collections.SeqOps`
2020-01-14 20:17:04 +00:00
Andreas Herrmann
2b64ea3ca4 Implement DAML trigger heartbeat (#4011)
* Implement heartbeat messages in trigger runner.

* Add heartbeat to Daml.Trigger

CHANGELOG_BEGIN
- [DAML Triggers - Experimental] DAML triggers can now configure a heartbeat message to be sent at regular time interval.
CHANGELOG_END

* Add DAML trigger heartbeat test-case

* ./fmts.h

Co-authored-by: Andreas Herrmann <andreash87@gmx.ch>
2020-01-10 16:04:47 +00:00
Leonid Shlyapnikov
93216a0d71
Template ID to JsString JSON serialization (#3991)
* test cases: domain.TemplateId JSON serialization to JsString

* JSON protocol updated

* Fixing json-api test cases

* test cases: domain.TemplateId JSON serialization to JsString

* JSON protocol updated

* Fixing json-api test cases

* Adapt daml2ts and support libraries

* Update documentation

CHANGELOG_BEGIN

[JSON API - Experimental]
- Use JSON string to encode template IDs. Use colon (``:``) to separate parts of the ID.
  The request format, with optional package ID:
  - "<module>:<entity>"
  - "<package ID>:<module>:<entity>"
  The response always contains fully qualified template ID in the format:
  - "<package ID>:<module>:<entity>"
  See #3647.

CHANGELOG_END

* Minor documentation formatting changes.

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-01-09 14:43:41 -05:00
Brian Healey
95fbf5c921
ECDA512 algorithm support (#3953)
* ECDA512 algorithm support

* ECDA512

* happy day test for ECDA512 algorithm

* failure test for wrong key for ECDA512 algorithm

* add ability to use EC cert file

* update docs

* scalafmt

* Correct documentation

CHANGELOG_BEGIN
[Ledger API Authorization] Support elliptic curve algorithm for JWT verification
CHANGELOG_END

Signed-off-by: Brian Healey <brian.healey@digitalasset.com>

* correct docs warning
2020-01-09 07:25:04 -05:00
Leonid Shlyapnikov
e75b98351c Aligning DB contract table with domain.ActiveContract class (#3989)
* Aligning DB contract table with domain.ActiveContract class

adding key,signatories, observers and agreement_text to DB contract table
removing witnessParties

Reading signatories and observers from contracts table

Updating doc, removing witnessParties

Address code review comments, thanks @S11001001

CHANGELOG_BEGIN

[JSON API - Experimental]
- Align ``contract`` table with ``domain.ActiveContract`` class.
  The database schema has changed, if using ``--query-store-jdbc-config``,
  you must rebuild the database by adding ``,createSchema=true``. See #3754.
- ``witnessParties`` field is removed from all JSON responses.

CHANGELOG_END

* Fix TypeScript domain models

remove witnessParties and workflowId fields. workflowId has be removed
from JSON output a while ago.
2020-01-08 20:39:57 +00:00
Robin Krom
be774dc5d2
release 0.13.42 (#3982)
* release 0.13.42

CHANGELOG_BEGIN
CHANGELOG_END

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

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

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* I don’t understand Rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-01-08 17:10:17 +01:00
Moritz Kiefer
d1449e78c7
Add Zsh completions for the assistant (#3980)
* Add Zsh completions for the assistant

This is slightly more annoying for users since at least on Linux there
doesn’t seem to be a user-writable directory that is in `$fpath` by
default. I think on Zsh we could probably write them to
/usr/local/share/zsh/site-functions but I’d rather avoid platform
specific logic here. I would expect that Zsh users are usually
somewhat comfortable with modifying the config and this also matches
other installation instructions, e.g.,
https://github.com/zsh-users/zsh-completions#manual-installation.

On the plus side, the completions look significantly nicer in Zsh
since they include the description of commands.

CHANGELOG_BEGIN
- [DAML Assistant] Zsh completions for the DAML Assistant are now
  installed as part of ``daml install``. To activate them you need to
  add ``~/.daml/zsh`` to your ``$fpath``, e.g., by adding
  ``fpath=(~/.daml/zsh $fpath)`` to the beginning of your ``~/.zshrc``
  before you call ``compinit``.
CHANGELOG_END

* Fix tests

* Update daml-assistant/src/DA/Daml/Assistant/Install/Completion.hs

Co-Authored-By: associahedron <231829+associahedron@users.noreply.github.com>

Co-authored-by: associahedron <231829+associahedron@users.noreply.github.com>
2020-01-08 14:58:13 +01:00
Leonid Shlyapnikov
2c154f2299 Rename argument to payload in domain.ActiveContract (#3971)
CHANGELOG_BEGIN

[JSON API - Experimental] Rename ``argument`` in active contract to ``payload``. See #3826.

CHANGELOG_END
2020-01-08 13:59:27 +01:00
Richard Kapolnai
e20ca6fbfd
Fix: make use of unused my_text in docs example (#3949) 2020-01-07 15:31:12 +01:00
associahedron
e055ad8038 daml-assistant: Install bash completion scripts on Linux and Mac. (#3946)
* Improve bash completions for daml-assistant.

* Install bash completion script automatically

* Better default logic for bash completions

* specifically -> explicitly

* Copyright headers

* Better hook logic and refactoring

* Handle non-standard installations more robustly.

* Handle CI env & add changelog note.

CHANGELOG_BEGIN

- [DAML Assistant] Bash completions for the DAML assistant are now
available via ``daml install``. These will be installed automatically
on Linux and Mac. If you use bash and have bash completions installed,
these bash completions let you use the tab key to autocomplete
many DAML Assistant commands, such as ``daml install`` and
``daml version``.

CHANGELOG_END

* Mention bash completion in assistant docs

* Remove promises
2020-01-06 15:51:32 +00:00
Gary Verhaegen
878429e3bf
update copyright notices to 2020 (#3939)
copyright update 2020

* update template
* run script: `dade-copyright-headers update .`
* update script
* manual adjustments
* exclude frozen proto files from further header checks (by adding NO_AUTO_COPYRIGHT files)
2020-01-02 21:21:13 +01:00
Leonid Shlyapnikov
f22d52a2ff Change variant JSON encoding, so it is easier to pattern match on it in TypeScript (#3882)
* Change variant json encoding,

adding integration test

* Add DamlLfTypeLookup dependencies

* Add MetadataReader

* Add test WIP

* Add serialize test cases

* Add serialize test cases, WIP

* Test for variant encoding decoding

* Solving merge conflicts

* Updating roundtrip test

* Minor cleanup

* Addressing code review comments

Add JsonVariant custom matcher

* Update specification

* Update link

* Add test case, WIP

* Add proper template key resolution

* Got rid of choice record ID resolution, resolving choice type and key type

* Fixing logging

* Add Contract Key decoding tests

* cleanup

* cleanup

* Update JSON variant encoding tests

* Add more contract key JSON decoding tests

* Fix variant JSON encoding

* Change value predicate to support new variant encoding

* Change value predicate to support new variant encoding

* Add lookup by contract key test case

where contract key contains variant and record

Add `requiredResource` to bazel utils

CHANGELOG_BEGIN

- [JSON API - Experimental] Change variant JSON encoding. The new format is ``{ tag: data-constructor, value: argument }``.
  For example, if we have: ``data Foo = Bar Int | Baz``, these are all valid JSON encodings for values of type Foo:
  - ``{"tag": "Bar", "value": 42}``
  - ``{"tag": "Baz", "value": {}}``
  See #3622

- [JSON API - Experimental] Fix ``/contracts/lookup` find by contract key.

- [JSON API - Experimental] Fix ``/command/exercise`` to support any LF type as a choice argument.
  See #3390

CHANGELOG_END

* minor cleanup

* Fix copy/paste

* Renaming

* Got rid of DAML LF identifier resolution

resolving DAML LF Type based on command type

* Address code review comments, thanks @S11001001

* Address code review comments, thanks @S11001001

Do not include any error handling here; this partial function should
only match the successful case, JsonVariant.

* Address code review comments, thanks @S11001001

comment

* Address code review comments, thanks @S11001001

using `JsonVariant` for variant encoding/decoding

* Address code review comments, thanks @S11001001

replace `find` and `map` chain with collectFirst

* Update docs/source/json-api/lf-value-specification.rst

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <scompall@nocandysw.com>
2019-12-24 20:55:44 +00:00
Rohan Jacob-Rao
256a8f09f6 Release (#3894) 2019-12-19 04:16:15 +00:00
Brian Healey
ec18d9aa95
Update ledger-api-test-tool readme instructions for daml docs (#3898)
* Update ledger-api-test-tool readme instructions for daml docs

* remove STDERR / STDOUT pipe to file examples

* address review feedback

* Add commentary on tests which can be excluded for an --all-tests run because of clock, stress or mutation issues
2019-12-18 22:23:00 -05:00
Andreas Herrmann
06cd1f14a2
Expose timestamp in DAML triggers (#3858)
* Add time to Trigger update function

CHANGELOG_BEGIN

- [DAML Triggers - Experimental] Expose timestamp in triggers.
  See `#3612 <https://github.com/digital-asset/daml/issues/3612>`__.

CHANGELOG_END

* Add triggers time test

* Update trigger docs
2019-12-17 11:12:05 +01:00
Leonid Shlyapnikov
0c741a64cb Fix contract lookup endpoint (#3809)
* Lookup by Contract ID and Contract Key is WIP

* factor out "contract ID or key" JSON decoding

- adapted from fc132253 (#2695)

* Resolving conflicts

* Resolving conflicts

* Lookup by contract ID works

* Testing new contract created by IOU_Transfer can be looked up

* error if key and contractId specified for lookup at the same time

* Lookup by contract key test

* Lookup docs

* re-format with `./fmt.sh`

* minor cleanup

CHANGELOG_BEGIN

- [JSON API - Experimental] Fix and document ``/contracts/lookup`` endpoint. See #3755.

CHANGELOG_END
2019-12-12 22:16:12 +00:00
Moritz Kiefer
787e5557de Fix authorization docs for contract keys (#3835)
* Fix authorization docs for contract keys

This should hopefully match what we have actually implemented.

* Update wording
2019-12-12 20:33:03 +00:00
Samir Talwar
1184ee6f0a Sandbox: Split the Ledger API server and Indexer into separate packages. (#3783)
* sandbox: Split the StandaloneApiServer from the StandaloneIndexerServer.

* sandbox: Move StandaloneApiServer's nested classes to its companion.

And make them private.

* reference-v2: Rename `IndexServer` to `ApiServer`.

* sandbox: Move the services into the `apiserver.services` package.

* sandbox: Move SandboxEventIdFormatter's vals to the top.

* sandbox: StandaloneApiServer helper classes don't need to be Products.

* docs: Fix links for LedgerApiServer and Standalone{Api,Indexer}Server.

* sandbox: Delete a misleading comment from `StandaloneApiServer`.

* sandbox: Rename SandboxEventIdFormatter to EventIdFormatter.
2019-12-11 13:23:39 +00:00
Stefano Baghino
e296cebada
Improve auth docs (#3804)
- Document claims and what is required to access each service
- Refer to claims documentation in the JWT docs for the sandbox
- Fix a few typos
- Specify a single padding value for all table elements (CSS)

CHANGELOG_BEGIN

- [Documentation] Added documentation for authorization claims

CHANGELOG_END
2019-12-10 21:34:47 +01:00
Leonid Shlyapnikov
dcc7dc913f
Add choice result to the exercise response (#3757)
* Adding choice result to the exercise response, WIP

* Adding choice result to the exercise response, WIP

* Refactoring towards #3390,

ExerciseCommand argument does not always have to be a Record, changing
typearg: JsObject -> JsValue

* Cleanup

* exercise-with-result endpoint

* todo

* Switching /commands/exercise to use SubmitAndWaitForTransactionTree,

populating archived and created from TransactionTree

* removing debug println

* Fixing tests

* Removing `/command/exercise-with-result` endpoint

this one returns only exercise result, `/command/exercise` now returns
exercise result and events

* Updating docs

* Updating docs

CHANGELOG_BEGIN

- [JSON API - Experimental] Expose exercise result. Changed the output
of the ``/command/exercise``. Note ``exerciseResult`` and ``contracts``
in ``{"status":200,"result":{"exerciseResult": ...,"contracts":[...]}``.
See #3314

CHANGELOG_END
2019-12-10 10:09:24 -05:00
Moritz Kiefer
9510a5a382 Release SDK 0.13.40 (#3797)
* Release SDK 0.13.40

* rst is stupid
2019-12-10 09:56:21 +00:00
Nemanja
bec60c69b7 added tagmanager to docs (#3149)
* added tagmanger to docs
- 3rd party integration
- event tracking

* Removed the duplicate TagManager script

* Pushed the wrong script, sorry. This PR has the propper one
2019-12-06 13:52:06 +00:00
associahedron
158d1357c2 Fix code syntax in latest release notes (#3760) 2019-12-06 11:59:29 +00:00
associahedron
9a27ed092f Prepare release 0.13.39 (#3750) 2019-12-05 20:08:12 +00:00
Darko Pilav
d8eebc866d Change range of snippet to be displayed (#3746)
Fixes #3745
2019-12-05 13:25:13 +01:00
Stefano Baghino
da9306414b Add authentication support to DamlLedgerClient (#3743)
Add documentation

CHANGELOG_BEGIN
- [Java Bindings] Added authentication support. See `issue #3626 <https://github.com/digital-asset/daml/issues/3626>`__.
CHANGELOG_END
2019-12-05 10:57:51 +00:00
Robert Autenrieth
a827040e4c
Add authentication docs (#3661)
* Add authentication docs

* Use anonymous references

* Update obsolete info on authentication

* Improve authentication intro
2019-12-04 14:51:19 +01:00
Moritz Kiefer
24b6dfd319
Support authentication in DAML triggers (#3730)
* Support authentication in DAML triggers

fixes #3259

CHANGELOG_BEGIN

- [DAML Triggers - Experimental] DAML triggers can now be run against
an authenticated ledger.

CHANGELOG_END

* Remove debug printf

* Windows is bad
2019-12-04 13:57:44 +01:00
Moritz Kiefer
e4cfc3f8f7 Fix RST in DAML script docs (#3711)
RST doesn’t like having a word character after an inline code block.
2019-12-03 10:27:32 +00:00
Leonid Shlyapnikov
e6ff9a6766
Fixing the GET contracts/search endpoint, (#3700)
* Fixing the GET contracts/search endpoint,

Returning all active contracts for all known templates, skipping the
query store persistence.

* minor cleanup
2019-12-02 12:56:06 -05:00
Moritz Kiefer
5a46777855
Fix pattern matching example (#3697) 2019-12-02 17:20:25 +01:00
Martin Huschenbett
952184298e Release DAML SDK 0.13.38 (#3676) 2019-11-29 12:16:20 +01:00
Stefano Baghino
c199c20730 Document HTTP JSON API authentication (#3657)
* Document HTTP JSON API authentication

* Update docs/source/json-api/index.rst

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

* Update docs/source/json-api/index.rst

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

* Address review https://github.com/digital-asset/daml/pull/3657#pullrequestreview-323840183

* Update docs/source/json-api/index.rst

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

* Update docs/source/json-api/index.rst

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
2019-11-28 09:25:22 +00:00
associahedron
e8a5db5de3 Add Numeric to basic types table. (#3595) 2019-11-27 09:10:33 +00:00
Martin Huschenbett
167232bd81
Ban usage of generic templates (#3631)
We don't drop full support from the compiler yet but rather ban their use by
adding a check to the preprocessor. We'll remove the actual support as we go
along with fixing the upgrading story.

CHANGELOG_BEGIN

- [DAML Compiler] Make the experimental feature "generic templates"
  unavailable. The current implementation is at odds with other, more important
  language features still under development.

CHANGELOG_END
2019-11-26 17:15:17 +01:00
Martin Huschenbett
e9be9419f8
Remove documentation for generic templates (#3619)
Unfortunately, our current implementation of generic templates is at odds
with cross-SDK imports of DARs and hence the whole upgrading story for
DAML models, particularly around type classes, which generic templates
heavily rely upon. Thus, we've decided to drop support for generic templates
for now.

This PR does the first step by dropping the documentation. I've deliberately
not added a changelog entry here. I'll do that once we have dropped support
from the compiler.
2019-11-26 10:10:13 +01:00
Stefano Baghino
25f65f746b
Move DamlLedgerClient to builder-based constructors (#3620)
With the intent of adding more functionality to the Java bindings, in
particular authentication, this PR deprecates existing constructors in
favor of a more flexible builder based approach.

CHANGELOG_BEGIN

- [Java Bindings] Deprecated existing constructors for
``DamlLedgerClient``, please use the static ``newBuilder`` method to
instantiate a builder and use it to create the client, starting from
either a ``NettyChannelBuilder`` or a plain host/port pair.

CHANGELOG_END
2019-11-25 23:19:14 +01:00
nickchapman-da
0f0a12db22 Sdk access token file (#3607)
* support --access-token-file in SDK

* rename: HostAndPort -> LedgerArgs; HostAndPortFlags -> LedgerFlags

* integration test for --access-token-file

* doc & more help

* address comments: use FilePath

* adapt to renamed arg: --auth-jwt-hs256-unsafe

* avoid use of single quotes on command line
2019-11-25 17:38:41 +00:00
Remy
3fa6043056 fix typo in java codegen doc (#3618)
Thanks Miklos !
2019-11-25 16:34:14 +00:00
Ognjen Maric
48174c8ee4
Fixed a stale reference to a MustPaint contract (#3613) 2019-11-25 16:29:32 +01:00
Stefano Baghino
552bf6497d Obscure shared-secret-based authenticated sandbox (#3609)
The shared-secret-based authentication is there exclusively for testing,
this PR makes sure that this is correctly reported through the CLI and
hides this until further notice.

Makes sure that the flag clearly says that this option is not meant for
production use cases.

A warning is already printed when this feature is used, both at startup
and every time this verifier is used.

CHANGELOG_BEGIN

- [Sandbox] The ``--auth-jwt-hs256`` is renamed to
``--auth-jwt-hs256-unsafe``: you are advised to _not_ use this JWT token
signing way in a production environment.

CHANGELOG_END
2019-11-25 14:27:21 +00:00
Moritz Kiefer
27051160eb
Support multi-participant DAML script (#3605)
* Support multi-participant DAML script

fixes #3555

CHANGELOG_BEGIN

- [DAML Script - Experimental] DAML script can now run be used in distributed topologies.

CHANGELOG_END

* Fix ports in multiparticipants tests
2019-11-25 12:43:47 +01:00
Remy
b506e27bde Java-codegen: add support for Generic Maps. (#3549)
* java-bindings: use LinkedHashMap asunderlying Map for DamlGenMap

* Address Samir's comments

* java-codegen: make DamlList, DamlMap and DamlGenMap immutable

* Address Samir's comments

* Adress Gerolf's comments

* more cleanup

* fix value generator

* Address Gerolf's comments:

CHANGELOG_BEGIN

[Java Bindings]
  * Rename ``DamlMap`` to ``DamlTextMap``
  * ``DamlCollectors`` class provides Collectors to build more easily ``DamlList`` and ``DamlTextMap``
  * Change the recommended method to convert ``DamlValue`` containers from/to Java Bindings containers.
    See `docs/source/app-dev/bindings-java/codegen.rst` for more details the new methodology.

CHANGELOG_END

* fix tests
2019-11-22 08:07:53 +00:00
Rohan Jacob-Rao
56820447d5 Fix link (#3579) 2019-11-21 18:54:50 +00:00
Moritz Kiefer
c34f56ab2e
Add template id filtering to triggers (#3577)
* Add template id filtering to triggers

CHANGELOG_BEGIN
- [Daml Triggers - Experimental] DAML triggers now allow you to specify which templates you want to listen for which can improve performance.
CHANGELOG_END

* Address review comments

* Fix list-triggers test
2019-11-21 16:50:40 +01:00
Moritz Kiefer
ec5d832c48
Generate API docs for DAML script and include them in the SDK docs (#3568)
* Generate API docs for DAML script and include them in the SDK docs

* Update daml-script/daml/Daml/Script.daml

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
2019-11-21 12:59:09 +01:00
Moritz Kiefer
a4905d6b0f Release 0.13.37 (#3554) 2019-11-20 16:45:42 +00:00
Miklos
a7ae9c5fba
Improve DAML SDK documentation (#3509)
Improved DAML SDK documentation, focusing on quickstart guide:
- Corrected typos.
- Corrected some broken links.
- Made sample code formatting consistent (variable naming, comments).

Co-Authored-By: Samir Talwar <samir.talwar@digitalasset.com>
2019-11-20 14:57:57 +01:00
Moritz Kiefer
f94b832201 Include contract ids in DAML script’s query (#3546) 2019-11-20 11:07:52 +00:00
Moritz Kiefer
6d2ed90f29 Remove target flags in DAML triggers and DAML script (#3545)
1.7 is now the default so we no longer need those.
2019-11-20 10:54:16 +00:00
Leonid Shlyapnikov
a849bb86e4 JSON API: quit immediately after creating schema (#3534)
* quitting after create schema

* better error codes

* quitting after create schema

* better error codes

* explicitly creating schema during integration testing

* Updating release notes and CLI help

* Updating release notes

* minor update

* Fixing formatting

* update
2019-11-19 21:39:18 +00:00
Moritz Kiefer
8615266230 Switch the default DAML-LF version to 1.7 (#3530) 2019-11-19 19:18:07 +00:00
Moritz Kiefer
7deca903bb Add documentation for DAML script and bundle it in the SDK (#3527) 2019-11-19 17:19:57 +00:00
Martin Huschenbett
e82630d864
Move the docs for the visualization to the experimental section (#3531) 2019-11-19 17:40:50 +01:00
Stefano Baghino
c51ecd3c58
Extractor with authentication (#3514)
* Make Extractor work against Ledger API servers protected by authentication

* Update changelog

* Address https://github.com/digital-asset/daml/pull/3514#pullrequestreview-318811500

- https://github.com/digital-asset/daml/pull/3514#discussion_r347753205
- https://github.com/digital-asset/daml/pull/3514#discussion_r347753629
- https://github.com/digital-asset/daml/pull/3514#discussion_r347754462

* Address https://github.com/digital-asset/daml/pull/3514#discussion_r347755484

* Address https://github.com/digital-asset/daml/pull/3514#discussion_r347752424

* Address https://github.com/digital-asset/daml/pull/3514#discussion_r347756328

* Fix docs

* Fix artifacts.yaml
2019-11-19 17:12:25 +01:00
Bernhard Elsner
db55881e81 Fix missing header margin in certain screen widths (#3520) 2019-11-19 10:07:42 +00:00
Leonid Shlyapnikov
e1cbd38f48 CLI configuration to enable serving static content as part of the JSON API daemon (#3460)
* StaticContentEndpoint

* cleanup

* release notes

* Add test

* SDK doc update

* Copying the directory content explicitly

to avoid creating a symlink, I believe that is the cause of the Windows issue

* creating a static content dir from the test

* fixing release notes

* creating a tmp dir

* fixing release notes

* Using Gen.Identifier to generate random strings
2019-11-18 19:31:33 +00:00
Moritz Kiefer
5458053ea9 Add pending set to DAML triggers (#3502)
fixes #3360
2019-11-18 14:25:40 +00:00
Martin Huschenbett
f1df336df0 Fix typo in docs for JSON API query language (#3497) 2019-11-18 08:15:05 +00:00
Martin Huschenbett
ab07b05fcb Clean up rules_daml (the bazel rules for DAML) (#3495)
There are rules that are used nowhere and seem like old cruft.
2019-11-18 08:12:47 +00:00
Gerolf Seitz
e6651ccdc2 Re-release 0.13.35 as 0.13.36 (#3478) 2019-11-14 19:54:06 +00:00
Oliver Seeliger
7744b886dd Release 0.13.35 (#3464) 2019-11-14 15:00:57 +00:00
Robin Krom
f2cc138204
language: reexport module in data dependencies (#3457)
This change allows to only import `module A` from the instances package
if data dependencies are present instead of  `module A` and `module
AInstances`.
2019-11-14 14:20:09 +01:00
Stephen Compall
c36696f3a7 json-api: in-memory comparison query (#3405)
* comparison query parser given scalar parser

- written in half-error-propagation style to better suit other potential
  error features

* factor dupes in RangeExpr

* text range parsing

* interpreting Range into in-memory predicate; points out bad dedupe from earlier

* make reuse of the scalar extractors much nicer

* express date, time, int64 as factored-out range exprs

* express numeric as factored-out range expr

* factor \&/ usage

* refactor LF value extractors for reuse in range queries

* factor mkRange usage

* totally deconstruct the int64 and text cases

* totally deconstruct the date and timestamp cases

* totally deconstruct the numeric case

* document comparison queries

* use Utf8.Ordering for text comparison queries

* int64 range query tests

* more int64 range query tests

* date, string, numeric range query tests

* include line # in query test successes table

* timestamp range query tests

* add release note

* remove duplicate changelog entry from #3425
2019-11-12 23:02:33 +00:00
Robin Krom
c0fcad75ce language: updated docu mentioning instances module (#3433)
I added a sentence on how to import the instances as well.
2019-11-12 16:41:06 +00:00
Moritz Kiefer
45d2b7048c
[daml-triggers] Rename getTemplates to getContracts (#3430)
Given that this returns the contracts of a given template rather than
returning templates, this name makes a lot more sense.
2019-11-12 14:48:24 +01:00
Andreas Herrmann
33e47828e3
Bazel 1.1 (#3249)
* bazel: 0.28.1 --> 1.1.0

* bazel-watcher sha256

* Fix missing line in patch

* proto_source_root --> strip_import_prefix

See https://github.com/bazelbuild/bazel/issues/7153 for details.

* Update rules_nixpkgs

Required to avoid errors of the form
```
ERROR: An error occurred during the fetch of repository 'node_nix':
   parameter 'sep' may not be specified by name, for call to method split(sep, maxsplit = None) of 'string'
```

and
```
ERROR: An error occurred during the fetch of repository 'node_nix':
   Traceback (most recent call last):
	File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
		_execute_or_fail(repository_ctx, <3 more arguments>)
	File "/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
		fail(<1 more arguments>)

Cannot build Nix attribute 'nodejs'.
Command: [/Users/runner/.nix-profile/bin/nix-build, /private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/node_nix/nix/bazel.nix, "-A", "nodejs", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/private/var/tmp/_bazel_runner/17d2b3954f1c6dcf5414d5453467df9a/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
src/main/tools/process-tools.cc:173: "setitimer": Invalid argument
```

* Update rules_scala

* .proto has been removed, use [ProtoInfo] instead

See
https://docs.bazel.build/versions/1.1.0/be/protocol-buffer.html#proto_library

* python3_nix add nix_file attribute

To avoid the following error

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/BUILD:66:1: //:nix_python3_runtime depends on @python3_nix//:bin/python in repository @python3_nix which failed to fetch. no such package '@python3_nix//': Traceback (most recent call last):
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 149
                _execute_or_fail(repository_ctx, <3 more arguments>)
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/io_tweag_rules_nixpkgs/nixpkgs/nixpkgs.bzl", line 318, in _execute_or_fail
                fail(<1 more arguments>)

Cannot build Nix attribute 'python3'.
Command: [/home/aj/.nix-profile/bin/nix-build, "-E", "import <nixpkgs> { config = {}; overlays = []; }", "-A", "python3", "--out-link", "bazel-support/nix-out-link", "-I", "nixpkgs=/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs"]
Return code: 1
Error output:
error: anonymous function at /home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/nixpkgs/nixpkgs.nix:3:1 called with unexpected argument 'config', at (string):1:1
```

* rules_haskell unnamed string.split(_, maxsplit = _)

The keyword argument may no longer be named.

* string.replace(_, _, maxsplit = _) may not be named

* Move proto sources from deps to data

Fixes

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/daml-lf/archive/BUILD.bazel:150:1: in deps attribute of scala_test rule //daml-lf/archive:daml_lf_archive_reader_tests_test_suite_src_test_scala_com_digitalasset_daml_lf_archive_DecodeV1Spec.scala: '//daml-lf/archive:daml_lf_1.6_archive_proto_srcs' does not have mandatory providers: 'JavaInfo'. Since this rule was created by the macro 'da_scala_test_suite', the error might have been caused by the macro implementation
```

* Define sha256 for haskell_ghc__paths

Bazel 1.1.0 fails on missing hashes.

* Disable --incompatible_windows_native_test_wrapper

* //compiler/daml-extension don't modify sources

Modifying sources in-place can cause issues on Windows, where build
actions are not sandboxed and changes on sources can affect other build
steps.

* bazel-genfiles --> bazel-bin

The bazel-genfiles symlink has been removed since Bazel 1.0.
See https://github.com/bazelbuild/bazel/issues/8651

* Mark dev_env_tool repository rule as configure

See
https://docs.bazel.build/versions/1.1.0/skylark/lib/globals.html#repository_rule

* Move data deps into data attribute

* Mark dev_env_tool as local = True

* Manually fetch @makensis_dev_env
2019-11-11 10:06:03 +01:00
Robin Krom
6cf3a5276f
language: introduce data-imports (#3399)
* language: introduce data-imports

Right now the user experience for importing dalfs and dars from
different sdks is quiet confusing. This PR tries to solve this. We add
an additional field `data-imports` to daml.yaml. These imports can come
from different SDK's and we will generate interface files containing the
data types and their Template instances.

This also simplifies the migration command, as it now always imports the
respective packages as `data-imports`.
2019-11-08 16:32:30 +01:00
Robert Autenrieth
89d6c7375c
Add a JWT authentication to sandbox (#3283)
Fixes #3363
2019-11-07 23:04:16 +01:00
Remy
fa6b339507
Release 0.13.34 (#3373) 2019-11-07 15:02:06 +01:00
Moritz Kiefer
c57a31d630
Compile DAML trigger library with --target 1.7 (#3372) 2019-11-07 12:08:44 +01:00
Rohan Jacob-Rao
2eea995840 Release (#3369) 2019-11-06 23:30:00 +00:00
Stephen Compall
d0ec381925 json-api: store contracts similar to Extractor's single-table (#3192)
* new library ledger-service/db-backend

* borrow contracts table schema from extractor

* borrow contract insertion, removing some data to be unused

* match contract schema with insert function

* factor insertContract arguments

* offset table declarations

* CLI argument for query store

* surrogate template IDs

* compute surrogate template IDs on-the-fly

* database init action

* incoherent typeclasses, eh

* newtype SurrogateTpId

* offset fetch/update functions

* bad sql

* bulk insert contracts, function for selecting contracts

* expose contract column name for query's usage

* Initializing DB on startup if configured

* dropping existing tables as part of initialization

* fix some query syntax errors

* createSchema flag

* function for streaming transactions with jwt party selected

* formatting

* usage

* collect acs contracts and the ledger offset at the end

* lastOffset

* fixing merge conflicts, updating the way 3rd party deps are specified

* Moving ContractDao into http-json module

so it can take domain AST as an input

* cleanup

* injecting new dependencies

* split transaction batches into inserts and deletes

* generate sql for deleting contracts

* `fetch_sources = True` for java_deps

* make the delete-constructed fragment more efficient; handle empty list here

* pass logHandler for insertContracts

* ContractDao returns ConnectionIO, it's up to the caller to wrap query into a transaction

* fixing typo

* minor cleanup, moving fromLedgerApi factory function into corresponding companion objects

* don't need it any more

* GetActiveContractsResponse => domain.Contract factory

* make concatFragment private

* add partition graph; move other contract-fetching experiments to ContractsFetch

* experimenting with akka sources

* introducing domain.Offset to work around API's empty/null offset cases

* minor cleanup

* decompose fetchActiveContractsFromOffset

* missed via

* ACS splitting graph

* finish doc for ACS splitting graph

* remove unneeded stages

* WIP

* lazily read a stream of ConnectionIO into a single ConnectionIO

* cancel on IO error

* figuring out how to put all the pieces together

* graph WIP

* Removing workflowId from the JSON API

* simplify acsAndBoundary; describe other flow pieces

* WIP

* use Vector in InsertDeleteStep; add variant for ACS (no deletes)

* `org.wartremover.warts.NonUnitStatements` enforced in `http-json` module

* evaluate InsertDeleteStep to a ConnectionIO

* database variant of LfValueCodec, using numbers for numbers

* convert input to JSON, combine insert plans, connect rest of contractsToOffsetIo

* remove strict contractsToOffset sink

* moving dao methods into an object

* putting pieces together

* contractsFromOffset WIP

* should be it

* cleanup

* cleanup

* contractsIo that takes List[domain.TemplateId.RequiredPkg])

* contractsIo that takes List[domain.TemplateId.RequiredPkg])

* cleanup

* put all pieces together, testing

something does not work yet

* diff is not required to return anything

that is why Sink.lastOption that gives Option[domain.Offset]

* factor out tuple split

* use traverse syntax in contractsIo2

* factor explicit flow steps out of graph DSL; remove aggregate

* locally model the Absolute/Begin distinction for offset bookmarking in DB

* Adding test cases to run HTTP Service with Postgres backend

the same set of test cases, run with and without DB backend

* make better use of domain.Offset in OffsetBoundary

* monomorphize InsertDeleteStep#append

* Disabling a test that fails with DB backend

* add release note

* add release note about workflowId

* a test case that checks the number or stored contracts

* trying to figure out why Postgres test fails on Windows with NPE
2019-11-06 13:53:16 -05:00
Moritz Kiefer
ead2e577f2
Document how to override the SDK version without modifying daml.yaml (#3355)
This has come up in some discussions around packaging where people
want to clone a repo and build it with the same SDK version that is
used in their own project so they can depend on it. While it’s
possible to `sed` the `daml.yaml`, setting the env var seems like a
nicer solution.
2019-11-06 16:32:34 +01:00
Bernhard Elsner
6e36f05152
Update deployment page (#3352) 2019-11-06 14:08:16 +01:00
Robin Krom
cff6db7b31
language: refactoring of iface file generation and package db setup. (#3342)
* language: refactoring of iface file generation and package db setup.

This is a refactoring of the damlc part that creates the package
database and the code generation for interface files. This is a
preparation for the cross sdk imports.
We also add an internal command to damlc to generate generic instances
code and use simple copying via {..} in the migration command. An
additional test checks that migration via generics still works.

* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Upgrade.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* clearer description for generate-gen-src

* updated documentation

* correct copy/pasta mistake

* added a comment on different build options in migration command.

* Update compiler/damlc/lib/DA/Cli/Damlc.hs

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* resolve dalf paths from dar manifest

* added a comment on different headers in upgrade modules.

* removed monoid instance for ExtractedDar
2019-11-06 12:23:58 +01:00
Moritz Kiefer
90679c93f8
Use regular ContractIds in DAML triggers (#3337)
The only reason for having AbsoluteContractId was that we could get
some more instances in particular `Ord` and `MapKey` but given that
`ContractId` will be a valid key type for the new DAML-LF maps, we can
just use slower implementations for now and switch to Map-based
implementations once that has landed.

fixes #3336
2019-11-05 15:15:07 +01:00
Jussi Mäki
819f8a8af5 Bring back daml integration kit docs (#3292)
* Bring back daml integration kit docs

This just revives the documentation, without updating it yet.

* Updated URLs and remvoe references to the IndexService

* Add release note for revival of integration kit docs

* Update unreleased.rst

* update release notes
2019-10-30 17:15:58 +00:00
Moritz Kiefer
e7280f96b3 Add dedupCreate/dedupExercise helpers to the DAML trigger API (#3280)
Given how common this is, it seems worthwile to add helpers for this.
2019-10-29 18:06:43 +00:00
Moritz Kiefer
d5de7d2177
Release 0.13.32 (#3276) 2019-10-29 10:25:00 -04:00
Moritz Kiefer
3cd5cfc1d7 Include daml-docs for daml-trigger in the documentation (#3263)
* Include daml-docs for daml-trigger in the documentation

* Fix link to trigger docs
2019-10-28 19:30:23 +00:00
Andreas Herrmann
2bd1db490a
Replace bazel-deps by rules_jvm_external (#3253)
* Update bazel-common to fix javadoc issues

Specifically, to fix the following error

```
ERROR: /home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel:7:1: in javadoc_library rule //ledger-api/rs-grpc-bridge:rs-grpc-bridge_javadoc:
Traceback (most recent call last):
        File "/home/aj/tweag.io/da/da-bazel-1.1/ledger-api/rs-grpc-bridge/BUILD.bazel", line 7
                javadoc_library(name = 'rs-grpc-bridge_javadoc')
        File "/home/aj/.cache/bazel/_bazel_aj/5f825ad28f8e070f999ba37395e46ee5/external/com_github_google_bazel_common/tools/javadoc/javadoc.bzl", line 27, in _javadoc_library
                dep.java.transitive_deps
object of type 'JavaSkylarkApiProvider' has no field 'transitive_deps'
```

* Define Maven deps using rules_jvm_external

* Pin artifacts

* Remove bazel-deps generated targets

* Remove bazel-deps

* Switch to rules_jvm_external targets

* update bazel documentation

* pom_file: There are no more bazel-deps targets

* BAZEL-JVM.md `maven_install` typo
2019-10-28 13:53:14 +01:00
Andreas Herrmann
dc2f10ebe6 Use TemplateTypeRep in DAML Trigger API (#3245)
* Add TemplateTypeRep to AnyContractId

* Define Trigger.ContractId t

* Use Trigger.ContractId t

* Implement fromCreated and fromArchived

* instance MapKey TemplateTypeRep

* More efficient ACS access using Map TemplateTypeRep

* ./fmt.sh

* toString and fromString for Identifier

* Replace Identifier by TemplateTypeRep

* TheContractId --> AbsoluteContractId

https://github.com/digital-asset/daml/pull/3245#discussion_r338033546
2019-10-23 13:56:59 +00:00
Stephen Compall
1234bbfcc6 fix a few links in documentation (#3242)
* issue# no longer relevant in query spec

* correct slack and new-issue links for triggers doc

* navigator link
2019-10-21 19:28:02 +00:00
Andreas Herrmann
b0bd8328ea
Detect high level trigger (#3239)
* capture high-level module in converter

* Factor out trigger discovery

* Support running high-level triggers directly

* Don't convert to low-level trigger in Retry

* ./fmt.sh

* Update CopyTrigger, docs, and changelog
2019-10-21 14:22:08 +02:00
Martin Huschenbett
5a5d7e06e9 Fix reference to old assistant in sandbox docs (#3236) 2019-10-20 10:25:52 +00:00
Gerolf Seitz
aa30fedfde
Release 0.13.31 (#3229)
* Release 0.13.31

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

Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2019-10-18 16:37:06 +02:00
Stefano Baghino
9571e29c7e
Allow Navigator to use authenticated Ledger API (#3138)
* Make Navigator authenticate with the participant

* Solve shadowed import warning

* Fix tests to work with new methods

* Optimize imports

* More imports optimizations

* Ensure plainText channel is used unless explicitly stated

* Work around a lack of APPDATA on CI

* Add docs

* Update release notes

* Update navigator/frontend/src/ui-core/src/session/UI.tsx

Co-Authored-By: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336403903

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336382140

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336383076

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336389886

* Address https://github.com/digital-asset/daml/pull/3138#discussion_r336391680
2019-10-18 15:39:42 +02:00
Moritz Kiefer
e31526c35c Use the same CopyTrigger in the docs and the tests (#3213)
* Use the same CopyTrigger in the docs and the tests

That way, we actually test what we use in our docs which seem like a
much better idea than duplicating the code.

* Add debugging output on failures
2019-10-17 12:52:15 +00:00
Remy
416bfcfa8e
daml-lf: fix maven coordinates of daml_lf_archive_reader (#3209) 2019-10-17 10:50:56 +02:00
Leonid Shlyapnikov
2a89ce8bb2 JSON API parties endpoint + Sandbox party management fix (#3193)
* Parties endpoint

`PartyManagementClient#listKnownParties` returns an empty List. Why?

* Fix for sandbox parties management (#3177) + JSON API `/parties` endpoint

* release notes

* updating release notes
2019-10-16 15:02:27 +00:00
Remy
2bc6b8d4f5
Release 0.13.30 (#3194)
* Release 0.13.30

* Address Martin's comments

* Address Mortiz's comments
2019-10-16 10:54:18 +02:00
Leonid Shlyapnikov
447c85c23b CLI option to specify JSON API interface (#3191) 2019-10-15 17:56:44 +00:00
Moritz Kiefer
dbddead461
Add a first draft of documentation for DAML triggers (#3181)
* Add a first draft of documentation for DAML triggers

The API will still change in a bunch of ways but I’d rather get some
docs in place now and update them as we change things than not have
any docs at all.

* Fix path to daml.yaml

* s/bot/trigger/

* fix source code markers

* Fix tests

* Update docs/source/triggers/index.rst

Co-Authored-By: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2019-10-15 16:50:43 +02:00
Remy
e45b585307 daml-lf: repackage daml-lf archive proto (daml_lf -> daml_lf_dev) (#3169) 2019-10-15 09:36:11 +00:00
Bernhard Elsner
3dc7b502fa
Update Slack links in docs (#3179) 2019-10-15 11:07:34 +02:00
Remy
d64df4b5f7 daml-lf: clean achive bazel build (#3175)
* clean the mess in daml-lf achive bazel build

* add release note

* Address Moritz's comments

* more release notes
2019-10-15 08:36:46 +00:00
Leonid Shlyapnikov
41fd64abb4 HTTP JSON API automatic package reload (#3090)
* Package reload scheduler

* Cleanup

* Cleanup

* addressing code review comments, removing todo

* Actually has to be like this, reduced version caches `templateIdMap`

we don't want it cached.

* Load only new package IDs instead of reloading the entire store
2019-10-14 15:08:21 +00:00
Gerolf Seitz
5592092cc7
Remove DAML-on-X IndexServer and Reference Server (#3108)
It is not needed anymore and can therefore be deleted.
2019-10-08 11:47:21 +02:00
Shaul Kfir
fd912af946 Typo fix on release-notes.rst (#3119) 2019-10-07 15:58:15 +00:00
Moritz Kiefer
aef44abe4f
Release 0.13.29 (#3111) 2019-10-04 16:39:46 +02:00
Moritz Kiefer
a0984b606a Release 0.13.28 (#3109) 2019-10-04 10:03:09 +00:00
Moritz Kiefer
506da16650 Fix module names in quickstart example (#3107)
* Fix module names in quickstart example

* Update references to test files
2019-10-04 09:18:27 +00:00
Martin Huschenbett
4623467c40
Update docs for type synonyms generated by generic template instances (#3071) 2019-09-30 14:47:55 +02:00
Leonid Shlyapnikov
3efe846a3a Renaming "active" -> "created" (#3064)
* Renaming "active" -> "created"

* Renaming "active" -> "created"
2019-09-27 19:07:24 +00:00
Anup Kalburgi
3686162c02
Adding visual -web command (#3009)
adding the visual-web command to damlc
2019-09-27 10:26:20 -04:00
Stefano Baghino
717bd38ec0
Read the TTL from the configuration service (#3052)
* Read the TTL from the configuration service

* Address https://github.com/digital-asset/daml/pull/3052#discussion_r328698432

* Fix docs
2019-09-27 12:02:47 +02:00
Leonid Shlyapnikov
1fa170366d
Return archived events from /command/exercise (#3036)
* Adding `domain.ArchivedContract`

* Adding `domain.Contract`

* Returning archived and active contracts from `/command/exercise`

Improving integration tests, asserting values in the response JSON

* Updating documentation

* Do not populate workflowId if it is not provided

set it to empty string (default), it is optional in the Ledger API
2019-09-26 16:06:18 -04:00
Gary Verhaegen
cf21ad2e81
document signature verification (#3050) 2019-09-26 18:16:58 +01:00
Gerolf Seitz
2bf259ccc2 Added recommendation to quote the JDBC URL to the sandbox docs. (#3016)
* Added recommendation to quote the JDBC URL to the sandbox docs.

* Update docs/source/tools/sandbox.rst

* use code-block
2019-09-25 16:29:31 +00:00
Leonid Shlyapnikov
5f9a48c534
Flattening results of the /contracts/search (#2987)
* Flattening results of the `/contracts/search`,

returning a `ActiveContract` instead of `GetActiveContractsResponse`

* Fixing the test,

it is an empty array instead of empty GetActiveContractResponse object

* Updating examples

* Updating release notes

* Update unreleased.rst

Accepting suggested changes

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

* Resolving master merge conflicts
2019-09-25 10:14:22 -04:00
Gary Verhaegen
5eb76eef91
release 0.13.27 (#3015) 2019-09-25 10:27:39 +01:00
Stephen Compall
ba468b842b internal link to daml json-api doc from daml assistant page (#3014)
* internal link to daml json-api doc from daml assistant page

* another link
2019-09-24 21:30:28 +00:00
Stephen Compall
e13d9624ad
move ledger-service/http-json docs into docs.daml.com tree, summarize purpose (#3012)
* verbatim move http-json docs to doc tree

* add json-api index to toc, convert md to rst

* better links

* sub-doc links, proper code inline

* replace headings according to README.md

* restore newlines

* one more newline

* point to rst docs from readme

* explain purpose of the JSON API and each endpoint

* daml-head not needed anymore, as in release

* oops 2 newlines
2019-09-24 16:41:52 -04:00
Moritz Kiefer
8ad74da20b
Support passing additional options to sandbox/navigator/json-api in daml start (#3002)
This should make `daml start` a bit more useful since you don’t have
to switch to starting all processes separately once you start
deviating from the defaults, e.g., I found myself wanting to specify a
custom ledger id during the hackathon. This is part 1 of ##2993.
2019-09-24 18:39:16 +02:00
Gary Verhaegen
cc66d054a8
release 0.13.26 (#2996) 2019-09-24 14:01:18 +01:00
Moritz Kiefer
bf3f0063d2
Get rid of ./build.sh scripts for damlc migrate (#2984)
Now that we have the build-options fields that makes for a much nicer
interface.
2019-09-23 19:08:30 +02:00
Jussi Mäki
26c5a64589
release 0.13.25 (#2952) 2019-09-18 14:34:05 +02:00
Leonid Shlyapnikov
b2b711c67b release-0-13-24 (#2922) 2019-09-16 15:19:10 -04:00
Richard Kapolnai
6368942496
Fix graphviz dot command in documentation to save output properly
Co-Authored-By: Anup Kalburgi
2019-09-16 15:04:00 +02:00
Leonid Shlyapnikov
c982478c6e Fixing quickstart-scala example and doc (#2901)
* Fixing quickstart-scala example

* Updating docs

* Adding Scala codegen config

* Minor cleanup

* Apply suggestions from code review

Applying doc changes, thanks @bame-da!

Co-Authored-By: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
2019-09-16 12:44:04 +00:00
Leonid Shlyapnikov
4a9fb1ccff
DAML assistant codegen command (#2800)
* DAML assistant codegen command, codegen config reader and docs
2019-09-12 14:23:49 -04:00
Robin Krom
41aa03c711
language: fix: missing template instances in package (#2884)
The package compiled via daml migrate was missing the actual
Upgrade/Rollback templates. This is because we used `type` instead of
`template instance` to define those templates. Also, apparently we need
to export UpgradeInstance/RollbackInstance from DA.Upgrade in the
standard library.
2019-09-11 16:05:46 +02:00
Moritz Kiefer
a58cf857d4 Release 0.13.23 (#2875)
Given how many people want the HTTP JSON API, let’s make a release
that contains the integration with the assistant.
2019-09-11 08:55:25 +00:00
Brian Healey
7131b65d8a Add QLDB to deploy docs (#2874) 2019-09-11 07:20:09 +02:00
Gary Verhaegen
5234236639
add build-options to daml.yaml (#2772) 2019-09-10 18:16:33 +02:00
Bernhard Elsner
2ae3331ba4 Roadmap update (#2866)
* Roadmap update

* Better links
2019-09-10 16:06:31 +00:00
Robin Krom
07d1930fdc
language: update of migrate docu (#2863)
The number of arguments to the migrate command changed since we don't
need a project main file anymore.
2019-09-10 16:25:15 +02:00
Martin Huschenbett
0fdf85442f
Improve UX of generic templates over Ledger API (#2779)
* Improve UX of generic templates over Ledger API

Currently, if you write
```
template Template t => Proposal t with
    receiver: Party
    asset: t
  where ...
template Iou with ...
template instance ProposalIou = Proposal Iou
```
you'll get the following DAML-LF types:
```
record Proposal t = { receiver : Party, asset : t }
record Iou = ...
record ProposalIou = { unpack : Proposal Iou }
```
The definition of `ProposalIou` is not particularly user friendly when used
over the Ledger API.

This PR changes the definition of `ProposalIou` to
```
record ProposalIou = { receiver : Party, asset : Iou }
```
Basically, the definition of `Proposal` is copied and `t` is instantiated
with `Iou`. This should make a much nicer UX.

* Update documentation

* Add test

* Fix docs examples

* Fix release notes
2019-09-10 14:38:25 +02:00
Bernhard Elsner
e6646ec8e1
Docs improvements (#2763)
* Add some disclaimers about scenarios is Sandbox

* Something on errors

* Individual let bindings per line

* Update docs/source/daml/intro/5_Restrictions.rst

Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
2019-09-10 10:15:47 +02:00
Leonid Shlyapnikov
d237040822 DAML Assistant json-api logback configuration (#2797)
* filter out exception stack traces logged at debug

* Adding logback.xml for DAML Assistant release

* Fixing readme

* Fixing readme

* Use the config file in the assistant
2019-09-09 11:13:50 +02:00
Moritz Kiefer
2e29d3c0d9
Integrate the HTTP JSON API with the assistant (#2792) 2019-09-06 15:48:15 +02:00
Moritz Kiefer
1bd2a34877
Update instructions for publishing documentation (#2757) 2019-09-05 11:57:52 +02:00
Rohan Jacob-Rao
e364375ce6
Initiate release (#2745) 2019-09-04 15:39:46 -04:00
Rohan Jacob-Rao
a8100d4d3a Basic docs for generic templates (#2731)
* Fix error in generic template example

* First cut at documenting generic templates

* Change proposal to single receiver

* Address Moritz' feedback
2019-09-03 20:55:24 +00:00
Stefano Baghino
785e41eb2c
Enable multi-node conformance testing (#2735) 2019-09-03 15:57:23 +02:00
Gerolf Seitz
4dbbdaaf52
Use (submitter, command_id, application_id) for command deduplication (#2724) 2019-09-03 10:09:01 +02:00
Robin Krom
7fca591df0
replace main file with a pointer to the source root (#2687)
* language: compile everything in the source directory

This removes the need to specify a 'main'. Instead we 'source' in
daml.yaml should point to the source root directory.
2019-08-29 13:42:33 +02:00
Martin Huschenbett
c3f394e94f
Release DAML SDK 0.13.21 (#2693) 2019-08-29 10:56:44 +02:00
Robin Krom
c1e7f0ad61
language: use generic templates for upgrades (#2605)
* language: use generic templates for upgrades

Instead of generating templates we now have generic upgrade/rollback
templates in the standart library and we just create instances of in the
migration project. I will update the documentation in a follow up PR.
2019-08-26 15:30:47 +02:00
Moritz Kiefer
dda583c659 Release 0.13.20 (#2633) 2019-08-22 14:07:33 +00:00
Robin Krom
f05c0d7e9b
langauge: leave the source argument in the docu (#2602)
Let's have the correct help text in the docu until we know what we do
about MANIFEST and know whether we can drop the SOURCE argument from the
command.
2019-08-20 15:14:40 +02:00
Ognjen Maric
c71237b4c1
Identity and package management (#2532)
* Identity and package management

* Apply suggestions from code review

Co-Authored-By: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

* Bernhard's comments

* Simon's comments

* Update license

* Oh noes - I broked teh linkz!
2019-08-19 19:09:29 +02:00
Robin Krom
47238a5508
language: docu: documentation for the migrate command of damlc (#2579)
* language: docu: documentation for the migrate command of damlc

This adds a section on how to migrate between two different versions of
two packages.

* addressing martin's comments

* addressing bernhard's comments
2019-08-19 16:58:52 +02:00
Ognjen Maric
b3cf9df3c1
Ledger topologies (#2476)
* Ledger topologies: first draft

* Participant node definition

* Regroup headings

* Marcin's comments

* Second attempt after discussion with Brian H

* Change the topic order in the navigation sidebar

* Apply suggestions from code review

Co-Authored-By: Shaul Kfir <shaul-da@users.noreply.github.com>

* Shaul's/Bernhard's comments

* Clarify the interoperability statement

* Bernhard's comments
2019-08-16 10:57:23 +02:00
Robin Krom
f209950f0b
language: append the version to the output dar name by default. (#2559)
* language: append the version to the output dar name by default.

We now by default output foo-1.0.0.dar instead just foo.dar. Also the
maven coordinate default naming got removed.

* fixing integration tests and quickstart.dar occurences
2019-08-15 18:07:52 +02:00
Moritz Kiefer
3554596f9a Wait for all gRPC requests to finish before shutting down gRPC (#2551)
This fixes all flakiness in `damlc test` that I was able to
reproduce. Previously, I got it to fail in about 10% of the cases
whereas now I have successfully run tests 200 times under load without
issues.

There were two issues at play here:

1. We run scenarios in separate threads to be able to kill the running
Shake session quickly even if a scenario has an infinite loop or
something like that (there is a timeout but it’s quite long). This
could result in one of those left-over threads trying to issue a
request while we are already trying to shut down.

To fix that, we wait for the concurrency semaphore to be empty before
shutting down.

2. Just waiting for scenario executions is not quite sufficient as
`runAction` does not wait for all rules to finish (we could just use
runActionSync in `damlc test` but I’d rather make this work
properly). While we do wait for all scenario executions to finish
there is one gRPC request in offInterest that we do not wait for:
gcCtxs.

To fix this, I’ve now routed all gRPC requests through the semaphore
which means that we will also wait for these requests to finish (or
prevent them from spawning).

This makes more sense anyway as scenario executions are mostly fairly
cheap requests while things like setting up the context are expensive
so we want to limit their concurrency.

We should make the concurrency limit configurable but I’ll leave that
for a separate PR.
2019-08-15 09:39:30 +00:00
Stefano Baghino
23ba870896
Testing tips (#2505)
* Remove commented-out (and outdated) reference to the Node.js bindings

* Add tips for testing

* Update unreleased.rst

* Update docs/source/app-dev/app-arch.rst

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

* Update docs/source/app-dev/app-arch.rst

Co-Authored-By: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

* Update docs/source/app-dev/app-arch.rst

Co-Authored-By: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

* Address https://github.com/digital-asset/daml/pull/2505#discussion_r313312041

* Address https://github.com/digital-asset/daml/pull/2505#discussion_r313312708

* Address https://github.com/digital-asset/daml/pull/2505#discussion_r313338384

* Address https://github.com/digital-asset/daml/pull/2505#discussion_r313340110
2019-08-14 18:43:49 +02:00
Richard Kapolnai
4e596362fd Fix typo in intro screenshot for archived contract (#2533)
* fix title in intro screenshot

* fix title in intro screenshot for archived contract
2019-08-14 13:59:57 +02:00
Robin Krom
caa4193810
language: docs: added package import documentation (#2518)
* language: docs: added package import documentation

This adds a chapter on DAML archives and how to import them into other
projects to the documentation.

* Update docs/source/daml/reference/packages.rst

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* addressing comments

* removed random include in integration kit docu
2019-08-14 13:57:29 +02:00
Richard Kapolnai
4c04155a1a fix title in intro screenshot (#2526) 2019-08-14 12:52:05 +02:00
Moritz Kiefer
7f09d87933 Release 0.13.19 (#2525) 2019-08-14 08:53:04 +00:00
jordan-mittleman
bb69daa231 Update damlpatterns.tar.gz (#2403)
Code here doesn't match with what's explained/shown in documentation
2019-08-14 09:39:10 +02:00
Moritz Kiefer
ef635ea301
Mark tests that use Haskell gRPC bindings as flaky (#2521)
I’m hoping to investigate this soon but for now this should hopefully
result in less time spend restarting tests.
2019-08-13 20:38:51 +02:00
Gary Verhaegen
99ea93168d
update copyright notices (#2499) 2019-08-13 17:23:03 +01:00
Richard Kapolnai
b4a9ee914f Fix URL to daml code (#2513) 2019-08-13 13:31:04 +00:00
Remy
c2e2e007e7 Fix release notes about improper freeze of 1.6 (#2489)
* daml-lf: clean up a bit how verion are handle

* fix releases not about imporper release of #1866

* address Gerolf's comments
2019-08-13 08:10:24 +00:00
Moritz Kiefer
0c7cb171b7 Release 0.13.18 (#2447) 2019-08-07 17:13:13 +00:00
associahedron
476181e9b8 Deliver additional detail in daml deploy documentation. (#2439)
* More detail about upload-dar and allocate-parties.

* Put the two steps in the right order.
2019-08-07 11:14:46 +00:00
Moritz Kiefer
8b171e50fb Release SDK 0.13.17 (#2437) 2019-08-07 10:40:41 +00:00
associahedron
8916edef18
Adding some docs for daml deploy and daml ledger. (#2438)
* Some docs for daml deploy and daml ledger.

* Adding none in code blocks.

* Substitute*
2019-08-07 10:45:00 +01:00
Gary Verhaegen
f4fd715b44
docs typo (#2412) 2019-08-06 12:31:31 +01:00
jordan-mittleman
e056fc3e88 Update templates.rst (#2397)
It doesn't suffice for a maintainer to just be an observer
2019-08-05 16:55:01 +02:00
Remy
2d1d5fc5af daml-lf: update release notes with archive protobuf change (#2334) 2019-08-02 19:40:37 +00:00
Gary Verhaegen
6e4280fe75
correct 0.13.16 date (#2376) 2019-08-02 18:30:42 +01:00
Gary Verhaegen
ab654b621a release 0.13.16 (#2353) 2019-08-01 17:08:38 +00:00
Leonid Shlyapnikov
b940951a76
HTTP JSON API first version (#1994)
* Cleanup

* WIP

* first integration test + fixture

* minor cleanup

* Implementing ContractService.lookup

* Reverting back to endpoints.all (all2 did not work)

* Cleanup

* replace ApiValue ADT with aliases to daml-lf/transaction Value ADT

* porting rest of navigator to LF Value ADT

* Command Service WIP

* CommandService WIP

* porting more of navigator to LF Value ADT

* last error, not first

* rename ApiValueImplicits file

* special conversion features for ImmArray and FrontStack

- just .to[ImmArray] or .to[FrontStack] any random collection

* finish porting most of navigator main code

* use numeric indices for record field name fallback when pretty-printing

* tuples are not serializable

* use numeric indices for label fallback in JSON verbose encoding

* make traverseEitherStrictly more likely to preserve the seq's class

* to shortcut for ImmArraySeq .to[ImmArraySeq]

* compiling, passing navigator backend tests

* test traverseEitherStrictly more, er, strictly

* pass scalacopts through to scaladoc

* deal with unused warning

* remove unneeded function

* simpler error reporting, more private functions in ApiCodecCompressed

* move slowApply to FrontStack, test it so it actually works

* remove unneeded toStrings; better error from impossible ValueTuple case

* scalafmt FrontStackSpec

* support alternative, label-free record JSON encoding

* Adding domain.CreateCommand + corresponding json formats and dummy json format for lav1.value.Record

* CommandService.create should be done... need to test it

* TODO added

* Cleanup

* move ApiCodecCompressed, ApiValueImplicits, and some aliases to new lf-value-json package

* Using tagged TemplateId type instead of Identifier + exercise command WIP

* adapt navigator to moved pieces

* start defining scalacheck extension to ApiCodecCompressedSpec

* CommandService.exercise + introducing CommandMeta

* Adding command endpoints, can't test them yet, need lf value json formats

* fuse some list operations

- suggested by @stefanobaghino-da; thanks

* blue error message

* Minor fixes after merging librify-navigator-json-compressed, #2136

* experiment with an inductive case in TypedValueGenerators

* finish a List case for TypedValueGenerators; it's revealing

* Introducing API value to LF value converter,

CommandsValidator takes IdentifierResolverLike instead of IdentifierResolver

* cleanup

* remove accidentally readded duplicate aliases

* start tying knots in TypedValueGenerators

* verbatim copy ApiCodecCompressedSpec to lf-value-json

* shift some tests from navigator to lf-value-json

* test Optional and Map for ApiCodecCompressed

* heavier random testing of ApiCodecCompressed

* remove unused dependencies from lf-value-json

* adding value json writer

* cleanup

* Revert "cleanup"

This reverts commit 2e4d153f

* fixing the build

* cleanup

* cleaning up imports

* JsValue to API value is done, needs a test

* cleanup

* use scalac -Ypartial-unification in http-json

* simplify some Traverse instances

* factor CreateCommand and ExerciseCommand traverse instances

* Command create integration test WIP

* Command create integration test WIP, got rid of the JsonReader and JsonWriter for the values, converting values explicitly

* Extracting DomainJsonDecoder and DomainJsonEncoder

* LfV refactoring

* Create command serialize/deserialize test works

* cleanup

* resolving conflicts

* More json encode/decode tests

* logging

* command/create passes integration test now

* Adding readme

* grammar

* TODO added

* GetActiveContractsResponse encoding

* ideintifier conversion renaming

* PackageService resolveTemplateId returns domain.TemplateId now

* Resolving LF Identifier instead of Template ID, this should also work for Exercise command decoding

* cleaning up a bit

* daml-lf: show type in TypedValueGenerators-driven errors

* exercise command json encoding/decoding works

* command/exercise IOU_Transfer integration test passes now

* avoid filter for Gens; makes many contract ID gens not fail

* test ApiCodecCompressed against 100 random types, 20 random values each

* Updating README instructions

* improving error handling, failed futures, get logged and reported to the user now as 500

* [ROUTING DSL] Removing routing DSL, it did not work

* getting rid of HttpEntity.Strict match + cleanup

* fixing the merge conflict

* updating README

* use Show.shows instead of new Show

* List(_) isn't checked, but Seq(_) is slightly safer

* improving test assertions

* Adding /contracts/lookup implementation

* http-json: use ImmArraySeq instead of List; use toRightDisjuction

* http-json: .toList.toSet is shorter than fold

* http-json: replace .leftMap.map with .bimap

* http-json: use subst instead of reimplementing JsonFormat

* http-json: remove unused ExceptionHandler

* http-json: safer == comparison

* Adding two test cases for expected errors

* Adding BazelRunfiles.rlocation magic that supposed to handle windows path for bazel dependencies

* http-json: import, not extend
2019-07-29 16:49:57 -04:00
Moritz Kiefer
58bd210bcb Fix typo in quickstart docs (#2310) 2019-07-29 07:27:53 +00:00
Darko Pilav
1a84c007e5
Minor Docs fixes (#2277)
* Fix typo in README.md and stale link in CONTRIBUTING.md

* Fix minor typos in quickstart

* Fix various minor typos/mistakes in DAML Intro

* Make DAML code in quickstart-java example cleaner

Also update module hash as well as screenshots in docs
2019-07-25 16:02:42 +02:00
Robert Autenrieth
59e581ef3f
Release SDK 0.13.15 (#2286) 2019-07-25 14:52:19 +02:00
Gerolf Seitz
847a6d45ce Use the build-helper-maven-plugin to add generated sources (#2266)
The sourceRoot tag of the maven exec plugin isn't supported by the maven
integration in VS Code (which really is the eclipse stack).

Using the much more verbose build-helper-maven-plugin to make the
generated sources folder known to maven now makes the project properly
loadable by VS Code.

Fixes #887.
2019-07-24 07:23:03 +00:00