Commit Graph

5280 Commits

Author SHA1 Message Date
Remy
f67af49044
LF: typos in contract ID spec. (#7364)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-10 10:58:27 +02:00
azure-pipelines[bot]
1d94951c4e
update compat versions for 1.6.0-snapshot.20200908.5166.0.1623baec (#7353)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-10 09:18:14 +02:00
Moritz Kiefer
5bee5a08df
Document ApplicativeDo restrictions (#7359)
fixes #7343

changelog_begin
changelog_end
2020-09-09 17:56:33 +02:00
Martin Huschenbett
cf3d5ad819
Contract ID spec: Fix typos (#7363)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 15:38:36 +00:00
Martin Huschenbett
a239edb0eb
damlc: Don't use uniques for type vars during conversion to LF (#7361)
We had some issues with shadowing of type variables in our DAML-LF type
checkers because of some bugs in our implementations of substitution. As
a workaround for these issues, we suffixed each type variable with its
GHC unique during conversion to DAML-LF. Unfortunately, this leads to
new problems when using parametrized variant types and record
projections in combination with data-dependencies.

This PR, drops the unique suffix when converting to DAML-LF. This
change is possible since we fixed the bugs in the substitutions a while
ago. Fortunately, this also fixes the aforementioned problem regarding
data-dependencies.

This fixes #7284.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 13:40:28 +00:00
Remy
56fd866180
LF: minor cleanup in SortedLookupList (#7345)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 14:57:07 +02:00
Sofia Faro
220cfc5c79
Disable multipackage LSP tests on Windows. (#7360)
* Disable multi-package lsp-tests on windows.

These are consistently timing out on Windows for unknown reasons.
Disabling until we figure out how to fix the tests. See #4904

changelog_begin
changelog_end

* fix definition
2020-09-09 12:50:30 +00:00
azure-pipelines[bot]
7c9704f1ce
rotate release duty after 1.5.0-snapshot.20200908.5166.0.1623baec (#7349)
@cocreature is taking care of 1.5.0-snapshot.20200908.5166.0.1623baec (#7348), so they get pushed back to the end of the line.

Please do not merge this before #7348.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-09 13:38:28 +02:00
Moritz Kiefer
8d66817f1d
Remove redundant --force from npm invocations (#7358)
NPM doesn’t actually need this (at least it didn’t for me locally and
hopefully CI agrees) to pick up changes and it emits a very
scary-looking warning if you do pass it.

changelog_begin
changelog_end
2020-09-09 13:28:24 +02:00
Martin Huschenbett
2236a949b6
Docs: Minor improvements to ledger structure (#7357)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 13:15:25 +02:00
Remy
0c1d11d5ac
Speedy: dop useless Hasher for value (#7346)
This is a left over of #4893, where we changeed underlying of
SGenMap from InsertOrdMap to TreeMap.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 12:30:48 +02:00
Remy
73121fef0b
LF: minor typo in spec (#7352)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 11:39:32 +02:00
Moritz Kiefer
719ca468bd
Release new snapshot (#7350)
With the last one being the RC for 1.5.0, this is now a 1.6.0
snapshot.

changelog_begin
changelog_end
2020-09-09 08:47:48 +00:00
Remy
95f17d5239
Speedy: share implementation of GenMap and TextMap. (#7334)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-09 09:12:02 +02:00
Gary Verhaegen
1623baec4d
add multi-{key,query} stream to daml-ledger (#7066)
This is an attempt to address #7034 & #7036. Strictly speaking, this
does not match their acceptance criteria, as this only supports multiple
queries, not mixed templates.

Because the two new functions can cover the exact same use cases (and
more) as the existing `streamQuery` and `streamFetchByKey`, the latter
are deprecated. The deprecation cycle I suggest is to deprecate them
immediately by annotating them as such in the documentation (done on
this PR).

That's it. I do not think we ever need to actually remove them, nor to
make them print annoying warnings or anything. There is nothing wrong
with the functions as they stand, they just don't fit in the API
anymore.

We could, at some point, move them to a separate documentation page, or
to the boottm of the existing one, but I feel even removing them from
the documentation is unnecessary.

CHANGELOG_BEGIN

- [JavaScript Client Libraries] Two new methods have been added to
  `daml-ledger`: `streamQueries` and `streamFetchByKeys`. They are
  similar to the existing singular versions, except they can take
  multiple queries and multiple keys, respectively, and return a union
  of what the corresponding individual queries/keys would have. Because
  these new functions can do everything the existing ones can, we are
  deprecating the latter, though there is no plan to remove them.

  Upgrade path is straightforward:

  ```
  streamQuery(t); => streamQueries(t, []);
  streamQuery(t, undefined); => streamQueries(t, []);
  streamQuery(t, q); => streamQueries(t, [q]);
  streamFetchByKey(t, k); => streamFetchByKey(t, [k]);
  ```

  There is one caveat, though: `streamFetchByKeys` is a little bit less
  lenient in the format in which it expects the key. If your existing
  code was conforming to the generated TypeScript code we provide,
  everything should keep working, but if you were using plain JS or
  bypassing the TS type system, it is possible that you used to
  construct keys that will no longer be accepted. The new function
  requires all keys to be given in the _output_ format of the JSON API,
  which is a little bit more strict than the general JSON <-> LF
  conversion rules.

CHANGELOG_END
2020-09-08 19:17:49 +02:00
anthonylusardi-da
86c637b43d
Add links to get forum badges at the end of the GSG sections (#7327)
* Add links to get forum badges at the end of the GSG sections

* CHANGELOG_BEGIN
CHANGELOG_END
2020-09-08 12:47:55 -04:00
Remy
b385f9b7d4
Speedy: cleanup test for builtins (#7326)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-08 16:14:37 +02:00
Remy
598f8d585d
LF: shortcup failure in TypeOrdering (#7204)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-08 16:14:12 +02:00
Remy
f0372979be
Speedy: shortcup failure in SValue ordering. (#7329)
* LF: shortcup failure in SValue ordering.

Before this PR comparison of lists, maps, ans structural record had a
always linear complexity.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-08 16:13:40 +02:00
Moritz Kiefer
d086738ac0
Migrate DAML Intro to DAML Script (#7264)
changelog_begin
changelog_end
2020-09-08 14:28:30 +02:00
Moritz Kiefer
fea21e33a6
Migrate leftover scenario in quickstart to DAML Script (#7338)
We already migrated everything in the Tests directory but forgot about
this one.

changelog_begin
changelog_end
2020-09-08 13:15:45 +02:00
azure-pipelines[bot]
8b942687f8
update compat versions for 1.5.0-snapshot.20200907.5151.0.eb68e680 (#7337)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-08 12:56:35 +02:00
Robin Krom
678a8eef71
Replace yarn with npm (#7222)
* replace yarn with npm in docs

CHANGELOG_BEGIN
CHANGELOG_END

* updating assistant and compatibility tests

* moved gitignore entry to toplevel
2020-09-08 12:07:04 +02:00
Robin Krom
b86d213ecb
moved robin down in release rotation because of holidays. (#7339)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-08 09:06:26 +00:00
Gerolf Seitz
86608c2d98
Update CODEOWNERS (#7336)
reflect recent org changes

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-07 15:50:40 +00:00
Moritz Kiefer
82c4971d91
Release a new snapshot (#7335)
Includes a bugfix for data-dependencies which we want in 1.5.0.

changelog_begin
changelog_end
2020-09-07 16:56:34 +02:00
Remy
8aa34c701c
Speedy: use standard scala equality to check SBuiltinTests result. (#7333)
This reverts changed made in #3416, where the standard scala was
replace by ad-hoc Speedy equality for SValue. As Speedy equality
become more permisive (e.g. it does not check for type constructor of
records, variants, and enumrations or constructor of variants or
enumerations) this is safer to use standard scala eqality for case
class.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-07 16:33:01 +02:00
Robin Krom
3728106958
create-daml-app: make sure errors are displayed (#7332)
When an error happend during decoding of JSON API answers due to missing
templates, the error was just displayed as an empty object '{}'.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-07 16:21:03 +02:00
Samir Talwar
74e7086662
ledger-api-test-tool: Only create sessions once. (#7328)
* ledger-api-test-tool: Wait for futures when constructing LedgerSession.

* ledger-api-test-tool: Wait for futures on `new ParticipantSession`.

* ledger-api-test-tool: If we create two sessions, close one immediately.

* ledger-api-test-tool: Only create sessions once.

CHANGELOG_BEGIN
- [Ledger API Test Tool] Fix a race condition in which multiple
  connections were created to a single participant, and only one was
  shut down properly. This error was likely benign but may cause
  spurious errors to show up when the test tool finishes and shuts down.
CHANGELOG_END

* ledger-api-test-tool: Let ParticipantSessionManager manage connections.

* ledger-api-test-tool: Shrink the configuration surface area.

* ledger-api-test-tool: Use `Future.traverse` to simplify LedgerSession.

* ledger-api-test-tool: Fix the ParticipantSessionManager logger.

* ledger-api-test-tool: Address issues flagged by @stefanobaghino-da.

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

* ledger-api-test-tool: Make `SessionParts` a real class.

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-09-07 14:15:52 +00:00
Samir Talwar
eb68e680f6
kvutils: Change the export header from "v3" to "v2". (#7330)
The old v2 is no more. Let's pretend it never happened.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-07 13:52:09 +00:00
Martin Huschenbett
d7f0bc1c7b
DAML-LF spec: Fix two minor issues around structs (#7323)
* DAML-LF spec: Fix two minor issues around structs

We make it explicit that all field names in a structural record need to
be distince. We also fix a small typo in the indices for the
`ExpStructCon` typing rule.

CHANGELOG_BEGIN
CHANGELOG_END

* Address comments regarding distinctness

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-07 15:13:13 +02:00
Remy
8968889a31
LF: drop buggy/useless check in SBCheckPrecond (#7331)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-07 12:31:27 +02:00
Brian Healey
e2bff87a0c
Provide configurable clock interval to cater for ledger differences with deduplication tests (#7294)
* Extend wait time for dedupe tests to 2x dedupe window

* default clock tick interval of 10s, make it optionally configurable

CHANGELOG_BEGIN
[ledger-api-test-tool] Include new attribute for configurable clock tick
interval
CHANGELOG_END

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

* address review comments

* Address code review - use Duration

* Add documentation on --ledger-clock-granularity option

* Update documentation

* address review comments

* address warning: implicit numeric widening

* scalafmt

* ProtobufDuration alias rather than ProtoDuration for consistency with namespacing

* underline in docs
2020-09-04 17:19:07 -04:00
Remy
fbeae8ae5e
LF: Use the new Struct data structure for SStruct (#7319)
This PR uses the new data structure introduced in #7220.

Additionally this fixes `svalue.Equality` and
`svalue.Ordering` which were considering <a: x, b: y>
different from <b:y, a:x>.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-04 22:04:07 +02:00
Remy
78e770bf72
LF: Use the new Struct data structure for ValueStruct (#7241)
This PR uses the new data structure introduced in #7220.
Additionnally this fix `Value Equal instance` which was considering
<a: x, b: y> different from <b:y, a:x>.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-04 18:32:39 +02:00
Remy
ee309d1e35
LF: extend tests for comparison builtins (#7314)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-04 17:13:29 +02:00
Gary Verhaegen
dd37d98458
fix grpcurl (#7324)
It looks like the structure of the nix package has changed when we
updated nixpkgs in #6761, so we need to update the dev-env script to
match.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-04 16:38:49 +02:00
Oliver Seeliger
f2a35ee922
Canton conformance test debug logging and reduced test parallelism (#7322)
* Canton conformance test debug logging and reduced test parallelism

To reign in flakiness of a handful of TransactionServiceIT tests
that had run into timeouts during synchronize

Closes #7316

changelog_begin
changelog_end

* Review feedback from Stefano
2020-09-04 14:25:30 +02:00
Moritz Kiefer
3171bb588a
Migrate trigger assertion library to DAML Script (#7318)
This is clearly a breaking change but triggers are still alpha so we
can get away this (confirmed with Bernhard).

changelog_begin

- [DAML Trigger] Daml.Trigger.Assert now uses DAML Script instead of scenarios.

changelog_end
2020-09-04 13:48:50 +02:00
Remy
724466f77c
Speedy compile: cleanup (#7321)
This PR perform the following changes:
 - reduce function size by spliting them out,
 - rename "translate" function prefix to "compile",
 - replace 'private' by 'private[this]',
 - add 'inline' annotation to function used only once.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-04 11:38:39 +02:00
Moritz Kiefer
0903b1a6be
Filter implicit parameter instances from data-dependencies (#7320)
* Filter implicit parameter instances from data-dependencies

Occasionally GHC likes to float implicit parameters to the top-level
making them look like any other typeclass instances. Implicit
parameters are by design not unique so if we try to reconstruct them
we get an error about a duplicate instance.

I haven’t figured out when exactly GHC floats things to the top-level
but I did verify that this testcase breaks without the fix.

changelog_begin
changelog_end

* Assert that there are 2 implicit instances

changelog_begin
changelog_end
2020-09-04 07:36:37 +00:00
Stephen Compall
0b72b6f716
more trigger service logs; tagged LoggingContext (#7205)
* get a LoggingContext into the TriggerRunnerImpl

* make some implicits more implicitly scoped and explicitly ascribed

* make some private/final markings

* most of JsonFormat[Identifier] is in companion

* experimental LoggingContext with phantom type

* ActorContext#log isn't really doing that much

* more details of LoggingContextOf

* make LoggingContextOf compile

* add trigger message logging, yet without context

* fix parent compile errors

* use Config as the phantom for its own logging extensions

* LocalDateTimeFormat cleanup

* switch TriggerRunner to contextual logging

* add trigger definition ID to logs

* log trigger-submitted commands, fix trigger test compile

* log trigger stopping and DAR uploads

* add context to PostStop/PreRestart logs

* add changelog

CHANGELOG_BEGIN
- [Triggers] More detailed logging of trigger actions and trigger service actions.
  See `issue #7205 <https://github.com/digital-asset/daml/pull/7205>`_.
CHANGELOG_END

* missed copyright header

* switch to Unit, scala/bug#9240 fixed
2020-09-03 17:47:09 +00:00
Remy
c4e21910ab
disble flaky tests in canton-conformance-test (#7315)
* mark canton-conformance-test as flaky

CHANGELOG_BEGIN
CHANGELOG_END

* Address Moritz's review

* fix

* fix

* Disable a handful of TransactionServiceIT changes that flake

rather than making the entire canton suite as flaky

Related to #7316

changelog_begin
changelog_end

* formatting

Co-authored-by: Oliver Seeliger <oliver.seeliger@digitalasset.com>
2020-09-03 15:07:02 +00:00
Remy
d08de60d9c
LF: prevent duplicate fields in Struct (#7299)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-03 16:07:38 +02:00
Miklos
0bfb4ba1d2
kvutils: Remove deprecated methods [KVL-406] (#7313)
* Removed deprecated signature from WriteService and LedgerWriter.

* CHANGELOG_BEGIN
CHANGELOG_END

* Reverted change.

* Fixed ScalaDoc for KeyValueParticipantState.
2020-09-03 12:12:58 +00:00
azure-pipelines[bot]
deb4648a60
update compat versions for 1.5.0-snapshot.20200902.5118.0.2b3cf1b3 (#7308)
CHANGELOG_BEGIN
CHANGELOG_END

Update exclusions to include new snapshot

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-09-03 14:07:55 +02:00
Moritz Kiefer
0ff3804266
Upgrade bl to address security vulnerability (#7312)
I’ve removed dockerode which we don’t seem to use and which depends on
a bunch of outdated versions in particular bl 1.x transitively.

changelog_begin
changelog_end
2020-09-03 09:49:06 +00:00
dependabot[bot]
53981f1027
Bump bl from 4.0.2 to 4.0.3 in /navigator/frontend (#7309)
Bumps [bl](https://github.com/rvagg/bl) from 4.0.2 to 4.0.3.
- [Release notes](https://github.com/rvagg/bl/releases)
- [Commits](https://github.com/rvagg/bl/compare/v4.0.2...v4.0.3)

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Robert Autenrieth <robert.autenrieth@digitalasset.com>
2020-09-03 11:28:37 +02:00
Samir Talwar
d4b4e7fe87
ledger-api-test-tool: Actually print the cause of uncaught exceptions. (#7310)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-03 09:26:46 +00:00
azure-pipelines[bot]
de807f33b6
rotate release duty after 1.5.0-snapshot.20200901.5116.0.4460cb5e (#7297)
@rohanjr is taking care of 1.5.0-snapshot.20200901.5116.0.4460cb5e (#7296), so they get pushed back to the end of the line.

Please do not merge this before #7296.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-03 10:04:18 +02:00