Commit Graph

3494 Commits

Author SHA1 Message Date
Robin Krom
e537b496ee
Deprecate useExercise (#4972)
* language:daml-react: deprecate useExercise

We replace 'useExercise', 'useExerciseByKey' with 'useLedger' and expect
a user to call the ledger methods instead.

CHANGELOG_BEGIN
CHANGELOG_END

* addressing martin's comments
2020-03-16 14:55:59 +01:00
Robert Autenrieth
48b0b9519e
Remove expired deduplication entries (#4967)
* Periodically clear expired deduplication entries

CHANGELOG_BEGIN
CHANGELOG_END

Fixes #4959

* Increase cache maintenance frequency

The previous value was only good for testing purposes

* Actually remove deduplication entries

* Clear deduplication cache for IndexAndWriteService
2020-03-16 14:02:41 +01:00
associahedron
8911234ae3
Use new generic comparison primitives. (#5014)
This PR exposes the new generic comparison primitives, preferring them
to the older comparison primitives whenever they are available. It also
separates the generic comparison feature from the GenMap feature,
because that just makes sense.

changelog_begin
changelog_end
2020-03-16 12:10:03 +00:00
Remy
1c26f63fad
DAML-LF: GenMap Spec (#4981)
* DAML-LF: GenMap Spec

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-16 13:09:44 +01:00
dependabot[bot]
712767d0be
Bump acorn from 6.3.0 to 6.4.1 in /navigator/frontend (#5007)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.3.0...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

changelog_begin
changelog_end

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-16 12:31:47 +01:00
dependabot[bot]
45ccaf1826
Bump acorn from 6.1.1 to 6.4.1 (#5006)
Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.1 to 6.4.1.
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.1.1...6.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

changelog_begin
changelog_end

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-03-16 12:26:08 +01:00
Moritz Kiefer
76c9ddfb59
Fix typo in docs for multiparty agreement (#5011)
changelog_begin
changelog_end
2020-03-16 12:08:05 +01:00
Gary Verhaegen
eb857d6dd3
skip fmt check for release (#5012)
The formatting check used to be git-repo-dependent (see #4985), which is
preventing our candidate 0.13.55 from building.

This PR introduces a temporary hack to disable format checking on
release PRs & commits. It should be reverted once 0.13.55 is released.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-16 12:05:26 +01:00
Samir Talwar
d9971f677f
sandbox: Avoid daemon threads in AbstractSandboxFixture. (#4940)
* sandbox: Avoid daemon threads in AbstractSandboxFixture.

CHANGELOG_BEGIN
CHANGELOG_END

* sandbox: In tests, shut down the Sandbox first, not last.
2020-03-16 10:41:19 +00:00
Moritz Kiefer
44d843f9ef
Support authentication and TLS in DAML repl (#4998)
* Support authentication and TLS in DAML repl

changelog_begin

- [DAML Repl - Experimental] You can now connect to a ledger via TLS
  by passing ``--tls`` to ``daml repl``

- [DAML Repl - Experimental] You can now connect to a ledger with
  authentication by passing the token via ``--access-token-file`` to
  ``daml repl``.

changelog_end

* try to fix linking on windows

* windows is weird

* gnah
2020-03-16 10:43:57 +01:00
Moritz Kiefer
39bb4eb1f7
Set sdk version in damlc package (#4999)
While `damlc package` should really just go away, the fix here is
simple enough that it makes sense to include it.

fixes #4994

changelog_begin
changelog_end
2020-03-16 10:15:06 +01:00
Stefano Baghino
1f0534ea4f
Spin-off BuildInfo into its own (micro-)library (#5004)
* Spin-off BuildInfo into its own (micro-)library

CHANGELOG_BEGIN
CHANGELOG_END

* Fix dependencies

* Remove unused dependency
2020-03-16 09:04:00 +01:00
Shayne Fletcher
8f4404b945
Avoid explicit test for package.json exists (#5005)
changelog_begin
changelog_end
2020-03-14 18:00:37 -04:00
Robin Krom
990be40168
docs: typedoc comments for daml-types (#5000)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 22:18:54 +01:00
Shayne Fletcher
17d85afbf6
The -p flag to daml2ts is mandatory; create package.json if not there (#5001)
changelog_begin
changelog_end
2020-03-13 17:15:53 -04:00
Robin Krom
b3f20dda8d
docs: Nicer typedocs for daml-ledger (#4993)
This polishes the generated docs for daml-ledger.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 22:04:10 +01:00
Remy
c76e0bc1e0
DAML-LF add support for generic comparison in archive (#4983)
* DAML-LF: add generic comparison to archive
2020-03-13 20:13:13 +01:00
Leonid Shlyapnikov
5c2ed56c8e
Allocate party JSON API endpoint (#4991)
* Allocate party JSON API endpoint

changelog_begin

[JSON API - Experimental]
Allocate party endpoint added: ``/v1/parties/allocate``. See #4638.

changelog_end

* cleanup

* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/LedgerClientJwt.scala

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

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2020-03-13 14:06:08 -04:00
Stephen Compall
0cb3541666
optional offset argument to WebSocket streams (#4819)
* capture the pattern of an optional stream input prefix

* allow LiveBegins to be appended

- should have been included with #4593

* StreamQuery will parse JsValues instead of Strings

* shortcut in HttpServiceTestFixture; clean up InsertDeleteStepTest

* compatibly add withOptPrefix stage to WS input

* parsing the offset argument

* add offset parsing to input stream, but drop it on the floor

* another form of the two cases

* percolate the starting offset to the next step

* percolate the starting offset to the next step

* percolate the starting offset to the next step

* use transactionsFollowingBoundary in ContractsService if begin offset specified

* integration test for scan from offset in WS query

* tool for catching the first offset in a stream

* documentation

* add changelog entry

CHANGELOG_BEGIN
- [JSON API - Experimental] WebSocket endpoints now support an optional offset argument.
  See `issue #4509 <https://github.com/digital-asset/daml/issues/4509>`_.
CHANGELOG_END

* move offset argument doc to later

- suggested by @hurryabit; thanks

* remove stray TODO

- pointed out by @leo-da; thanks

* redesign withOptPrefix to make the usage a little easier to follow

- suggested by @leo-da; thanks
2020-03-13 12:52:17 -04:00
Gary Verhaegen
364262a7f6
saner scalafmt target (#4985)
The current behaviour of our scalafmt checks compares for changes with
origin/master, which means it is dependent on the state of the local git
repository. This makes it non-reproducible.

Added to the fact that the master branch is not currently green as per
our scalafmt rules, this makes it impossible to rebuild older commits,
which in turn could interfere with our release process.

This PR does two things:

1. Fix our codebase to agree with our formatting rules.
2. Add a flag to `fmt.sh` to enable scalafmt's diff behaviour, and
   change the default to a full scan.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 17:37:13 +01:00
Shayne Fletcher
0db2273a53
Make it so you can run in a known location (#4989)
changelog_begin
changelog_end
2020-03-13 12:12:22 -04:00
Stefano Baghino
e66500173d
Add data access objects for the new transaction schema (#4988)
This PR only covers the write path, the read path will be addressed in a follow-up.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 17:04:12 +01:00
Andreas Herrmann
559c78003e
Update rules_haskell (#4751)
* Update rules_haskell

The workaround for linking against `Cffi` in the REPL has been
upstreamed in a more generalized form.

CHANGELOG_BEGIN
CHANGELOG_END

* ghcide: Use rules_haskell's hie-bios support

* Document `ghcide` Bazel integration

* Rename files to match module names

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-03-13 16:49:34 +01:00
Nemanja
05403da7d3
GSG info on restarting the ledger and making changes (#4968)
* GSG info on restarting the ledger and making changes

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/getting-started/first-feature.rst

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

* Update docs/source/getting-started/first-feature.rst

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

* Changed the explanation for why we need to run './daml-start.sh' again

* Update docs/source/getting-started/first-feature.rst

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

* Update docs/source/getting-started/first-feature.rst

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

* Update docs/source/getting-started/first-feature.rst

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

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:48:01 +01:00
Nemanja
ce54e1392d
Explaining the DAML code in GSG (#4987)
* Explaning the DAML code in GSG

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/getting-started/app-architecture.rst

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

* Update docs/source/getting-started/app-architecture.rst

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

* Update docs/source/getting-started/app-architecture.rst

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

* Update docs/source/getting-started/app-architecture.rst

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

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:47:47 +01:00
Nemanja
90033b05c4
Linking TS API documentation in the GSG (#4961)
* Linking TS API documentation in the GSG

* Changelog entry

CHANGELOG_BEGIN
CHANGELOG_END

* Changed the links to point to our own docs
2020-03-13 16:47:33 +01:00
Nemanja
17f6ec0839
Yarn information for the GSG docs (#4920)
* Solves #4841

* Added info for successfull daml-start.sh script run

* fix syntax

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:47:12 +01:00
Nemanja
ff926d0a0f
TypeScript lexer for TS syntax highlighting (#4900)
* Resolves #4304

Added highlighting to the application architecture section

Highlighter that works

The latest highlighter

* Added the lexer to pdf and html and restructured how conf.py is called within the theme

* Added copyright headers

* add typescript.py to srcs

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-13 16:46:23 +01:00
Moritz Kiefer
a15bfd80f3
Fix lf versions in the tests for buliding against newer LF versions (#4933)
This makes sure that they won’t break once we switch defaults. For
consistency they are specified via `build-options` everywhere.

changelog_begin
changelog_end
2020-03-13 16:27:54 +01:00
Moritz Kiefer
4e99f18613
Introduce a DA.Test.Sandbox module for managing sandbox in tasty (#4986)
We previously had 3 slightly different but consistently shitty logic
for handling this in the tests for daml-helper daml repl and the
Haskell ledger bindings. This PR introduces a module that is flexible
enough to capture all their needs and hopefully is somewhat less
shitty.

changelog_begin
changelog_end
2020-03-13 15:35:03 +01:00
Shayne Fletcher
33e384869a
Change code generation scheme for DAML enums (#4975)
changelog_begin
changelog_end
2020-03-13 09:30:52 -04:00
Bernhard Elsner
757e0e841b
Remove references to DA Ledgers, DA Platform and similar from docs (#4690)
* Remove references to DA Ledgers, DA Platform and similar from docs

* Some additional amendments

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 13:02:11 +01:00
Moritz Kiefer
b3a5c3b28d
Share test certificates (#4982)
* Share test certificates

This is primarily an attempt at making sure my contribution stats
remain negative but I think it’s a nice cleanup. The only difference
in the certs used by daml-helper which are now used everywhere is that
they use a different CN for the CA and the server. This is required to
make openssl happy (which is used by the daml-helper).

changelog_begin
changelog_end

* Fix script and trigger tests
2020-03-13 12:12:34 +01:00
Remy
277883e4d5
DAML-LF: base GenMap on SortedMap (#4893)
Change underlying implementation of GenMap from insertion order Map to sorted Map

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 11:10:38 +01:00
Richard Kapolnai
d198f74d61
Fix ledgerId cli help message by removing note about persistent stores. (#4980)
* Fix ledgerId cli help message by removing note about persistent stores.

* format change
CHANGELOG_BEGIN
CHANGELOG_END

* Revert "format change"

This reverts commit 02e234df29.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-13 09:26:44 +00:00
Moritz Kiefer
96f62418c5
Support TLS in DAML script and DAML triggers (#4971)
This adds CLI parametrs for connecting via TLS following the scheme
used by navigator, extractor and `daml ledger`.

changelog_begin

- [DAML Script] Support TLS. Enable it by passing ``--tls``. You can
  set certificates for client authentication via ``--pem`` and
  ``-crt`` and a custom root CA for validating the server certificate
  via ``--cacrt``.

- [DAML Triggers - Experimental] Support TLS. Enable it by passing ``--tls``. You can
  set certificates for client authentication via ``--pem`` and
  ``-crt`` and a custom root CA for validating the server certificate
  via ``--cacrt``.

changelog_end
2020-03-13 09:54:44 +01:00
Leonid Shlyapnikov
bc7d76c9d7
Mark JSON API tests flaky, failing on Windows consistently (#4978)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 21:32:46 +00:00
Remy
65e988b778
[DAML-LF] specification for generic comparison. (#4942)
* [DAML-LF] specification for generic comparison.

+ update generic equality

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 22:07:13 +01:00
Remy
198973f23b
DAML-LF: introduce HexString to represents base16 array encoding (#4952)
* DAML-LF: introduce the string type HexString that represents base16 array encoding

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 22:04:36 +01:00
Robin Krom
b748f88fa2
language: docs: use typedoc comments for daml-react (#4977)
Using the correct typedoc comment form gives nice generated
documentation.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 21:54:33 +01:00
Gary Verhaegen
fd185ed22e
publish prerelease documentation (#4976)
This PR changes the documentation release process to publish the
documentation for releases tagged "prerelease" on GitHub, while
discarding them when deciding on the latest version (the one that shows
on `/` on the docs site) and omitting them from the `versions.json` file
(meaning they do not appear on the dropdown).

This PR also makes a bit of cleanup/bug fixing:
- The change in `nix` toolset name (#4724) needs to be protected by a
  version check, as we checkout older versions of the repo during docs
  build.
- The data types BlogSubmit and BlogId seem to have survived the "dead
  code detection" in #4956.
- The documentation build step had not been updated to pass down the
  correct version string (#4513).

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 18:54:47 +00:00
Robin Krom
f6936a6d6e
docs: fix: include html assets for generated docs (#4974)
The tar command in the bazel rule would not dereference links in the
documentation folder which let to missing assets. This is fixed with the
additional command line flag `-h` to tar.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 19:37:17 +01:00
Stefano Baghino
cc2e97ee51
Add functions to compute disclosure for different stream types (#4970)
* Add functions to compute disclosure for different stream types

CHANGELOG_BEGIN
CHANGELOG_END

* Address https://github.com/digital-asset/daml/pull/4970#pullrequestreview-373708955

* Optimize imports
2020-03-12 18:44:10 +01:00
Leonid Shlyapnikov
f69100a4d4
Fixing blinking tests, multiple heartbeats are expected, change heartbeat format, live marker is gone (#4969)
* Fixing tests, multiple heartbeats are expected, change heartbeat format

changelog_begin
changelog_end

* scalafmt
2020-03-12 12:49:15 -04:00
Moritz Kiefer
fdeac8d69c
Make extractor and navigator work without client auth (#4966)
This PR fixes the tls configuration to work if client auth is not
enabled and adds a `--tls` flag to extractor and navigator which
allows you to enable tls without overriding any certificates.

There is a test for extractor but none for navigator since there are
no tls tests at all afaict atm. I did however test it manually.

changelog_begin

- [Navigator] Navigator can now run a TLS enabled ledger without
  client authentication. You can enable TLS without any special
  certificates by passing ``--tls``.

- [Extractor] Extractor can now run a TLS enabled ledger without
  client authentication. You can enable TLS without any special
  certificates by passing ``--tls``.

changelog_end
2020-03-12 17:33:30 +01:00
Moritz Kiefer
edd73384c4
Make client authentication in Sandbox configurable (#4965)
Currently sandbox only supports TLS if you also enable client
authentication. There is no reason for why this has to be the case and
for things like DABL we want TLS without client authentication so it’s
useful to be able to test this in sandbox. This PR introduces a
`--client-auth` flag that allows you to configure the behavior. The
default is the current one of requiring client authentication.

This PR does not yet update Java clients, however, the Haskell client
supports this already and is used to test this functionality.

I’ve also added a section in the documentation on TLS (there were no
docs at all so far).

changelog_begin

- [DAML Sandbox] When Sandbox is run with TLS enabled, you can now
  configure the requirement for client authentication via
  ``--client-auth``. See
  https://docs.daml.com/tools/sandbox.html#running-with-tls for more information.

changelog_end
2020-03-12 16:04:46 +01:00
Stefano Baghino
1bf1a8e8e9
Add diff function between Relations (#4962)
CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 14:41:22 +01:00
Jussi Mäki
583c0a7749
Run most tests for ledger-dump (#4910)
We exclude the tests that create lots of data.
CommandDeduplicationIT is disabled as kvutils does not yet
have time-based deduplication.

CHANGELOG_BEGIN
CHANGELOG_END
2020-03-12 14:10:22 +01:00
associahedron
5b1698e553
Update packaging docs. (#4936)
* Update packaging docs.

changelog_begin
changelog_end

* Fix the code blocks

* Fix another code block

* Move comment so ordered list doesnt break.

* fix code blocks again???

* Apply suggestions from code review

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

* Make name collision section

* Incorporate feedback

* Small edit

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-03-12 12:33:53 +00:00
Moritz Kiefer
e0d652df91
Generate ssl certs in a genrule instead of checking them in (#4950)
changelog_begin
changelog_end

For now this is only used for the daml-helper tests. I’ll shuffle
things around and use it for all tests in a separate PR.
2020-03-12 10:36:40 +01:00