Commit Graph

6962 Commits

Author SHA1 Message Date
Remy
fcbba1cd95
LF: rename convertion builtins to be more obvious (#9716)
The name of some builtins will be exposed as part of the Exception
message. This PR, try to make conversion builtins more consistent and
more obvious, before we could not rename those.

This is part of #8020

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-19 10:11:26 +00:00
Sofia Faro
b55613be6c
Parallelize the data-dependencies test. (#9733)
* Parallelize the data-dependencies test.

It runs about twice as fast on my laptop (240s -> 120s) when allowed to
run tests in parallel. I'm not sure this will work or make a huge
difference when it comes to timeouts in CI, but it's worth a shot.

changelog_begin
changelog_end

* TASTY_NUM_THREADS := 3

* set bazel tag for test
2021-05-19 10:03:00 +00:00
Sofia Faro
3209188fcc
Add a ledger model page for exceptions. (#9396)
* Add a ledger model page for exceptions.

This page describes the changes to the ledger model as part of the exceptions feature. The changes should be kept separate for now, but once exceptions are stable and out for a while, they should probably be incorporated into the rest of the daml ledger model.

Part of #8020. **This PR is to be merged only when we start releasing exceptions.**

changelog_begin

- [docs] The Daml ledger model has been updated to describe the changes introduced by the new exceptions feature. See  here: https://docs.daml.com/concepts/ledger-model/ledger-exceptions.html

changelog_end

* Apply suggestions from code review

Co-authored-by: Ognjen Maric <ognjen.maric@digitalasset.com>

* Round 2

* Fix and simplify "after" relation!

* Easy fixes

* Diagrams for structure and integrity sections.

* Add missing diagrams :)

* clarify consistency section

* Authorization.

* Editing.

* fix label reference

Co-authored-by: Ognjen Maric <ognjen.maric@digitalasset.com>
2021-05-19 09:43:18 +00:00
Moritz Kiefer
6245e3456c
Drop damlc integration test todo (#9735)
I have no idea what this is supposed to mean. I suspect it’s leftover
from Daml < 1.1 or something like that.

changelog_begin
changelog_end
2021-05-19 11:26:46 +02:00
Kamil Bożek
ae523c7e2f
ledger-api-bench-tool - support for multiple streams [DPP-372] (#9691)
* Added resource management and the LedgerIdentityService

* Added the TransactionService

* Added stream configuration options

* Options for ledger configuration

* Minor improvements

* Refactored packages

* CHANGELOG_BEGIN
- [Integration Kit] - Created the ledger-api-bench-tool prototype for benchmarking ledger transaction streaming capabilities
CHANGELOG_END

* Handler for stream completion

* Transaction stream observer with count metrics

* Generic CountingStreamObserver

* Size metrics

* Rounding results

* Simplified observers hierarchy

* Reporting period program argument

* Metric[T] trait

* Named streams

* Renamed reporting-period parameter to log-interval

* Template filters

* Configurable ledger offset parameter

* Delay metric

* Improved metrics naming

* Consumption speed metric

CHANGELOG_BEGIN
- [Integration Kit] - added metrics to the ledger-api-bench-tool
CHANGELOG_END

* Minor fix

* Fixed stream type parameter name

* Multi-stream support

* Pretty print config

* Fixed rounding of metric values

* Pretty summary

* Minor change

* CLI parameters for concurrency settings

* Minor change

* Actor-based metrics

* Resource management for the typed ActorSystem

* Abstract MetricsManager

* Immutable metrics

* TransactionMetrics

* Cleaner TransactionService

* Factoring out stream observer from the TransactionService

* Fixed transaction trees filters

* CHANGELOG_BEGIN
- [Integration Kit] - support for multiple streams in the ledger-api-bench-tool
CHANGELOG_END

* Removed sleeping in the stream observer

* Improved README.md

* Fixed build errors in Scala 2.13

* Fix counting metric total rate

* Improved concurrency CLI parameters

* Changed the log level of stream completed notification

* Renamed stream observer
2021-05-19 10:07:34 +02:00
azure-pipelines[bot]
0f6f654515
rotate release duty after 1.14.0-snapshot.20210518.6953.0.a6c7b86a (#9738)
@SamirTalwar-DA is taking care of 1.14.0-snapshot.20210518.6953.0.a6c7b86a (#9737), so they get pushed back to the end of the line.

Please do not merge this before #9737.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-19 07:53:21 +00:00
azure-pipelines[bot]
123e1422f8
release 1.14.0-snapshot.20210518.6953.0.a6c7b86a (#9737)
This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.

@SamirTalwar-DA is in charge of this release.

Commit log:
```
a6c7b86afc LF: Drop support of TO_QUOTED_TEXT_PARTY (#9721)
9d23b4337f Split DA.Internal.Exception.Types into three packages. (#9709)
66d039eb5b Upgrade gatling to version 3.5.1 (#9714)
ac9b8adc5c TODO Cleanup: store.backend package (#9693)
679ce3b7d3 LF: Release LF 1.13 (#9705)
73c479310d update NOTICES file (#9711)
f249eec24f drop per-commit compatibility_macos (#9730)
55c36cc93e Compiler: drop BEToTextBigNumeric in favor of BEToText (#9728)
2a2c745978 Implement name collision check for type synonyms. (#9723)
c7cc1bfdfa KVL-914 Add more unit tests for tracing (#9708)
e63e0cfb77 Upgrade canton to 0.24.0 (#9722)
0a1d00d1b3 Canonicalize junit output path (#9710)
d4fca0305b LF: Change error exception for Arithmetic builtins (#9692)
1e5664054d Release: Switch Andreas and me around in the release rotation. (#9719)
e50885caa8 Dpp 388 todo cleanup parallel indexer (#9690)
fc745f2224 LF: clean shifting BigNumeric builtin (#9704)
7a97d88f42 DA.BigNumeric: Split shift, add roundToNumeric. (#9702)
b1738c7202 Switch Scala default to 2.13 (#9699)
1edb110f99 Fix simplifier safety for AnyExceptionMessage (#9707)
0ab37b3774 Use new exception builtins in stdlib. (#9703)
7d472e178d Optimistically increase Patience for fixing flakiness in MutableCacheBackedContractStoreSpec (#9697)
69f51e4b5e speedy: Compile new AnyException primitives (#9700)
3666cf2f54 KVL-914 Add unit test and fix trace context propagation from config management service (#9694)
4e63299919 Simplify kvutils contract keys validation (#9628)
010e2b1b27 Fix client_server_build/test with port file (#9701)
6d9490c0bb Never create a rollback node containing pre-exception descendants. (#9679)
b19c8f2a7c Drop sanitize, add MagicHash in data-dependencies. (#9698)
c669a00883 Release SDK 1.13.1 (#9696)
395ff58eec Damlification of Bazel files (#9670)
9b53251c74 Differentiate between negative inputs & errors in contractKeyInputs (#9683)
cd9933328a runtime: Damlification of Scala files (#9668)
fb0551bdfd Fix blackduck flag names (#9695)
4b3b9ef165 Add race condition tests for exceptions (#9688)
927242be40 KVL-914 Add and rework unit tests for tracing (#9686)
6568336588 Lift constraint tuples up to a type synonym in data-dependencies. (#9687)
80f65b4734 LF: clean compilation of SToTextXXX builtins (#9682)
ed14f97528 Move race condition utilities to test tool infrastructure (#9685)
e5646a9c73 update compat versions for 1.13.1-snapshot.20210512.6834.1.5f532380 (#9681)
6629aab009 DEL-8479 tag LF libs for SDK 1.13 release (#9680)
55abd0b7f0 Add a data-dependencies test for user-defined exceptions (#9659)
142767c421 Split daml test-script code into a separate library (#9674)
d436686173 Rerelease 1.13.1 snapshot (#9678)
5d181c6ef4 Throw on internal errors instead of setting ptx to aborted (#9654)
ac2e285ed3 Release 1.13.1 snapshot (#9675)
af7f88fca5 restore natural join and avoid table aliasing in participant contracts queries (#9671)
625592e7b5 Rename CorrelationID to InstanceUUID as it has been used wrongly. (#9672)
638547fdde rotate release duty after 1.13.0-snapshot.20210511.6892.0.ca9e89b3 (#9648)
c282a09ffb KVL-914 Expose metrics-test-lib for the oem integration kit (#9662)
cc01e933e5 Update error message in interface reader. (#9657)
2dc8b8f1de Remove version field from rollback node. (#9627)
b58d30b9e3 skip Windows tests on release (#9656)
40f69ee5af fix release PR notifications (#9658)
691915353c Fix update metrics population in parallel indexer (#9655)
931274a14e Drop version check from TransactionPreprocessor (#9651)
4620851ba2 release 1.14.0-snapshot.20210511.6892.0.ca9e89b3 (#9647)
0d09db5c48 Update date on code owners in RELEASE.md (#9652)
e61e6b22e0 Release SDK 1.13.0 (#9650)
9e6d6f7cf0 Support append-only schema in Sandbox migration tests (#9637)
fb9a196431 update NOTICES file (#9649)
58d4281743 Document web socket event handlers of TS Stream type. (#9634)
111e1d3798 Fix sandbox classic package upload (#9633)
```
Changelog:
```

- LF: make LF 1.13 stable
   Add support for BigNumeric

- Ledger API: Bump Ledger API version for LF 1.12

- [Daml Standard Library] `DA.BigNumeric.shift` has been split into
  `DA.BigNumeric.shiftLeft` and `DA.BigNumeric.shiftRight`.
  `DA.BigNumeric.roundToNumeric` is introduced, for rounding and
  converting a BigNumeric to a Numeric in a single move.

- [Daml Compiler] Fixed a data-dependencies bug where functions in a data-dependency that used a constraint tuple constraint (e.g. `Template t`) could not be directly invoked.

```

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-19 07:50:56 +00:00
Moritz Kiefer
2dbfe433b4
Fix conversion of TryContextInfo in scenario service (#9731)
There are two options here:

1. We unwind to the nearest parent exercise. This is what I
implemented.
2. We show the try context. At first it seems like this exposes more
information but really it doesn’t. You cannot locate the try so it’s
fairly meaningless.

A solution here could be to show the full context
stack instead but that’s a separate issue which I do not want to
tackle atm.

changelog_begin
changelog_end
2021-05-19 09:15:33 +02:00
azure-pipelines[bot]
e375fef8fe
update NOTICES file (#9739)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-19 06:50:06 +00:00
Remy
a6c7b86afc
LF: Drop support of TO_QUOTED_TEXT_PARTY (#9721)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 21:29:04 +02:00
Sofia Faro
9d23b4337f
Split DA.Internal.Exception.Types into three packages. (#9709)
* Split DA.Internal.Exception.Types into three packages.

I think this is a good idea because it means the user can disambiguate between these modules in daml. All three types define a `message` field, so if the programmer wants to refer to the field for one of these types specifically, it's nice to have a canonical way to disambiguate them (by module name).

Also the module names show up in the error message for uncaught exceptions. These names are a bit nicer than "DA.Internal.Exception.Types".

Decoupling these types just sounds like a good idea going forward.

changelog_begin
changelog_end

* buildifier-fix

* update isInternal

* Update tests

* Use more general pattern in CommandServiceIT

* Update DarReaderTest
2021-05-18 18:42:11 +00:00
Moritz Kiefer
66d039eb5b
Upgrade gatling to version 3.5.1 (#9714)
Ths is required to get a version of Gatling that supports Scala
2.13 (and only that because they do not cross build).

Unfortunately the upgrade is a bit more annoying than I was hoping for:

Our custom gatling utils rely on parsing the simulation log. This is
an internal file format with zero documentation or stabilityt
guarantees and as expected it has changed in incompatible ways during
the upgrade.

Rather than trying to reverse engineer and adapt to changes everytime
we upgrade, this PR switches us to a slightly more supported codepath
by parsing the `stats.json` and `assertions.json` produced by the
highcharts stuff. Afaict this is also what for example the Jenkins
integration relies on so while it’s not completely public API it seems
like the best option I could find.

There are a few pieces of information we can’t get out of those
files. Specifically:

1. maxUsers: we only ever need one users anyway so not really relevant.
2. start, duration, end: no idea why we would want those. we want per
   request metrics not the total duration.
3. geometric mean: slightly annoying, but avg & stdev should be good
enough™.
4. The scenario name: Not really an issue but if it is, we can
   disambiguate by changing request names.

changelog_begin
changelog_end
2021-05-18 16:54:37 +00:00
Marton Nagy
ac9b8adc5c
TODO Cleanup: store.backend package (#9693)
* Adds NeverEqualsOverride, makes DTOs case classes once again
* Remove unit-test (comes later), function separation (authors opinion: current level of abstraction is good enough) TODO
* Remove TODO regarding immutable deduplications: Not worth to invest more time and effort into deduplications since upcoming porject is targeting the same
* Keep TODO related to TransactionAccepted case: to guide later work with unit-testing
* Make DBDTOV1 sealed
* Add scaladoc to StorageBackend interface

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: mziolekda <marcin.ziolek@digitalasset.com>

changelog_begin
changelog_end
2021-05-18 16:07:54 +00:00
Remy
679ce3b7d3
LF: Release LF 1.13 (#9705)
CHANGELOG_BEGIN

- LF: make LF 1.13 stable
   Add support for BigNumeric

- Ledger API: Bump Ledger API version for LF 1.12

CHANGELOG_END
2021-05-18 17:30:34 +02:00
azure-pipelines[bot]
73c479310d
update NOTICES file (#9711)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-18 17:05:01 +02:00
Gary Verhaegen
f249eec24f
drop per-commit compatibility_macos (#9730)
This should reduce the pressure on CI nodes a bit. Note that we're still
running the full compatibility matrix on macOS as part of the daily
build.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 17:03:24 +02:00
Remy
55c36cc93e
Compiler: drop BEToTextBigNumeric in favor of BEToText (#9728)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 14:49:03 +00:00
Sofia Faro
2a2c745978
Implement name collision check for type synonyms. (#9723)
Part of #3616

changelog_begin
changelog_end
2021-05-18 13:56:02 +01:00
Hubert Slojewski
c7cc1bfdfa
KVL-914 Add more unit tests for tracing (#9708)
* Add more unit tests for tracing
CHANGELOG_BEGIN
CHANGELOG_END

* Extract DefaultDarReader
2021-05-18 13:41:44 +02:00
Oliver Seeliger
e63e0cfb77
Upgrade canton to 0.24.0 (#9722)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 11:22:32 +00:00
Moritz Kiefer
0a1d00d1b3
Canonicalize junit output path (#9710)
fixes #9646

changelog_begin
changelog_end
2021-05-18 12:34:53 +02:00
Remy
d4fca0305b
LF: Change error exception for Arithmetic builtins (#9692)
This PR is a priliminary step toward making Arithmetic Builtin
throwing proper Daml Excetpions.

This is part of #8020.

CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 10:41:44 +02:00
Samir Talwar
1e5664054d
Release: Switch Andreas and me around in the release rotation. (#9719)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-18 08:28:08 +00:00
Marton Nagy
e50885caa8
Dpp 388 todo cleanup parallel indexer (#9690)
* Removes TODO related to BatchingParallelIngestionPipe type: the result of the ingestion is not needed at the moment
* Removes TODO related to groupedWithin: at this point the introduced latency seems not significant
* Refactor AsyncSupport
* Removing some TODOs related to postponed work-items
* moving mutable initialisation code does not make sense without refactoring/segregating the initialisation part of the LedgerDao. That effort is postponed as per group decision.
* Injecting the dispatcher makes little sense at this point, further features might require it.
* Fixes type derivation in ParallelIndexerFactory
* Moves instrumentedBufferedSource to metrics (+ unit tests)
* Removes TODO related to logging: primarily to pass down the initializing LoggingContext is fine. (further logging discussion is in progress related to ingestion at the time of writing)
* Refactor type cast towards synthetic zero-element generation
* Expose configuration for the instrumented input, lowers default.
* Remove TODO related wiring of indexer HealthChecks: there is already an issue for this: https://github.com/digital-asset/daml/issues/2733
* Remove TODO related to lowering connectionTimeout for Hikari database-connection pool: it is already the minimum, no smaller connection timeout is available for selection.

changelog_begin
changelog_end
2021-05-18 02:34:02 +02:00
Remy
fc745f2224
LF: clean shifting BigNumeric builtin (#9704)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-17 19:26:14 +02:00
Sofia Faro
7a97d88f42
DA.BigNumeric: Split shift, add roundToNumeric. (#9702)
* Split BigNumeric.shift, add BigNumeric.roundToNumeric.

This is based on some feedback we received. The shift direction was
counterintuitive so splitting `shift` into `shiftLeft` and `shiftRight`
makes this more explicit. It's also convenient to have a function that
combines the rounding and casting of BigNumeric to a specific Numeric
scale.

changelog_begin

- [Daml Standard Library] `DA.BigNumeric.shift` has been split into
  `DA.BigNumeric.shiftLeft` and `DA.BigNumeric.shiftRight`.
  `DA.BigNumeric.roundToNumeric` is introduced, for rounding and
  converting a BigNumeric to a Numeric in a single move.

changelog_end

* hide `round` in DA.BigNumeric

* Simplify error docs, add doctest for roundToNumeric

* Update BigNumeric test
2021-05-17 15:43:27 +00:00
Moritz Kiefer
b1738c7202
Switch Scala default to 2.13 (#9699)
changelog_begin
changelog_end
2021-05-17 15:04:53 +00:00
Sofia Faro
1edb110f99
Fix simplifier safety for AnyExceptionMessage (#9707)
* Fix simplifier safety for AnyExceptionMessage

This highlights the danger of shifting definitions. At some point this safety was correct (AnyException contained the message string directly, "throw" took a message argument), and then we decided to have AnyException call a function associated with the type (to speed up exception throwing & catching), and this safety became incorrect :-(

changelog_begin
changelog_end

* s/may crash/may throw
2021-05-17 14:04:23 +00:00
Sofia Faro
0ab37b3774
Use new exception builtins in stdlib. (#9703)
* Use new exception builtins in stdlib.

changelog_begin
changelog_end

* hide message fn

* be very explicit

* s/Just/Some
2021-05-17 13:22:30 +00:00
tudor-da
7d472e178d
Optimistically increase Patience for fixing flakiness in MutableCacheBackedContractStoreSpec (#9697)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-17 12:46:19 +00:00
Sofia Faro
69f51e4b5e
speedy: Compile new AnyException primitives (#9700)
* speedy: Compile new AnyException primitives

changelog_begin
changelog_end

* s/Contract/ContractError

* remove random eszett

* fix booleans

* Combine some cases!

* define and use getSException

* use SException directly in pattern match
2021-05-17 12:47:22 +01:00
Hubert Slojewski
3666cf2f54
KVL-914 Add unit test and fix trace context propagation from config management service (#9694)
* Add unit test for trace context propagation from config management service
Fix invalid telemetry context
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-17 13:44:19 +02:00
Moritz Kiefer
4e63299919
Simplify kvutils contract keys validation (#9628)
changelog_begin
changelog_end
2021-05-17 11:38:27 +00:00
Andreas Herrmann
010e2b1b27
Fix client_server_build/test with port file (#9701)
* client_server runner - use temp dir for port file

The sandbox will not overwrite an already existing port file but instead
fail, or worse, silently ignore the error and leave the port-file empty.

changelog_begin
changelog_end

* sandbox: Fail if writing the port file fails

So far this was being silently ignored, leaving a pre-existing port-file
untouched.

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-05-17 11:36:25 +00:00
nickchapman-da
6d9490c0bb
Never create a rollback node containing pre-exception descendants. (#9679)
* Never create a rollback node containing descendants nodes with versions older than minExceptions. Instead throw an (old-style) uncatchable exception.

changelog_begin
changelog_end

* avoid wildcard import; fixes scala_2_13 build?

* extend example: add exercise within the potential rollback

* comment inefficiency
2021-05-17 10:42:29 +00:00
Sofia Faro
b19c8f2a7c
Drop sanitize, add MagicHash in data-dependencies. (#9698)
The only thing `sanitize` does is mangle the names of identifiers and
types that end in `#`. That can't be a good thing. This PR removes
sanitize and enables MagicHash in data-dependencies, meaning names can
end in `#` without causing issues. (MagicHash also enables unboxed
literals, but that doesn't matter here.)

In practice, sanitize was only affecting `GHC.Prim.Void#`, which we
define because GHC sometimes references it. AFAIK there's no other
use of `#` in the standard library that we don't rewrite away.

changelog_begin
changelog_end
2021-05-17 10:10:00 +00:00
Moritz Kiefer
c669a00883
Release SDK 1.13.1 (#9696)
changelog_begin
changelog_end
2021-05-17 09:42:07 +00:00
Miklos
395ff58eec
Damlification of Bazel files (#9670)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-17 11:41:44 +02:00
Moritz Kiefer
9b53251c74
Differentiate between negative inputs & errors in contractKeyInputs (#9683)
For better or for worse, kvutils validation insists on treating a
negative input from a create different to a negative key lookup (and
to make things more annoying the first one will never blow up during
submission only during validation).

While, nobody seems to argue all that strongly that the current errors
are very sensible, we agreed to do it in two steps:

1. Expose enough information in `contractKeyInputs` so that we can use
   it in kvutils while preserving the current error semantics.
2. Revisit contract key error handling across ledgers which is
   currently an inconsistent mess.

changelog_begin
changelog_end

.

changelog_begin
changelog_end
2021-05-17 10:29:04 +02:00
Miklos
cd9933328a
runtime: Damlification of Scala files (#9668)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-17 10:28:50 +02:00
Moritz Kiefer
fb0551bdfd
Fix blackduck flag names (#9695)
changelog_begin
changelog_end
2021-05-16 16:45:31 +02:00
Moritz Kiefer
4b3b9ef165
Add race condition tests for exceptions (#9688)
* Add race condition tests for exceptions

This PR addresses
https://github.com/digital-asset/daml/pull/9400#pullrequestreview-634770251
and adds tests that match RaceConditionTests but to the read side in a
rollback (we cannot do writes in rollbacks, they are rolled back :)).

The tests are as close as possible to the other race condition tests
to ease maintenance and reduce confusion.

changelog_begin
changelog_end

* remove commented lines

changelog_begin
changelog_end

* Disable accidentally enabled ClosedWorldIT

changelog_begin
changelog_end
2021-05-14 17:36:25 +02:00
Hubert Slojewski
927242be40
KVL-914 Add and rework unit tests for tracing (#9686)
* Add and rework unit tests for tracing
CHANGELOG_BEGIN
CHANGELOG_END

* Add assertion

* Minor cleanup

* Add missing header

* Remove an empty line
2021-05-14 16:36:29 +02:00
Sofia Faro
6568336588
Lift constraint tuples up to a type synonym in data-dependencies. (#9687)
* Lift constraint tuples up to a type synonym in data-dependencies.

Fixes #9663 and adds a regression test.

GHC was crushing the constraint tuples into regular constraints, so the function caller no longer matched the original LF API. By lifting the constraint tuple into a type synonym, we eliminate this effect.

Part of the issue here is that we're losing the original constraint tuple type synonym during LFConversion. I'll open a separate issue for that, since I think it's also worth fixing that going forward.

(Preserving the type synonym would solve this issue for newly compiled packages. By contrast, the fix in this PR works for both new and old packages.)

changelog_begin

- [Daml Compiler] Fixed a data-dependencies bug where functions in a data-dependency that used a constraint tuple constraint (e.g. `Template t`) could not be directly invoked.

changelog_end

* use foldl'

* Fix exception test that spawned this mess
2021-05-14 14:22:47 +01:00
Remy
80f65b4734
LF: clean compilation of SToTextXXX builtins (#9682)
CHANGELOG_BEGIN
CHANGELOG_END
2021-05-14 14:30:45 +02:00
Moritz Kiefer
ed14f97528
Move race condition utilities to test tool infrastructure (#9685)
This is a preparatory refactoring PR so we can use the same utilities
for the existing race condition tests and for a test suite that tests
race conditions in combinations with exceptions.

changelog_begin
changelog_end
2021-05-14 13:39:06 +02:00
azure-pipelines[bot]
e5646a9c73
update compat versions for 1.13.1-snapshot.20210512.6834.1.5f532380 (#9681)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-14 12:57:50 +02:00
Jost Berthold
6629aab009
DEL-8479 tag LF libs for SDK 1.13 release (#9680)
* DEL-8479 bump lib versions to 0.1.13

* HOTFIX use newer resolver lts-17.11 and protobuf from hackage


changelog_begin
changelog_end
2021-05-14 16:38:20 +10:00
Sofia Faro
55abd0b7f0
Add a data-dependencies test for user-defined exceptions (#9659)
* Add a data-dependencies test for exceptions.

Part of #8020

This only tests that (catching & throwing) user-defined exceptions compiles as expected across data-depndencies.

Once they're supported, we should also add a test involving throwing a built-in exception (arithmetic or contract errors) in the data-dependency and catching them in main.

changelog_begin
changelog_end

* Fix weird formatting

* Rename test case

* syntax error

* fix easy problems

* Work around constraint tuple bug.
2021-05-13 15:40:29 +01:00
Moritz Kiefer
142767c421
Split daml test-script code into a separate library (#9674)
Currently we have the following dependency chain:

1. The compiler depends on the scenario service for daml test
2. The scenario service depends on Daml Script
3. Daml Script depends on the Sandbox code only for daml test-script

The last one can easily be split. The scenario service does not care
about this code.

This means that now if we change ledger code, at least not all
compiler tests are going to rerun.

Verified that this actually breaks the dependency fully via

```
bazel query 'somepath(//compiler/damlc/tests:packaging, //ledger/participant-integration-api/...)'
```

changelog_begin
changelog_end
2021-05-13 12:58:31 +02:00