Commit Graph

4555 Commits

Author SHA1 Message Date
Gary Verhaegen
c7ea0a8b08
automatically run update-versions on release (#6479)
This PR adds an extra post-release job to CI that will run the
[`compatiblity/update-versions.sh`][0] script and open a PR with the
result.

[0]: cb82a8d6be/compatibility/update-versions.sh

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-24 17:02:12 +02:00
Martin Huschenbett
c4cd51389e
Display why a party knows about a contract in table view (#6475)
* Display why a party knows about a contract in table view

When displaying scenario results in table view in DAML Studio, we now
indicate _why_ a party knows about the existence of a contract:
- `S` means the party is a signatory.
- `O` means the party is an observer.
- `D` means the party has learned about the contract via disclosure or
  divulgence.

With the information we get from the scenario service there is no
straightforward way of distinguishing between disclosed (you
witnessed the `create`) and divulged (you witnessed a `fetch`)
contracts. Fortunately, both words start with a "D" and we're fine. :)

This addresses the first point of
https://github.com/digital-asset/daml/issues/6412 for the table view.

CHANGELOG_BEGIN
* [DAML Studio]
  When displaying scenario results in table view in DAML Studio, we now
  indicate _why_ a party knows about the existence of a contract:
  - `S` means the party is a signatory.
  - `O` means the party is an observer.
  - `D` means the party has learned about the contract via disclosure or
    divulgence.
CHANGELOG_END

* Add tooltips

CHANGELOG_BEGIN
CHANGELOG_END

* Add test

CHANGELOG_BEGIN
CHANGELOG_END

* Remove tooltip for invisible contracts

CHANGELOG_BEGIN
CHANGELOG_END

* Move parties to then end

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-24 14:55:26 +00:00
Samir Talwar
c2f4231442
rs-grpc-bridge: If the execution sequencer pool is closed, fail fast. (#6474)
On closing the SingleThreadExecutionSequencerPool, all sequencers in the
pool are set to null (presumably to encourage garbage collection).
However, you can still ask for the next executor, which will then return
`null`, causing all manner of problems down the line.

This change forces the failure early, making it easier to debug, by
checking whether the pool is closed and if so, throwing an
`IllegalStateException`.

We see these null pointer exceptions in the `BotTest` test logs from
time to time.

CHANGELOG_BEGIN
- [RxJava Bindings] We now fail faster, with a more meaningful error,
  when RxJava flows continue running after shutting down the client.
CHANGELOG_END
2020-06-24 14:10:45 +00:00
Remy
6dc056bcc4
minor change in daml script doc (#6477)
The scenario service is not a public API, it can change without notice. Better to not speak about it.
2020-06-24 12:57:33 +00:00
Moritz Kiefer
97c74d4a29
Support multiple auth tokens in DAML Script (#6473)
* Support multiple auth tokens in DAML Script

This piggy backs on top of the already existing --participant-config
feature. While you can argue that it might be slightly confusing that
you have to specify the same participant twice to specify different
auth tokens, I think this actually makes sense: In an ideal
world (ignoring any performance issues) you have one participant per
party anyway and one connection per participant specified in the
config file still seems like a very reasonable model.

changelog_begin

- [DAML Script] You can now use DAML Script with multiple auth
  tokens. This is particularly useful if you are working with the JSON
  API where you can only have one party per token or with an IAM that
  only provides single-party tokens. The tokens are specified in the
  participant configuration passed via `--participant-config` in a new
  ``access_token`` field. The existing `--acess-token-file` flag is still supported if you want to use the same token for all connections. See
  https://docs.daml.com/daml-script/index.html#running-daml-script-against-authenticated-ledgers
  for more details.

changelog_end

* I will never understand rst

changelog_begin
changelog_end
2020-06-24 14:43:29 +02:00
Martin Huschenbett
cb82a8d6be
Release SDK 1.3.0-snapshot.20200623 (#6472)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-24 12:26:02 +02:00
Andreas Herrmann
3ec80a05fd
Track runfile dependencies of SDK assistant (#6462)
The //:migration-stable test-cases had issues with test results not
being invalidated after an update of the HEAD SDK. This may be due to
the SDK distribution files being undeclared dependencies of the `daml`
binary. This change adds the SDK distribution files to the `data`
attribute of the generated `daml` `cc_binary` to ensure that changes are
noticed by Bazel and cached test-cases invalidated.

The corresponding runfiles tree includes a symlink per file of the SDK
release. At the time of commit this amounts to ~9MiB of symlinks for one
SDK version (0.0.0 in particular).

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-06-24 10:10:12 +00:00
Moritz Kiefer
f0f682c847
Remove dependency on url-regex (#6468)
This addresses a security vulnerability. Unfortunately, we need to
force a newer version of resize-img ignoring our
dependencies. However, that seems to work fine based on my
testing (running navigator on quickstart-java and looking at
favicons).

changelog_begin
changelog_end
2020-06-24 10:54:55 +02:00
Moritz Kiefer
9c40f18545
Fix contains check in ConcurrentCompiledPackages (#6471)
* Fix contains check in ConcurrentCompiledPackages

`contains` searches for a _value_ not a _key_. We have a package id
here in both cases which is clearly a key.

I am not exactly clear on what exactly happens if you hit this bug. I
believe it’s just a performance issue so probably hard to write a test
for.

I did take a brief look at whether we can make this
typesafe (`contains` accept an `Object` which is how this typechecks)
and apparently calling `asScala` and then using
`scala.collection.concurrent.Map` should work but I don’t know if this
has performance implications or if there is another reason why we
didn’t do this. Happy to make the change if someone tells me this is
the right thing to do.

changelog_begin
changelog_end

* Switch to Scala’s concurrent map which doesn’t pretend types are bad

changelog_begin
changelog_end
2020-06-24 10:54:17 +02:00
Shayne Fletcher
4f68cfc480
strengthen unused * testing (#6467)
changelog_begin
changelog_end
2020-06-23 12:44:11 -04:00
Brian Healey
6ad3279bbd
upgrade elliptic version to address vulnerability (#6459)
* upgrade elliptic version to address vulnerability

* Revert "upgrade elliptic version to address vulnerability"

This reverts commit dbf19c32

* upgrade elliptic version to address vulnerability

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

* Use range for elliptic rather than specific version
2020-06-23 12:00:01 -04:00
Nemanja
87c17bb4e9
Yarn install workaround for noobs (#6426)
Noobs had a problem running yarn install v1.12.3
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.40s. second time around when they^ve changed the code. Simply put they would way too often (almost alqways) forget to include  when calling yarn install v1.12.3
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.34s.. This would be a very simple workaround that woould lead to them being aware from the very first step that there's the  parameter that needs to be called.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-23 17:38:09 +02:00
Remy
ec7d53eb59
LF-REPL: proper dev-mode (#6453)
We add a flag in LF-REPL to prevent usage of DAML-LF Dev and dev value/transaction version.

This PR advances #5164.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-23 17:08:37 +02:00
Moritz Kiefer
75eb554841
Prefix IDE include paths with project root (#6463)
* Prefix IDE include paths with project root

As described in #6174, `--include` is broken pretty badly in the IDE
atm. LSP works based on absolute file paths so if you have a relative
include dir you run into two issues:

1. You end up with two GHC sessions e.g, one for `/multidir` and one
   for `.`. That results in fun type errors like “Couldn’t match expected
   type `Text` with actual type `Text`”.
2. The same file can end up being represented twice. Apart from being
   horribly inefficient, this breaks as soon as we try to build a DALF
   since the function for constructing that (correctly) explodes when
   there are two files with the same module name.

This change does not break `daml build` since the project root is
relative there.

fixes #6174

changelog_begin

- [DAML Studio] Fix an issue where use of the `--include` option
  resulted in various confusing type errors. See
  https://github.com/digital-asset/daml/issues/6174

changelog_end

* Stop wasting my time hlint

changelog_begin
changelog_end
2020-06-23 16:58:14 +02:00
Leonid Rozenberg
ea344518e9
Group context and hook creation so that it is exportable. (#6451)
CHANGELOG_BEGIN
Export Ledger context and hook creation to enable nested interaction,
with different parties or different ledgers, within one React app.
CHANGELOG_END

* Group context and hook creation so that it is exportable.

* Use undefined as default state to avoid cast

* Word choice

* Document new functions

* Revert commit to build script

* Test nesting of contexts

* Document extra feature in README

* Reorganize code to preserve individual function documentation.

* Correct names to starting with lowercase in build.

* Single quote imports and spacing style

* Add copyright notice

* Spacing around useReload

* Use a good variable name

* Do not export by default

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-06-23 10:45:19 -04:00
Stefano Baghino
6bab178195
Improve explanation of offsets on the protobuf docs (#6465)
* Improve explanation of offsets on the protobuf docs

changelog_begin
[Documentation] More detailed explanation of how to use (and not use) offsets in the Ledger API reference docs
changelog_end

* Address https://github.com/digital-asset/daml/pull/6465#discussion_r444200217
2020-06-23 14:11:07 +00:00
Shayne Fletcher
4d896bc3bd
Update ghc-lib, da-ghc-master-8.8.1 (#6460)
changelog_begin
changelog_end
2020-06-23 08:29:16 -04:00
Gary Verhaegen
fc5fa4c213
granular test selection, take 3 (#6458)
This is the final bit extracted from #6314. This PR adds the capability
to filter individual test cases (for either inclusion or exclusion)
while being completely backwards compatible. It also introduces a new
cli option, `--list-all`, to list all test cases, keeping the behaviour
of the existing `--list` option unchanged, i.e. only print test suites.

Unlike #6314, this is still building upon the idea of defining test
suites as maps, preserving the known-good order of tests and thereby not
introducing flakiness into our builds.

CHANGELOG_BEGIN

- [Ledger API Test Tool] ``--exclude`` and ``--include`` now match the
  full test name as a prefix, rather than just suite names. Test name is
built by combining the suite name with a test identifier, so this change
should be fully backwards compatible. Run with ``--list-all`` to list
all tests (as opposed to just the test suites with ``--list``).

CHANGELOG_END
2020-06-23 14:27:36 +02:00
Oliver Seeliger
fa652e8fce
Revert "Multinode ledgers reflect whether party is non-local (#6382)" (#6461)
This reverts commit 004d2800f0.

CHANGELOG_BEGIN
NOTE: the following line needs to be removed from the change log:
- [Ledger Api] The Package Management Service's `ListKnownParties` response's `PartyDetails` now
  properly reflects where a party is non-local on distributed, multi-participant ledgers that
  expose parties to remote participants.

CHANGELOG_END
2020-06-23 09:44:22 +00:00
Oliver Seeliger
b68333c29e
Reenable multi-node ledger-api-test-tool conformance test against Canton (#6449)
Canton test suite had been disabled shortly before DAML 1.0. Reenabling
those tests that have been running flake-free in Canton for over a month.

In addition:
- Switched test selection from --include to --exclude so that we see how newly
  added suites run multi-node.
- Switched Canton from in-memory to h2. Also adopted other config settings in
  canton.conf from how tests are invoked in canton continuous integration.
- Increased number of participants from 2 to 4.
- Upgraded Canton from 0.11.0 to 0.15.0

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-23 09:06:28 +02:00
Gary Verhaegen
7d3dae4b1f
update perf-sha (#6457)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-22 18:46:19 +02:00
Gary Verhaegen
d48efd35c7
exit on failed benchmark (#6448)
At the moment, JMH seems happy to just swallow exceptions and consider
the benchmark done, which makes it produce inaccurate speed results and
lets errors slip through to master. This makes unexpected errors in the
benchmark a hard stop.

This is not a complete solution: ideally there would be a way to just
tell jmh to abort on uncaught exceptions. However, I don't seem to be
able to find any relevant documentation on how to do that.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-22 18:20:05 +02:00
Martin Huschenbett
953b3c08fe
Save the expression in the CollectAuthority benchmark (#6454)
During some refactoring we forgot to save the initial expression to
evaluate for the machine during benchmarking. This PR fixes the issue.
It also make the error messages a bit more descriptive so that we can
actually debug this.

A test to make sure issues like this one don't get through CI again is
worked on by @gary-verhaegen-da in a separate PR.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-22 16:03:40 +00:00
Moritz Kiefer
3e099b9633
Bump compat versions (#6452)
Following the changes to exclusions, this is purely running the
update-versions script so we are now at the point where at least a PR
bot that makes these PRs is feasible.

changelog_begin
changelog_end
2020-06-22 15:16:50 +00:00
Moritz Kiefer
7cc5a02152
Further simplify test tool exclusions (#6450)
After adding ranges for sandbox versions, this PR now also adds ranges
for test tool versions. This is particularly useful since this gets us
to the point where adding a new version usually (unless we’ve actually
broken compatibility more than before) does not require any change in
exclusions.

I’ve also cleaned up exclusions that only affect snapshots. While I’ve
previously argued against that since that seemed more annoying to
maintain, the list is small enough now that I’m no longer worried
about that.

changelog_begin
changelog_end
2020-06-22 17:01:09 +02:00
Oliver Seeliger
004d2800f0
Multinode ledgers reflect whether party is non-local (#6382)
* Multinode ledgers reflect whether party is non-local

Closes #2026

The new `PartyManagement` test `PMListKnowPartiesIsLocal` checks whether any known non-local
party is either not known or marked with `PartyDetails.isLocal == false`. This check is not
run for single-participant ledger setups. The test also verifies that `PartyDetails.displayName`
is preserved.

CHANGELOG_BEGIN
- [Ledger Api] The Package Management Service's `ListKnownParties` response's `PartyDetails` now
  properly reflects where a party is non-local on distributed, multi-participant ledgers that
  expose parties to remote participants.
CHANGELOG_END

* Review feedback from Stefano and sql fix from Ratko

* Simplify #6382 (#6413)

* Simplify https://github.com/digital-asset/daml/pull/6382

changelog_begin
changelog_end

* Test fixes switching alpha/beta and alice/bob

* STRANGENESS / DONT MERGE: getParties don't seem to become available

when run against statically created parties until a transaction is run:

when testing

bazel test //ledger/sandbox:next-conformance-test-wall-clock-time-postgresql

Co-authored-by: Oliver Seeliger <oliver.seeliger@digitalasset.com>

* More review feedback

Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
2020-06-22 15:22:04 +02:00
Gary Verhaegen
f101085bc8
api test tool: remove suite name duplication (#6441)
This is the last refactoring extracted from #6314. In #6314, this was
done by turning the `Tests.Tests` type into a Seq (instead of a Map),
which changed the order in which tests ran, thereby introducing
flakiness. This approach, however, still removes the source-level
duplication, but keeps the same Maps at runtime. This makes it a true
refactoring, and thus does not introduce flakiness.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-22 13:15:48 +02:00
Martin Huschenbett
5e97019894
damlc tests: Add suppressed test in Iou12 back (#6446)
The suppressed test works just fine as is. This must be something
pre-historic.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-22 10:57:15 +00:00
Moritz Kiefer
cfb4c182a5
Consistently display stakeholders for key visibility errors (#6434)
* Consistently display stakeholders for key visibility errors

fixes #6404

As pointed out by Bernhard in #6404, the previous behavior was pretty
weird. If the committer was only a divulgee, we only displayed
stakeholders. If the committer was neither a stakeholder nor a
divulgee, we displayed stakeholders + parties the contract has been
divulged to. Given that only stakeholders can do lookups it makes much
more sense to display them consistently which is what this PR
achieves. I’ve also renamed “disclosed to” to “stakeholders” to make
it very explicit what is shown there.

changelog_begin
changelog_end

* Apply suggestions from code review

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>

* fmt

changelog_begin
changelog_end

* lalala

changelog_begin
changelog_end

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-06-22 10:22:37 +00:00
Moritz Kiefer
038388cdb7
Fix handling of non-visibile contract keys in scenario runner (#6433)
fixes #6403

I am not entirely sure why I thought that using `missingWith` makes
sense here but it clearly doesn’t make sense and resulted in a pretty
bad bug where a transaction both succeeded via `submit` as well as
failed via `submitMustFail` which is clearly the wrong thing to do.

This PR fixes this issue and introduces a `notVisibleWith` function
that does the right thing. I’ve also added some comments and an extra
assertion to clarify things a bit.

changelog_begin
changelog_end
2020-06-22 10:20:24 +02:00
Shayne Fletcher
333bf0471d
Support external anchors (#6386)
* support external anchors

changelog_begin
- `daml docs` now supports an `--input-anchor` argument specifying the
path to a database of external anchors
changelog_end

* Add daml-base-anchors.json to the damlc-dist target
2020-06-21 19:44:36 -04:00
Gary Verhaegen
2923048935
remove purge_old_agents (#6439)
This script was supposed to remove old agents from the Azure Pipelines
UI. It may have been useful at some time (notably, when we used
ephemeral instances, they did not necessarily get to run their shutdown
script), but as it stands now, it's broken. The output from that step
ends in:

```
error: 2 derivations need to be built, but neither local builds ('--max-jobs') nor remote builds ('--builders') are enabled
```

after listing the nix packages it would build. Furthermore, it does not
seem to be useful as I have not seen any spurious entry in the agents
list on Azure since we switched to permanent nodes, on either the Linux
or Windows side (and this would only run on Linux, if it ran).

I'm also not convinced it ever ran, as I used to see a lot of spurious
machines on both Linux and Windows when we did use ephemeral instances.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-20 17:37:24 +02:00
Gary Verhaegen
d839acdbce
increase nix cache retention time (#6437)
The nix cache is currently only 3.5GB, and GHC takes a long time to
build, so I think the convenience vs. cost tradeoff is in favour of
keeping things for a bit longer.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-20 16:25:02 +02:00
Shayne Fletcher
cec2693dc7
enable -Wunused-matches (#6423)
changelog_begin
changelog_end
2020-06-19 19:35:10 +00:00
Rohan Jacob-Rao
b10bfa1ba7
Trigger service: Write packages to database if we have one (#6424)
This is needed to recover state after the service shuts down or crashes.
We add a method to the RunningTriggerDao to persistPackages. This only
does something in the case of a DbTriggerDao. In any case the Server
keeps a package map in memory as it's required to construct a trigger runner.
Uploads of existing packages is considered harmless.

changelog_begin
changelog_end
2020-06-19 13:49:49 -04:00
Samir Talwar
a749928172
caching: Wait for the cache to evict some values in tests. (#6438)
* caching: Wait for the cache to evict some values in tests.

Windows, especially, might not do it the first time. Not sure why;
caching is weird.

CHANGELOG_BEGIN
CHANGELOG_END

* caching: Pull out duplicate tests into CacheEvictionSpecBase.
2020-06-19 19:30:58 +02:00
Moritz Kiefer
8ee7de78ef
Only print diagnostics from integration tests on failures (#6436)
This makes the tests super noisy and makes it hard to spot the
interesting part.

changelog_begin
changelog_end
2020-06-19 18:13:21 +02:00
Sofia Faro
4d698fc5ed
constant lifting: adjust what gets lifted (#6430)
* Adjust what gets lifted

* dont lift typerep

changelog_begin
changelog_end
2020-06-19 17:09:52 +01:00
Miklos
9dd78fc508
Ledger data export for non-determinism checks (#6418)
CHANGELOG_BEGIN
CHANGELOG_END
2020-06-19 17:52:11 +02:00
Gary Verhaegen
e1bfbd6a72
remove jo from dev-env (#6435)
It doesn't seem to be used anywhere. Obviously `git grep jo` returns a
lot of results, so I may have missed something in the noise, but I did a
reasonable effort to look through them.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-19 15:21:43 +00:00
Samir Talwar
6496ddd903
caching | kvutils | sandbox: Use a size-based cache for LF value translation. (#6432)
* caching: Split caches into new files.

* caching: Rename `Cache.from` to `WeightedCache.from`.

* caching: Move `Configuration` inside `WeightedCache`.

* caching: Add test cases.

* caching: Allow for Caffeine builders to be covariant.

* caching: When instrumenting the Caffeine cache, compose, don't inherit.

* caching: Add a size-based cache.

* caching: Extract out common test cases into base classes.

* caching: Use the size-based cache for LF value translation.

CHANGELOG_BEGIN
CHANGELOG_END

* caching: Simplify the eviction tests.

* caching: Increase the encapsulation in CaffeineCache.

* caching: Commas are important.

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-06-19 14:42:40 +00:00
Moritz Kiefer
ec8c209b65
Include sadbonx-classic in compatibility tests (#6399)
Given that sadbonx-classic came back from the dead my initial
reasoning that we don’t have to include it since it will be gone soon
anyway is obsolete. Therefore, this PR adds both the in-memory and
postgresql variant to the ledger-api-test-tool tests. For other tests,
I did not yet create variants for sadbonx-classic. Not sure how
important that is, we can always add it later.

changelog_begin
changelog_end
2020-06-19 15:55:39 +02:00
Rohan Jacob-Rao
78d598ecf3
Trigger service: Improve formation of SQL queries (#6422)
Avoid the use of Fragment.const which interprets raw strings as SQL
queries without any checks. Use the `sql` string interpolation which I
found out does the right thing with Strings and other simple types.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-19 09:32:27 -04:00
Gert-Jan Bottu
e5c62ecce2
Verification tool bugfix for PR#6101 (#6431)
CHANGELOG_BEGIN
- Bugfix: forward references are inlined in create updates.
CHANGELOG_END
2020-06-19 15:04:59 +02:00
Remy
1b1b4eab2c
Speedy: clean machine builder name (#6427)
* Address comment martin made in #6368

* changelog

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-19 14:58:13 +02:00
Moritz Kiefer
8730555bc6
Clarify docs around getTime (#6425)
changelog_begin
changelog_end
2020-06-19 14:56:53 +02:00
Moritz Kiefer
f5078046e4
Do not expect a specific location in ledger-api-test-tool (#6429)
* Do not expect a specific source location in ledger-api-test-tool

This broke running the ledger-api-test-tool against older ledgers
since the behavior of Speedy has changed slightly.

This PR changes `assertGrpcError` to accept a regex and uses that to
match for a wildcard in place of a specific location. I’ve gone
through the existing calls and added appropriate levels of escaping.

changelog_begin
changelog_end

* Pass an Option[Pattern] to avoid having to convert back to a String

changelog_begin
changelog_end
2020-06-19 14:28:43 +02:00
Rohan Jacob-Rao
0ca1288d9d
Trigger service: Increase server binding timeout (#6421)
To avoid timeouts in CI. Also factor out the implicit val one level
so it is used by both tests and main method.

changelog_begin
changelog_end
2020-06-18 19:54:24 +00:00
Gary Verhaegen
ddd8eec701
remove LedgerSession from LedgerTestSuite constructor (#6414)
This is another refactoring extracted from #6314. This is removing the
`LedgerSession` argument from `LedgerTestSuite`. The goal of this change
is to remove the closures from the `Tests.Tests` type, so it becomes a
plain map of name to test suite, rather than a map of name to
function-that-returns-a-test-suite.

In context, this is another step towards removing the name duplication
that occurs in the `Tests.default` and `Tests.optional` maps. I have
separated this step from the one that actually removes the duplication
because removing the duplication in #6314 was done by turning the maps
into seqs, thereby changing the order in which tests are run, which
caused the flakiness issues I've been investigating over the past week.

This commit does not yet change the order in which tests are run and is
therefore safe from that perspective. It's still a true refactoring.

It's a fairly simple one at that as `LedgerTestSuite` itself never uses
the session, and there was only one subclass that did. The subclass,
`TransactionScaleIT`, only used it to get at one config parameter. In
this PR, that config parameter is instead passed down directly to the
`Tests.default` method.

The other use of the `session` attribute was to extract it from the test
suite in order to pass it to the `run` method of
`LedgerTestSuiteRunner`. This was done right after creating the test
suites and giving them that same session, so we're now skipping that
round trip and just giving the session directly to `run`.

CHANGELOG_BEGIN
CHANGELOG_END
2020-06-18 20:32:46 +02:00
Sofia Faro
f5613785e0
Constant lifting transformation in the LF simplifier. (#6101)
* First draft of constant lifting

changelog_begin
changelog_end

* refactoring

* doing stuff

* run simplifier on template exprs

* remove merge artifact

* Fix ExerciseWithoutActors

* add comments

* fix trace order test

* prefix generated val names with their provenance

* Verification tool bugfix

During the value collection phase, when encountering a record projection on a (yet) undefined value, stop searching this branch instead of throwing an error.

* Bump pattern-match-perf memory limit with cocreature`s blessing

* bump again

* Filter generated identifiers from daml script test runner

changelog_begin
changelog_end

* Fix party literals

* Remove inlineClosedExpr for now.

* Improve comments

* Reset script test locations

* Unhashmap

* disable daml-lf-verify quickstart tests for now

Co-authored-by: Gert-Jan Bottu <gertjan.bottu@kuleuven.be>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-06-18 17:36:28 +00:00