Commit Graph

332 Commits

Author SHA1 Message Date
Moritz Kiefer
46a66e2f2a
Upgrade jest to the latest version (#10107)
This ends up transitively bumping yargs-parser which has a
vulnerability but more generally I also just like being on the latest version.

changelog_begin
changelog_end
2021-06-24 11:16:29 +00:00
azure-pipelines[bot]
84e329885f
update compat versions for 1.11.2 (#10104)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-24 13:07:03 +02:00
Remy
a6b536f3c4
Compiler: Make LF 1.13 the default output (#9907)
* Compiler: Roll LF Version

Fix #8591

CHANGELOG_BEGIN
- [Compiler] Default ouput LF version is now 1.13
CHANGELOG_END
2021-06-24 11:58:50 +02:00
Moritz Kiefer
3d79cbf2b1
Bump compat versions (#10096)
We need to do the same override for the gRPC version we do on main to
resolve conflicts.

changelog_begin
changelog_end
2021-06-23 22:12:04 +02:00
azure-pipelines[bot]
7eb2ce72a9
update compat versions for 1.15.0-snapshot.20210615.7169.0.adeba206 (#10028)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-22 17:44:18 +02:00
Gary Verhaegen
e12a449c81
s/DABL/Daml Hub/ (#10062)
It's been long enough.

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-21 16:37:17 +02:00
Moritz Kiefer
997a7d449c
Use symlinks on Windows (#9969)
changelog_begin
changelog_end
2021-06-11 16:06:06 +00:00
azure-pipelines[bot]
15f9dfb963
update compat versions for 1.14.0-snapshot.20210602.7086.0.f36f556b (#9900)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-06-07 12:58:31 +02:00
Remy
7bc925e4d2
LF: Factorize the logic for AST lookup (#9871)
Factorize the logic for AST lookup in
 - compiler 
 - type checker 
 - preprocessor
 - script triggers 
 - some tests

CHANGELOG_BEGIN
CHANGELOG_END
2021-06-03 13:32:56 +02:00
Stefano Baghino
c0fccfc671
Switch Scala version Bazel config (#9848)
* Switch Scala version Bazel config

changelog_begin
changelog_end

This allows to easily test with Scala 2.12.x locally. The `scala_2_13` Bazel
configuration is no longer needed becase now Scala 2.13.x is the default.

* Address https://github.com/digital-asset/daml/pull/9848#discussion_r642381690
2021-05-31 10:50:54 +00:00
azure-pipelines[bot]
6846dbfaf8
update compat versions for 1.14.0-snapshot.20210526.7024.0.aedb9a82 (#9806)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-27 09:56:25 +02:00
Robert Autenrieth
d2bce1628e
DPP-335 Implement data migration for the append-only schema (#9481)
* Implement data migration

changelog_begin
changelog_end

* Rename migration

* Update test

* Move the append-only migrations

* Enable data migration test

* Fixup after script rename

* Check append-only migration hashes

* Add missing comments

* Simplify query

* Add vacuum migration

* Rename unknown workflow id

* Only use head migration script

* Rename history table

* Fix comments

* Align previous schema change after rebase

changelog_begin
changelog_end

Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
2021-05-20 21:33:18 +02:00
Moritz Kiefer
90180eb87f
Make sure we don’t start leaking directories in compat tests (#9759)
As evidenced by this change, we don’t actually need the safeguard
here. i think this was just copied over from the main workspace where
we did leak installations. I’d like to know when we start leaking
installations here in the future so this PR removes the catch.

changelog_begin
changelog_end
2021-05-20 13:59:11 +00:00
azure-pipelines[bot]
14cfe9916e
update compat versions for 1.14.0-snapshot.20210518.6953.0.a6c7b86a (#9741)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-19 14:28:09 +02:00
Moritz Kiefer
b1738c7202
Switch Scala default to 2.13 (#9699)
changelog_begin
changelog_end
2021-05-17 15:04:53 +00: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
Moritz Kiefer
9e6d6f7cf0
Support append-only schema in Sandbox migration tests (#9637)
Note that these tests are switched off for now until Robert has
implemented the migration.

To avoid having to stuff too much in one PR the plan is to merge this
one first and then switch the flag once the migrations work.

changelog_begin
changelog_end
2021-05-12 10:03:36 +02:00
Moritz Kiefer
89e46bf90b
Address security vulnerabilities in //compiler/daml-extension (#9615)
changelog_begin
changelog_end
2021-05-07 14:54:54 +02:00
azure-pipelines[bot]
192a77a6d8
update compat versions for 1.13.0-snapshot.20210504.6833.0.9ae787d0 (#9575)
* update compat versions for 1.13.0-snapshot.20210504.6833.0.9ae787d0

CHANGELOG_BEGIN
CHANGELOG_END

* fix exclusion

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-05-05 15:40:12 +02:00
Moritz Kiefer
800989145b
Disable migration tests on macos on PRs (#9571)
We are a bit short on macos nodes and these tests run > 500s so this
should hopefully make things a bit faster. Not necessarily the full
solution, I think we also want to limit the versions here but this is
at least a start.

changelog_begin
changelog_end
2021-05-04 15:17:36 +00:00
Kamil Bożek
39afcc4857
Fix index size limit issues [DPP-347] (#9477)
* Added a new test suite for testing limit API values - ValueLimitsIT

* Change index on participant_command_completions table
This change fixes issues with commands with large submitters number on sandbox-classic

* Added key_hash column to the ledger *state table
The new column is now the primary key of the table. Its values are hashed values of the 'key' column which allows to mitigate limitations on the index row size

* Backfill key_hash for ledger_state table

* Dynamic state table prefix form the backfill migration

* Removed redundant comments

* Backfill migration for all the db types

* Added missing copyright comment

* Fixed migration order after a rebase

* Added missing checksums for sql migrations

* Temporarily removed copyrights from one of sql migrations

* Removed unnecessary NOT NULL constraint

* Removed submitters from the index participant_command_completion_offset_application_idx in the append-only schema

* Disabled the test for old platforms

* CHANGELOG_BEGIN
- [Integration Kit] - a new test suite ValueLimitsIT for testing edge case values
- [Integration Kit] - modified index on the participant_command_completions table to avoid issuess with a large number of submitters
- [Sandbox] - added the key_hash column to the *state table
CHANGELOG_END

* Disabled concurrent testing for the ValueLimitsIT:VLLargeSubmittersNumberCreateContract test case

* Recomputed migrations checksums for the participant-integration-api

* Increase the sandbox-on-x queue size to 500
The motivation is that running conformance tests failed with RESOURCE_EXHAUSTED error due to 200 limit on the queue.

* Minor improvement

* Inlined key hashing for migrations to avoid external dependencies

* Minor improvement

* Fixed migrations hash
2021-05-04 12:23:37 +02:00
azure-pipelines[bot]
d89c8e71af
update compat versions for 1.13.0-snapshot.20210503.6809.0.ca012c3b (#9555)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-05-03 20:05:09 +02:00
Moritz Kiefer
4aca199bbd
Upgrade to Scala 2.13.5 (#9528)
changelog_begin
changelog_end
2021-04-29 13:05:57 +00:00
azure-pipelines[bot]
d028c043bc
update compat versions for 1.13.0-snapshot.20210426.6770.0.ca66061b (#9514)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-04-28 11:34:22 +02:00
Stefano Baghino
e1e878a597
Simplify opt-in/out of Oracle when building (#9515)
* Simplify opt-in/out of Oracle when building

- defines Oracle-related environment variables as part of dev-env so that it's the same across CI and dev
- adds a Bazel 'oracle' configuration so that --config=oracle pulls all required environment

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/9515#discussion_r621180994

* Also use `$ORACLE_USERNAME` instead of `system` in the `sqlplus` connection string

* Address https://github.com/digital-asset/daml/pull/9515#discussion_r621186459
2021-04-28 06:10:43 +02:00
Samir Talwar
3db928c548
compatibility: Use the same Scala version as the root. (#9502)
* compatibility: Use the same Scala version as the root.

It's confusing to get out of sync. `compatibility` was using Scala
2.12.12 while the root was on 2.12.13.

This brings them in sync to 2.12.13.

CHANGELOG_BEGIN
CHANGELOG_END

* Factor out Scala artifacts into scala_version.bzl.

* Bazel: Explicitly specify artifact hashes for Scala 2.13.

Not strictly necessary, as we _happen_ to depend on the same point
release as the Bazel Scala plugin, but this is incidental and we don't
want to bank on it.
2021-04-26 17:49:43 +00:00
Moritz Kiefer
4e1c5fedb3
Check visibility for by-key operation of local contracts (#9470)
* Check visibility for by-key operation of local contracts

fixes #9454

I tried out two approaches for this:

1. The one here where we add a new callback. This has the advantage
   that the engine remains oblivious to visibility checks. They are all
   done outside and the engine doesn’t even know about the reading
   parties.
2. Make the engine aware of the reading parties. A start of that is in
   #9458.

Both work in principle but I ended up going for 1 in the end. Doing
half of the visibility checks outside the engine and half inside just
seems worse than the current state.

changelog_begin

- [Daml Engine] Fix a bug where it was possible to
  fetch/lookup/exercise a local contract by key even if the reading parties
  are not stakeholders. See #9454 for details.

changelog_end

* Disable new test on Canton

changelog_begin
changelog_end

* Exclude from compat tests

changelog_begin
changelog_end

* s/LocalLookup/LocalFetch/

changelog_begin
changelog_end

* Address review

changelog_begin
changelog_end
2021-04-22 21:39:12 +02:00
azure-pipelines[bot]
293bd41600
update compat versions for 1.13.0-snapshot.20210419.6730.0.8c3a8c04 (#9440)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-04-21 15:06:49 +02:00
Moritz Kiefer
b1d80771bb
Add 1.13 snapshot to compat tests (#9418)
This is the manual replacement for #9413 because that conflicted with
the 1.12 update.

changelog_begin
changelog_end
2021-04-15 12:03:08 +02:00
azure-pipelines[bot]
e2dd94195f
update compat versions for 1.12.0 (#9412)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-04-15 08:49:50 +02:00
azure-pipelines[bot]
8b8f7369aa
update compat versions for 1.12.0-snapshot.20210406.6646.0.631db446 (#9332)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-04-07 08:50:55 +02:00
Samir Talwar
6035840d8a
Upgrade Scala 2.12 to v2.12.13. (#9280)
* Upgrade Scala 2.12 to v2.12.13.

This is being pulled in anyway because of Maven/Gradle/etc's fun
"favor the most recent" resolution mechanism. The version of Akka we
depend upon transitively depends on Scala 2.12.13, so any downstream
consumers will see that as the Scala version required.

Bringing the Daml repo in line means no more confusion.

CHANGELOG_BEGIN
- [Scala Bindings] If you are using Daml on Scala 2.12, it now depends
  on Scala v2.12.13 (from v2.12.12).
CHANGELOG_END

* Scala 2.12.13 is the default version in our pinned version of nixpkgs.

* Upgrade Scala 2.13's Wartremover version.

* Rename `scala_version_rule` to `scala_version_configure`.

* Add a test case to ensure the Scala versions are the same everywhere.

* Add tests for the Scala JAR versions in maven_install_*.json

* gatling-utils: Change the sort order of the expected CSV in tests.

I don't know why this changed, but it seems to be stable.

* compatibility: `scala_version` -> `scala_version_configure`.

* Bazel: Disable the Scala version tests on Windows.

* compatibility: Upgrade Wartremover to Scala 2.12.13.
2021-03-30 11:02:18 +00:00
Moritz Kiefer
a591accf04
Fix ledger API test tool exclusions (#9264)
This fixes the exclusions added in #9218. There are two issues:

1. Old ledger API test tool versions only support excluding full test
suites.
2. Apparently SDK 1.6.0 renamend SemanticDoubleSpend to SemanticDoubleSpendBasic.

changelog_begin
changelog_end
2021-03-29 10:29:42 +02:00
Moritz Kiefer
077d8da58f
Upgrade nixpkgs (#9248)
* Upgrade nixpkgs

changelog_begin
changelog_end

* ghc bump

changelog_begin
changelog_end

* more native buildinputs

changelog_begin
changelog_end

* Switch assignment

changelog_begin
changelog_end

* update lockfile

changelog_begin
changelog_end

* Revert "Switch assignment"

This reverts commit af6d25120b.
2021-03-26 21:26:40 +01:00
Hubert Slojewski
cb422e2f67
KVL-810 Report the correct gRPC error code on failures due to concurrent transactions (#9218)
* Fix gRPC status codes for inconsistency rejections and DamlLf errors
Also, add unit tests and exclude failing compatibility and conformance tests

CHANGELOG_BEGIN

- [Integration Kit] Fix gRPC status codes for inconsistency rejections and DamlLf errors (ContractNotFound, ReplayMismatch) by changing them from INVALID_ARGUMENT to ABORTED

CHANGELOG_END
2021-03-26 15:26:33 +01:00
azure-pipelines[bot]
6eb7ee233f
update compat versions for 1.12.0-snapshot.20210323.6567.0.90c5ce70 (#9232)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-24 18:59:56 +01:00
azure-pipelines[bot]
be4dbd971d
update compat versions for 1.11.1 (#9172)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-22 18:25:07 +01:00
Moritz Kiefer
493e2154fd
Fix flakiness in create-daml-app tests (#9165)
* Fix flakiness in create-daml-app tests

waitForSelector doesn’t do the trick here since one selector is enough
to make this return. We need to wait until we actually have the
expected number. This is what waitForFollowers already did.

changelog_begin
changelog_end

* maybe I should test my code but also I don’t want to

changelog_begin
changelog_end

* fine I tested it

changelog_begin
changelog_end
2021-03-17 09:48:26 +00:00
azure-pipelines[bot]
ab90c437a7
update compat versions for 1.11.1-snapshot.20210312.6429.1.7cd6380e (#9135)
update compat versions for 1.11.1-snapshot.20210312.6429.1.7cd6380e

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-03-15 19:24:59 +01:00
Moritz Kiefer
ecd3110f48
Fix compat job (#9099)
* Fix compat job

changelog_begin
changelog_end

* Cleanup head_sdk

changelog_begin
changelog_end

* turns out removing everything also removes files that shouldn’t be removed

changelog_begin
changelog_end

* gnah

changelog_begin
changelog_end

* maybe this was a bad idea

changelog_begin
changelog_end

* trynottocry

changelog_begin
changelog_end
2021-03-11 15:13:49 +00:00
Moritz Kiefer
5cb857d902
Release EE SDK tarballs and installer (#9086)
* Release EE SDK tarballs and installer

As before, no way of testing this. I’ll do a snapshot afterwards.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Rename EE artifacts

changelog_begin
changelog_end
2021-03-11 14:49:48 +01:00
Remy
8a35528514
LF: Make 1.12 default compiler output (#9058)
CHANGELOG_BEGIN
- [Compiler] The compiler produces LF 1.12 by default. LF 1.12 only reduces transaction size.
CHANGELOG_END
2021-03-10 16:44:29 +00:00
azure-pipelines[bot]
a1edf97256
update compat versions for 1.11.0 (#9066)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-10 16:03:25 +01:00
azure-pipelines[bot]
98410e7c7f
update compat versions for 1.11.0-snapshot.20210304.6422.0.d3d5042a (#9032)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-05 11:33:57 +01:00
azure-pipelines[bot]
f70d3391ef
update compat versions for 1.10.2 (#9016)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-03-04 11:36:11 +01:00
Gary Verhaegen
259bf682c4
compat: fix killing stale sandbox(es) (#9003)
We've seen this happen once; I don't think it's worth investigating.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 15:14:05 +00:00
Stefano Baghino
929e0c12d4
Temporarily cut compatibility tests with incompatible versions of Daml-LF (#8959)
* Temporarily cut compatibility tests with incompatible versions of Daml-LF

This adds more tests to the exclusions added as part of #8957

All SDK/platform compatibility tests are not filtered to use compatible
Daml-LF versions, not just those involving the Ledger API Test Tool.

changelog_begin
changelog_end

* Fix Bazel code
2021-02-26 13:47:59 +01:00
Stefano Baghino
72951b8416
Temorarily cut compatibility tests with incompatible versions of Daml-LF (#8957)
These cause spurious failures on CI.

As described in the code, the proper fix is to use the correct Daml-LF version for every pair.

changelog_begin
changelog_end
2021-02-26 09:55:43 +00:00
Moritz Kiefer
623f4e27b7
Commit compatibility/.bazelrc (#8955)
We initially did not commit this since keeping it in sync is
annoying. We cannot use a symlink because Windows. However, it changes
sufficiently rarely that checking it in + a check that the two are in
sync seems less fragile than the current state.

changelog_begin
changelog_end
2021-02-25 19:53:30 +01:00
Remy
a9b035e92e
LF: release LF 1.12 (#8856)
CHANGELOG_BEGIN

    - [LF] Release LF 1.12. This version reduce the size of transaction

    - [Compiler]: Change the default LF output from 1.8 to 1.11.

CHANGELOG_END
2021-02-24 21:17:33 +01:00
azure-pipelines[bot]
ee38cd4b02
update compat versions for 1.10.1 (#8905)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-02-22 09:05:11 +01:00
Stefano Baghino
6a589cb905
Limit SDK/platform tests to the SDK HEAD (#8893)
* Limit SDK/platform tests to the SDK HEAD

```
# Instead of testing the full cartesian product of all SDK versions with
# all platform (~= Sandbox/JSON API) versions, we test the latest version of
# each with all versions of the other. This gives us a reasonable feedback
# with regards to maintaining backwards-compatibility without causing the
# test runs to grow quadratically.
```

changelog_begin
changelog_end

* Address https://github.com/digital-asset/daml/pull/8893#discussion_r578310492
2021-02-18 10:58:23 +00:00
azure-pipelines[bot]
278205b51e
update compat versions for 1.10.0 (#8882)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-02-18 06:32:44 +01:00
azure-pipelines[bot]
ef6191131d
update compat versions for 1.10.0-snapshot.20210209.6265.0.19bf4031 (#8797)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-02-11 16:39:18 +01:00
Moritz Kiefer
9dc3d2ace4
Upgrade to Bazel 4.0 (#8798)
* Upgrade to Bazel 4.0

changelog_begin
changelog_end

* Go back to default assignment

changelog_begin
changelog_end
2021-02-11 10:08:47 +01:00
Moritz Kiefer
773ddada04
Upgrade nixpkgs (#8190)
* Upgrade nixpkgs

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* No ibazel

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Switch agent pool

changelog_begin
changelog_end

* .

* .

changelog_begin
changelog_end
2021-02-08 11:12:07 +00:00
azure-pipelines[bot]
6cf854e5ee
update compat versions for 1.10.0-snapshot.20210202.6218.0.c0573678 (#8729)
* update compat versions for 1.10.0-snapshot.20210202.6218.0.c0573678

CHANGELOG_BEGIN
CHANGELOG_END

* .

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-02-04 13:16:27 +01:00
Kamil Bożek
7cf1914d6d
Increased compatibility test size for classic-postgresql to large. (#8666)
CHANGELOG_BEGIN
CHANGELOG_END
2021-02-01 15:25:18 +01:00
Moritz Kiefer
1286a6b28e
Port readPortfile changes to compat workspace (#8696)
* Port readPortfile changes to compat workspace

Unfortunately we cannot easily share code between the two workspaces
so there is some stuff that is copied over and that we need to keep in
sync. This PR ports the changes from #8669 to the compat workspace.

changelog_begin
changelog_end

* maybe I should test if my code compiles but also I don’t want to

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-01-29 19:56:24 +00:00
Stefano Baghino
83e9fde1d1
Fix compatibility tests (#8682)
a9793651b3
added a new snapshot that does not include the work done as part of
793fd8fdfc

This change ensure that the compatibility test work again.

changelog_begin
changelog_end
2021-01-29 10:20:51 +00:00
azure-pipelines[bot]
a9793651b3
update compat versions for 1.10.0-snapshot.20210125.6143.0.550aa48f (#8628)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-01-28 13:36:35 +01:00
Stefano Baghino
793fd8fdfc
Correctly document and report malformed party names when allocating (#8642)
* Correctly document and report malformed party names when allocating

changelog_begin
[Ledger API] Documented the hard-coded limit of 255 characters for Daml-LF party names.
[Ledger API] Malformed party names are now correctly reported back with an INVALID_ARGUMENT error
changelog_end

* Make sure that what is given is a suggestion

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

* Use Future.successful where possible

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

* Address https://github.com/digital-asset/daml/pull/8642#discussion_r565116571

* Address https://github.com/digital-asset/daml/pull/8642#discussion_r565122362

* Keep fields private where possible

* Whitelist new tests on compatibility suite

* Don't run the new tests on Canton

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2021-01-27 18:50:19 +00:00
Moritz Kiefer
6326822907
Upgrade grpc and protobuf libraries (#8558)
* Upgrade grpc and protobuf libraries

changelog_begin

- [Dependencies] Upgrade
  iou.grpc:grpc-(api|core|netty|protobuf|services|stub) to
  1.35.0.

- [Dependencies] Upgrade
  io.netty:netty-(codec-http2|handler|handler-proxy|resolver)
  to 4.1.58.Final.

- [Dependencies] Upgrade
  io.netty:netty-tcnative-boringssl-static to 2.0.36.Final.

- [Dependencies] Upgrade com.google.protobuf:protobuf-java to 3.14.0.

changelog_end

* Factor out netty and grpc version

changelog_begin
changelog_end
2021-01-26 14:17:18 +00:00
Moritz Kiefer
e0c5abd647
Switch to GHC 8.10.3 (#8394)
* Switch to GHC 8.10.3

changelog_begin
changelog_end

* Update bazel-haskell-deps.bzl

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Comment on rules_haskell patch

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-01-25 11:53:53 +00:00
azure-pipelines[bot]
49a54e816f
update compat versions for 1.9.0 (#8586)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-01-22 18:43:11 +01:00
azure-pipelines[bot]
78f878fc10
update compat versions for 1.8.1 (#8540)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-01-19 16:37:46 +01:00
azure-pipelines[bot]
20659ade04
update compat versions for 1.9.0-snapshot.20210113.6060.0.9ed787cb (#8495)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-01-15 16:45:51 +01:00
azure-pipelines[bot]
9141ea22ae
update NOTICES file (#8468)
* update compat versions for 1.9.0-snapshot.20210111.6034.0.7855b023

CHANGELOG_BEGIN
CHANGELOG_END

* update NOTICES file

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-01-12 09:16:59 +01:00
azure-pipelines[bot]
287d98346d
update compat versions for 1.9.0-snapshot.20210106.5986.0.c6995a9c (#8413)
* update compat versions for 1.9.0-snapshot.20210106.5986.0.c6995a9c

CHANGELOG_BEGIN
CHANGELOG_END

* update generated copyright header

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-01-11 13:46:10 +01:00
Moritz Kiefer
22ce940954
Upgrade scalafmt and enable trailing commas (#8437)
This PR updates scalafmt and enables trailingCommas =
multiple. Unfortunately, scalafmt broke the version field which means
we cannot fully preserve the rest of the config. I’ve made some
attempts to stay reasonably close to the original config but couldn’t
find an exact equivalent in a lot of cases. I don’t feel strongly
about any of the settings so happy to change them to something else.

As announced, this will be merged on Saturday to avoid too many conflicts.

changelog_begin
changelog_end
2021-01-09 11:37:37 +01:00
Bernhard Elsner
cda93db944
Daml case and logo (#8433)
* Replace many occurrences of DAML with Daml

* Update docs logo

* A few more CLI occurrences

CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END

* Fix some over-eager replacements

* A few mor occurrences in md files

* Address comments in *.proto files

* Change case in comments and strings in .ts files

* Revert changes to frozen proto files

* Also revert LF 1.11

* Update get-daml.sh

* Update windows installer

* Include .py files

* Include comments in .daml files

* More instances in the assistant CLI

* some more help texts
2021-01-08 12:50:15 +00:00
Gary Verhaegen
427179ab27
fix (some) copyright headers (#8422)
This commit fixes a few copyright headers that have been missed in the
automatic update on Jan 1, as well as the generation code in the compat
workspace so it generates the right headers.

CHANGELOG_BEGIN
CHANGELOG_END
2021-01-07 11:48:59 +01:00
Gary Verhaegen
a925f0174c
update copyright notices for 2021 (#8257)
* update copyright notices for 2021

To be merged on 2021-01-01.

CHANGELOG_BEGIN
CHANGELOG_END

* patch-bazel-windows & da-ghc-lib
2021-01-01 19:49:51 +01:00
azure-pipelines[bot]
c33140cf88
update compat versions for 1.6.1 (#8349)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-12-26 12:15:19 +01:00
Gary Verhaegen
403990dfd7
reenable Windows cache (#8329)
See #8326.

CHANGELOG_BEGIN
CHANGELOG_END
2020-12-17 15:58:01 +01:00
Moritz Kiefer
b32789025e
Reset Windows cache (#8326)
changelog_begin
changelog_end
2020-12-17 12:24:07 +00:00
Moritz Kiefer
d24ef94f36
Add a Scala 2.13 build pipeline (#8271)
* Add a Scala 2.13 build pipeline

This adds initial support for multiple Scala versions controlled via
the DAML_SCALA_VERSION env var and a CI job to make sure we don’t
regress. For now we only test //libs-scala/ports/... which seemed like
the easiest starting point I could find. We can incrementally expand
that over time.

changelog_begin
changelog_end

* Document pinning

changelog_begin
changelog_end

* Address review comments

changelog_begin
changelog_end
2020-12-14 12:42:26 +01:00
azure-pipelines[bot]
e27026ee5d
update compat versions for 1.8.0-snapshot.20201208.5840.0.38455e8c (#8206)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-12-09 06:41:45 +01:00
Moritz Kiefer
38455e8ca9
Fix Scala version overwrite (#8197)
The old format changed and resulted in that silently being ignored.

changelog_begin
changelog_end
2020-12-08 13:52:41 +00:00
Moritz Kiefer
7e05dc7932
Upgrade rules-scala and scalatest (#8187)
This is necessary to at least attempt an upgrade to 2.13 and
generally, I want to keep our rulesets up2date. rules-scala forces the
version of scalatest so we have to bump that at the same time.

This requires changes to basically all Scala test suites since the
import structure has changed and a bunch of things (primarily
scalacheck support) got split out.

Apologies for the giant PR, I don’t see a way to keep it smaller.

changelog_begin
changelog_end
2020-12-08 06:59:23 +01:00
azure-pipelines[bot]
c86b7a561f
update compat versions for 1.8.0-snapshot.20201201.5776.0.4b91f2a6 (#8132)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-12-04 13:01:34 +01:00
Andreas Herrmann
6ea3007e31
upgrade rules_nixpkgs (#8078)
changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-11-30 14:36:46 +00:00
Moritz Kiefer
f4c530abc1
Exclude tests relying on 1.dev (#8100)
follow-up to #8099. If we don’t load the 1.dev dar in sandbox which is
totally sensible, we obviously also cannot run tests against it. In
newer test tool versions that’s not an issue but for older versions we
still need to exclude that one test.

changelog_begin
changelog_end
2020-11-30 09:53:59 +00:00
Moritz Kiefer
81f965fb5f
Exclude dev-dar in sandbox compatiblity tests (#8099)
By definition, dev doesn’t guarantee any kind of compatibility so
trying to load it into Sandbox can fail. somewhat surprisingly it only
started failing now which I guess shows that we haven’t changed LF too
much recently.

changelog_begin
changelog_end
2020-11-28 21:50:16 +01:00
Oliver Seeliger
8cfe6c3744
Remove ParticipantPruningIT from compatibility exceptions (#8072)
As ParticipantPruningIT is not included by default on any ledger.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-26 14:41:19 +01:00
Oliver Seeliger
83f11aa784
Participant pruning ledger api server support ported from Canton (#7988)
* Participant pruning ledger api server support ported from Canton

CHANGELOG_BEGIN
- [Ledger API]: The preview of `ParticipantPruningService` enables ledger participants to prune the "front" of ledger state at the participant including the ledger api server index.
CHANGELOG_END

* Review feedback from Stefano

* Add pruning tests plus missed command completions change

* Review feedback from Robert

* Improved test readability by having populate helper return offsets

* Review feedback

* Ledger api changes to pruning api and disable canton pruning test

- Change return result to PruneResponse
- Change type of PruneRequest.prune_up_to to string

* Review feedback: Use ApiOffsetSConverter for logged offsets
2020-11-23 15:28:04 +01:00
azure-pipelines[bot]
6a7cdc1831
update compat versions for 1.8.0-snapshot.20201117.5661.0.76fae40c (#8000)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-11-19 10:18:40 +01:00
Robin Krom
5bfff4e9ba
sandbox: fail on already existing port-file. (#7929)
Fixes #7806. This aligns the port file behaviour of the sandbox with the
HTTP JSON API.

CHANGELOG_BEGIN
CHANGELOG_END
2020-11-17 11:08:37 +01:00
azure-pipelines[bot]
abd61b7429
update compat versions for 1.7.0 (#7943)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-11-12 11:57:56 +01:00
azure-pipelines[bot]
5f4ac97b77
update compat versions for 1.7.0-snapshot.20201103.5565.0.e75d42dd (#7872)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-11-04 16:38:01 +01:00
Moritz Kiefer
6fdc6af6a7
Fix exclusions for nongranular test tool (#7876)
Older versions of the test tool don’t allow granular exclusion so we
have to exclude the whole suite.

changelog_begin
changelog_end
2020-11-04 09:53:08 +01:00
Andreas Lochbihler
0c38c83b11
sandbox-classic reports contract key lookup mismatches as Inconsistent instead of Disputed (#7829)
CHANGELOG_BEGIN
sandbox-classic reports contract key lookup mismatches as Inconsistent instead of Disputed
CHANGELOG_END

excludes affected contract key tests from compability tests
2020-11-03 08:44:52 +01:00
Moritz Kiefer
90cfe8b955
Extend trigger compat tests to be agnostic to high-level changes (#7828)
The trigger runner (delibaretely) only cares about the high-level
API. This means that we can change the high-level API without breaking
backwards compatibility in the runner. However, we do of course have
to change the trigger code written in the high-level API.

This PR addresses this by making the code depend on the
version. Unfortunately we cannot use CPP here (something I don’t say
very often) so this is done in a Bazel function.

The last low-level breaking change was the change to `CommandId`
generation so we go back to that.

changelog_begin
changelog_end
2020-10-29 14:19:10 +01:00
azure-pipelines[bot]
30ef4c88a9
update compat versions for 1.7.0-snapshot.20201027.5530.0.bdbf8977 (#7827)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-28 16:58:01 +01:00
azure-pipelines[bot]
bdbf8977eb
update compat versions for 1.7.0-snapshot.20201023.5508.0.9dec6689 (#7798)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-27 19:55:56 +01:00
azure-pipelines[bot]
8941d4fa66
update compat versions for 1.6.1-snapshot.20201021.5317.0.aafe46a5 (#7781)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-23 14:40:59 +02:00
azure-pipelines[bot]
396f498efb
update compat versions for 1.6.0 (#7695)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-15 16:28:49 +02:00
azure-pipelines[bot]
cc670ea656
update compat versions for 1.7.0-snapshot.20201013.5418.0.bda13392 (#7681)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-15 10:51:36 +02:00
Stephen Compall
6d39ac6984
allow updating user state from high-level trigger rule (#7674)
* allow updating user state from high-level trigger rule

* fix tests and examples for new rule signature

* fix doc for new rule signature

* add changelog

CHANGELOG_BEGIN
- [Triggers] ``rule`` can now ``get`` and ``put`` the user-defined state just
  like ``updateState`` does.  It no longer accepts the state as an argument.
  You can port your rule function types by replacing ``s -> TriggerA`` with
  ``TriggerA s``, removing the last argument from the function, and using
  ``get`` to retrieve the state at the beginning of the ``rule``'s ``do`` block,
  if needed.
  See `issue #7674 <https://github.com/digital-asset/daml/pull/7674>`__.
CHANGELOG_END

* test that rule userState changes propagate all the way out

* adapt compatibility filtering to #7681
2020-10-14 14:51:25 +00:00
Stephen Compall
bda13392fd
replace getContracts with query Action, usable in initialize, updateState, rule (#7632)
* add ACS reader to TriggerA and TriggerStateA

* propagate changes in TriggerA, TriggerStateA structure

* allow query to be used in updateState and rule

* remove getTemplates

* remove ACS argument from updateState and rule

* fix type parameter order on query

* use query function in all tests and examples

* replace getContracts with query in documentation

* use wildcards instead of otherwise

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* rename TriggerStateA to TriggerUpdateA

- suggested by @cocreature; thanks

* missed renamings of TriggerStateA to TriggerUpdateA

- suggested by @cocreature; thanks

* make the meaning of the rlift functions clearer

* make initialize a TriggerInitializeA instead of a function; remove getContracts

* update tests and examples for new initialize signature

CHANGELOG_BEGIN
- [Triggers] Trigger ``updateState``, ``rule``, and ``initialize`` functions no
  longer accept an ``ACS`` argument; instead, they must use the ``query`` action
  to query the ACS, similar to the same function in DAML Script.
  See `issue #7632 <https://github.com/digital-asset/daml/pull/7632>`__.
CHANGELOG_END

* disable older compatibility trigger builds

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-10-13 13:20:43 -04:00
Stephen Compall
1a2afd5266
upgrade to Scala 2.12.12 from 2.12.11 (#7661)
* upgrade bazel settings to scala 2.12.12

* upgrade nix scala tool to scala 2.12.12

* upgrade silencer references to scala 2.12.12

* repin for scala 2.12, silencer, wartremover upgrades

* remove numerous occurrences of unused silencer now spotted

* update Scala version in our bazel notes

CHANGELOG_BEGIN
CHANGELOG_END

* update compatibility maven_install.json to match compatibility WORKSPACE
2020-10-13 08:42:14 -04:00
azure-pipelines[bot]
dc827d656c
update compat versions for 1.6.0-snapshot.20201012.5316.0.d21cb496 (#7658)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-13 13:01:43 +02:00
Stephen Compall
664a0c0076
add Action to high-level trigger updateState (#7621)
* add ActionState to the standard library

* use 1 ActionState, 1 get, 1 put in low-level trigger library

* introduce TriggerStateA for updateState

* fix tests and examples for new updateState signature

CHANGELOG_BEGIN
- [Triggers] The ``updateState`` function now returns a ``TriggerStateA``.  This
  is an action like ``TriggerA``, but doesn't permit emitting commands.  Instead
  of taking the state as an argument and returning a new state, you can
  manipulate the state with ``get``, ``put``, and ``modify``.  Any existing
  ``updateState`` can be ported by replacing ``s -> expr`` in the lambda
  expression with ``-> modify $ \s ->``, and then made to look nicer from there
  as desired.
  See `issue #7621 <https://github.com/digital-asset/daml/pull/7621>`__.
CHANGELOG_END

* some DAML docs for updateState and TriggerStateA
2020-10-09 13:56:24 -04:00
azure-pipelines[bot]
b8dc6cc4d1
update compat versions for 1.6.0-snapshot.20201007.5314.0.b4a47d0b (#7605)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-09 13:40:16 +02:00
Stephen Compall
a1d8e8dc33
replace commands-in-flight argument to trigger rule with getCommandsInFlight action (#7600)
* add getCommandsInFlight as a TriggerA action

* immediately update commandsInFlight on emitCommands

- delay until the rule had returned made sense before submitCommands was launched
  immediately; this also makes `getCommandsInFlight` more sensible

* remove commands-in-flight argument from high-level Trigger rule

CHANGELOG_BEGIN
- [Triggers] The "commands in flight" or ``Map CommandId [Command]`` argument has been
  removed from high-level trigger ``rule`` functions; instead, the current
  commands-in-flight can be retrieved with the new ``getCommandsInFlight`` function, which
  can be done immediately at the beginning of the rule's ``do`` block to preserve exact
  existing trigger behavior.
  See `issue #7600 <https://github.com/digital-asset/daml/pull/7600>`__.
CHANGELOG_END

* remove commands-in-flight argument from trigger tests

* update doc examples and copy in compatibility

- compatibility change will most likely entail another flag day in compatibility tests,
  replacing last_pre_7456_trigger_version

* update doc text for getCommandsInFlight

* test that getCommandsInFlight gets updated during the rule

* flag day for trigger compatibility tests

sdk-version: 1.7.0-snapshot.20201006.5358.0.0c1cadcf
File:     src/CopyTrigger.daml
Hidden:   no
Range:    55:11-55:19
Source:   typecheck
Severity: DsError
Message:
  src/CopyTrigger.daml:55:12: error:
  • Couldn't match type ‘TriggerA ()’ with ‘() -> TriggerA ()’
  Expected type: Party
-> DA.Next.Map.Map CommandId [Command] -> () -> TriggerA ()
  Actual type: Party -> ACS -> () -> TriggerA ()
  • In the ‘rule’ field of a record
  In the expression:
  Trigger
  {initialize = \ _acs -> (), updateState = \ _acs _message () -> (),
  rule = copyRule, registeredTemplates = AllInDar, heartbeat = None}
  In an equation for ‘copyTrigger’:
  copyTrigger
  = Trigger
  {initialize = \ _acs -> (), updateState = \ _acs _message () -> (),
  rule = copyRule, registeredTemplates = AllInDar, heartbeat = None}

* match docs on TriggerAState to current usage of these fields

* remove emittedCommands, as commandsInFlight is now kept up-to-date

* zoomed from where?

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-10-08 12:03:56 -04:00
azure-pipelines[bot]
f5d5388258
update compat versions for 1.7.0-snapshot.20201006.5358.0.0c1cadcf (#7591)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-07 16:55:01 +02:00
Stephen Compall
0e71a2d3d2
interpret allowed updates and other actions in a free Trigger monad, like Script (#7456)
* conservatively move daml-script, trigger SValue interpreters to common library

* introduce expect and JavaList pattern for converters

* clean up trigger Converter Command interpretation

* add Church Free monad

* add an action language for trigger updates

* add expectE to remove some of the joins

* convert more of the converters to expect

* tool for unrolling Free/Roll

* split handleStepResult up and clean up its pattern

* handleStepFreeResult to interpret TriggerF

* replace Free Church with Pure/Roll free from Script

* newtype for ActionTrigger

* replace update in low-level Trigger with Free TriggerF

* submit one Commands at a time

* boolean blindness strikes again

* log missed TriggerF steps

* comment actual Submit contents

* match #7501 fromPureSExpr sig change in 00b80b8ea3

* avoid using forwardPort in runTrigger

* push State back into DAML, so it can be excluded from the action list

* push Message back into DAML, unifying the action language for initialState and update

* bringing TriggerF into initial state

* really add TriggerF into initial state, with all ports, tested

* add ActionTrigger class, express initialState in its terms

* add all TriggerF actions to existing TriggerA

* Trigger.rule will no longer have Time argument

* rename getS, setS to get, put, matching C.M.T.State from transformers

* make high-level Rule evaluate to the underlying TriggerF sequence

* Assert's testRule doesn't have a transform yet

* move DamlTuple2 to common converter library

- suggested by @cocreature; thanks

* combine the two Frees, provide from Script

* remove time argument from integration tests

CHANGELOG_BEGIN
- [Triggers] The ``Time`` argument was removed from the trigger rule function; instead, it
  can be fetched within the ``TriggerA`` ``do`` block by ``getTime``, as with ``Update``
  and ``Scenario``.  The ``LowLevel`` trigger interface has been redesigned; such triggers
  need to be rewritten or ported to high-level triggers.
  See `issue #7456 <https://github.com/digital-asset/daml/pull/7456>`_.
CHANGELOG_END

* add trigger rule simulator to support Assert module

* missed new Free module

- left in script per @cocreature

* remove retract as we ended up using foldFree for that purpose instead

- suggested by @cocreature; thanks

* throw ConverterException instead of RuntimeException

- suggested by @cocreature; thanks

* remove Time argument from coin-upgrade-trigger

* port trigger service tests

* port trigger scenario test

* put TriggerSetup and TriggerRule into LowLevel.Trigger instead of unboxed Free

- suggested by @cocreature; thanks

* remove Time argument from trigger compatibility test

* submit commands as soon as each `emitCommands` is sequenced

- we still collect a list, but only for tracking commandsInFlight

* filter out compatibility tests for triggers before now

* remove commented imports, libraries from new shared converter

* make the TriggerF interpreter tail-recursive

* remove unused compatibility trait

* add back new state logging

* remove refactoring comment

* rewrite some LowLevel initialStates in do

* hide Daml.Script.Free from docs

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* remove forwardPortInitialState

- suggested by @cocreature; thanks

* manually port low-level updates

- suggested by @cocreature; thanks

* remove forwardPort

- suggested by @cocreature; thanks

* fail faster on unrecognized TriggerF

- suggested by @cocreature; thanks

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-10-02 14:18:13 -04:00
azure-pipelines[bot]
52a6a53b3c
update compat versions for 1.6.0-snapshot.20200930.5312.0.b9a1905d (#7534)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-01 10:36:09 +02:00
Sofia Faro
e9cd92f061
Deprecate the "daml 1.2" version header. (#7513)
* changelog_begin

- [DAML] The "daml 1.2" version header is now deprecated.

changelog_end

* fix some line numbers

* fix some more locations
2020-09-29 13:14:59 +00:00
azure-pipelines[bot]
b538c1fb59
update compat versions for 1.6.0-snapshot.20200922.5258.0.cd4a06db (#7473)
* update compat versions for 1.6.0-snapshot.20200922.5258.0.cd4a06db

CHANGELOG_BEGIN
CHANGELOG_END

* Bump to new snapshot

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-09-24 21:11:25 +02:00
Andreas Herrmann
86bdf7b6ec
stack_snapshot_json on Windows (#7468)
* stack_snapshot_json on Windows

CHANGELOG_BEGIN
CHANGELOG_END

* document ad-hoc machines

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-09-24 12:03:15 +00:00
nickchapman-da
96d704b25b
Perform authorization checks during execution and not as a separate post-execution phase. (#7400)
changelog_begin
changelog_end

Adapt test for small error message change. An improvement! Previously an internal message was shown. Make test flexible enough to pass for old & new message.

Adapt expected output file. Only change is the contract-ids for active-contracts when the test ends.

fix small test bugs in testcase where authorization is wrong

temp disabled 3 tests; needs investigation; see TODO markers

temp adapt 1 test for change in error message

temp disable 1 test. needs invesigation

undo accidentally commited change to .bazelrc

add copyright header to new file

remove testcase (badActorCheck2) which is no longer expected behaviour, when authorization occurs during execution

address comments: be mre private & other tiny changes

appease scala formatter

improve expected error message in KeyNotVisibleStakeholders testcase

fix authorization issues and re-enable the 3 failing tests in EngineTest which now pass

fix auth issue and re-enable ledger-test-tool test: WronglyTypedContractIdIT

fix compatibility

re-enable test in KVUtilsTransactionSpec.scala
2020-09-17 17:50:04 +01:00
azure-pipelines[bot]
0e31e33df3
update compat versions for 1.6.0-snapshot.20200915.5208.0.09014dc6 (#7417)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-17 08:19:46 +02:00
Gary Verhaegen
2e25dfdc82
reenable Windows cache (#7426)
All machines have been reset.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-16 23:54:35 +02:00
Gary Verhaegen
f98b92d7ba
reset Windows cache (#7423)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-16 22:38:40 +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
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
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
2eb2397f6e
Add an exclusion for Out of Range tests (#7266)
The new behavior here was only added in SDK 1.4.0 so the tests
fail (as expected) for older SDK releases. We only test against the
latest stable release on each PR so we didn’t catch this directly on CI.

changelog_begin
changelog_end
2020-08-31 10:41:13 +02:00
azure-pipelines[bot]
01c6be8e1d
update compat versions for 1.5.0-snapshot.20200825.5071.0.d33e130f (#7242)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-08-26 20:38:16 +02:00
Gary Verhaegen
5f897e699f
reenable Windows cache (#7216)
All machines have been reset following #7212.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-24 20:02:08 +00:00
Moritz Kiefer
5936644970
Bump windows cache (#7212)
changelog_begin
changelog_end
2020-08-24 18:19:28 +02:00
azure-pipelines[bot]
6dd542c2be
update compat versions for 1.5.0-snapshot.20200818.5027.0.1b33d374 (#7177)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-08-19 21:42:17 +02:00
Gary Verhaegen
39d0eea39f
update compat versions for 1.4.0 (#7106)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-08-13 08:52:36 +02:00
Andreas Herrmann
f764c2f627
Support submitMustFail in DAML Script Service (#7076)
* submitMustFail test-case

* script compat test for submitMustFail

changelog_begin
changelog_end

* Support submitMustFail in DAML Script Service

Pushes handling of `submitMustFail` into the DAML script interpreter
rather than DAML script itself.

* fmt

* Simplify IdeClient.submitMustFail

* Comment on case we don't expect to hit

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-08-12 08:54:34 +00:00
Andreas Herrmann
27e7d4cf69
Update rules_haskell (#7077)
* Update rules_haskell

Removes the warning about Bazel 3.3.1 being too recent.

* Remove unused rules_haskell patch

changelog_begin
changelog_end

* fmt

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-08-11 10:14:56 +00:00
Stephen Compall
96624a7677
use -Ywarn-unused for all Scala code (#6907)
* add -Ywarn-unused to all scalac options

* remove some unused arguments

* remove some unused definitions

* remove some unused variable names

* suppress some unused variable names

* changeExtension doesn't use baseName

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* work around no plugins in scenario interpreter perf tests

* remove many more unused things

* remove more unused things, restore some used things

* remove more unused things, restore a couple signature mistakes

* missed import

* unused argument

* remove more unused loggingContexts

* some unused code in triggers

* some unused code in sandbox and kvutils

* some unused code in repl-service and daml-script

* some unused code in bindings-rxjava tests

* some unused code in triggers runner

* more comments on silent usages

- suggested by @cocreature; thanks

* fix missing reference in TestCommands

* more unused in triggers

* more unused in sandbox

* more unused in daml-script

* more unused in ledger-client tests

* more unused in triggers

* more unused in kvutils

* more unused in daml-script

* more unused in sandbox

* remove unused in ledger-api-test-tool

* suppress final special case for codegen unused warnings

.../com/daml/sample/mymain/ContractIdNT.scala:24: warning: parameter value ev 0 in method ContractIdNT Value is never used
      implicit def `ContractIdNT Value`[a_a1dk](implicit `ev 0`: ` lfdomainapi`.Value[a_a1dk]): ` lfdomainapi`.Value[_root_.com.daml.sample.MyMain.ContractIdNT[a_a1dk]] = {
                                                         ^
.../com/daml/sample/mymain/ContractIdNT.scala:41: warning: parameter value eva_a1dk in method ContractIdNT LfEncodable is never used
      implicit def `ContractIdNT LfEncodable`[a_a1dk](implicit eva_a1dk: ` lfdomainapi`.encoding.LfEncodable[a_a1dk]): ` lfdomainapi`.encoding.LfEncodable[_root_.com.daml.sample.MyMain.ContractIdNT[a_a1dk]] = {
                                                               ^

* one more unused in daml-script

* special scaladoc rules may need silencer, too

* unused in compatibility/sandbox-migration

* more commas, a different way to `find`

- suggested by @remyhaemmerle-da; thanks
2020-08-07 13:16:09 -04:00
Gary Verhaegen
8b089f5689
remove clean expunge (#7061)
All nodes have been reset following #7056.

CHANGELOG_BEGIN
CHANGELOG_END
2020-08-07 14:11:02 +02:00
Moritz Kiefer
31c2ce0220
Bump Windows cache (#7056)
The "output was not created" errors seem to have become very
frequent. While taking out nodes seems to work as a bandaid, I’d like
to see if resetting the cache buys us a few days of not having to deal
with this. Admittedly, I don’t really have an explanation for why
resetting the cache should help if taking out the machines seems to do
something (suggesting that it hasn’t propagated fully).

changelog_begin
changelog_end
2020-08-07 09:05:32 +00:00
Moritz Kiefer
b945b305bb
Add mirrors when fetching ledger-api-test-tool (#7041)
Not quite sure if this will help but I’ve only seen checksum
mismatches here and not for other Maven artifacts so worth a try at least.

changelog_begin
changelog_end
2020-08-06 14:05:17 +02:00
Andreas Herrmann
cf24597e70
Factor out reproducibility flags for tar and gzip (#6884)
* Factor out tar/gzip reproducibility flags

* use mktgz in package-app

* Bazel managed tar/gzip

* Remove quiet = True

As stated in the comment this is no longer required with Bazel >= 3.0.

* Build package-app as a sh_binary

This way Bazel will manage the runtime dependencies tar, gzip, mktgz,
and patchelf.

package-app.sh changes directory so it needs to make sure that all paths
are absolute and that the runfiles tree/manifest location is forwarded
to programs called by package-app.sh.

* Avoid file path too long errors

* Fix readlink -f on MacOS

* Document abspath

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-08-05 14:27:14 +00:00
azure-pipelines[bot]
0094ac8881
update compat versions for 1.4.0-snapshot.20200724.4812.0.818a52b0 (#6863)
CHANGELOG_BEGIN
CHANGELOG_END)

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-08-04 18:33:40 +02:00
Moritz Kiefer
6581bba285
Upgrade rules_scala (#6883)
changelog_begin
changelog_end
2020-07-28 08:53:12 +00:00
Moritz Kiefer
12c9612566
Remove redundant clean --expunge (#6890)
After the node resets this should hopefully not be necessary
anymore (we still had an issue this morning but I believe all nodes
that hit the issue also got the fix and if not, I’ll schedule a
targetted clean --expunge). I’ve also added node_modules to
.bazelignore to match the other node_modules directories.

changelog_begin
changelog_end
2020-07-28 09:49:36 +02:00
Moritz Kiefer
f588eac0c4
Fix version of @bazel/typescript (#6889)
Not quite sure why this didn’t fail on the PR but now it complains
that the version of @bazel/typescript and rules_nodejs are
incompatible.

changelog_begin
changelog_end
2020-07-28 06:40:32 +00:00
Moritz Kiefer
36a4b8a958
Upgrade rules_jvm_external (#6882)
changelog_begin
changelog_end
2020-07-27 18:50:13 +00:00
Moritz Kiefer
5668576b78
Upgrade rules-nodejs to the latest release (#6870)
changelog_begin
changelog_end
2020-07-27 16:50:23 +00:00
Moritz Kiefer
c6b417090f
Reserve 2 CPUs for daml-ledger tests (#6861)
The docs around this are somewhat unclear, see
https://docs.bazel.build/versions/master/test-encyclopedia.html#other-resources
but it does seem to do something™ and maybe it’s the right thing.

changelog_begin
changelog_end
2020-07-24 17:33:52 +02:00
Gary Verhaegen
deb7f838ea
remove clean --expunge from Windows builds (#6844)
Following #6761, all nodes have been reset, so we can get back to fast,
cached builds.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-24 03:02:49 +02:00
Andreas Herrmann
4b1438276c
Update Bazel 2.1.0 --> 3.3.1 (#6761)
* Upgrade nixpkgs revision

* Remove unused minio

It used to be used as a gateway to push the Nix cache to GCS, but has
since been replaced by nix-store-gcs-proxy.

* Update Bazel on Windows

changelog_begin
changelog_end

* Fix hlint warnings

The nixpkgs update implied an hlint update which enabled new warnings.

* Fix "Error applying patch"

Since Bazel 2.2.0 the order of generating `WORKSPACE` and `BUILD` files
and applying patches has been reversed. The allows users to define
patches to these files that will not be immediately overwritten.
However, it also means that patches on another repository's original
`WORKSPACE` file will likely become invalid.

* a948eb7255
* https://github.com/bazelbuild/bazel/issues/10681

Hint: If you're generating a patch with `git` then you can use the
following command to exclude the `WORKSPACE` file.

```
git diff ':(exclude)WORKSPACE'
```

* Update rules_nixpkgs

* nixpkgs location expansion escaping

* Drop --noincompatible_windows_native_test_wrapper

* client_server_test using sh_inline_test

client_server_test used to produce an executable shell script in form of
a text file output. However, since the removal of
`--noincompatible_windows_native_test_wrapper` this no longer works on
Windows since `.sh` files are not directly executable on Windows.

This change fixes the issue by producing the script file in a dedicated
rule and then wrapping it in a `sh_test` rule which also works on
Windows.

* daml_test using sh_inline_test

* daml_doc_test using sh_inline_test

* _daml_validate_test using sh_inline_test

* damlc_compile_test using sh_inline_test

* client_server_test find .exe on Windows

* Bump Windows cache for Bazel update

Remove `clean --expunge` after merge.

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-23 09:46:04 +02:00
azure-pipelines[bot]
9d86520a19
update compat versions for 1.4.0-snapshot.20200722.4800.0.21a16eef (#6836)
CHANGELOG_BEGIN
CHANGELOG_END)

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-07-23 08:45:16 +02:00
Gary Verhaegen
f173ea966a
remove clean --expunge (#6783)
All nodes have been restarted following #6770, let's get our Windows
nodes back to some semblance of performance.

CHANGELOG_BEGIN
CHANGELOG_END
2020-07-17 15:00:10 +00:00
Moritz Kiefer
b12a19181e
Add a --timeout option to daml ledger commands (#6774)
* Add a --timeout option to `daml ledger` commands

At least in the compatibility tests, we see timeouts fairly regularly
in the tests for fetch-dar. If we see those timeouts in the tests, I
see no reason why our users should never see that especially on
actually distributed ledgers and hardcoded timeouts are a bad idea
anyway so now they are configurable.

I’ve also changed the timeout for the fetch tests (those are the only
once I’ve seen timeout) to 120s.

changelog_begin

- [DAML Assistant] The `daml ledger` commands now accept a `--timeout`
  option which can be used to change the timeout for API requests from
  the default of 30s.

changelog_end

* Generate parties as uuids to avoid collisions

changelog_begin
changelog_end

* Match on Deadline Exceeded as well

changelog_begin
changelog_end

* Update compatibility/bazel_tools/test_utils/DA/Test/Util.hs

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Update daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* Add some docs

changelog_begin
changelog_end

* Better version checks

changelog_begin
changelog_end

* fix imports

changelog_begin
changelog_end

* This is not how you exception

changelog_begin
changelog_end

* Update daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-07-17 16:35:55 +02:00
Moritz Kiefer
96216557ab
Undo lodash hack (#6771)
lodash released a non-broken version now and while dependabot isn’t
smart enough to realize this one has a vulnerability it still seems
like a good idea to bump it.

changelog_begin
changelog_end
2020-07-17 12:01:23 +00:00
Moritz Kiefer
147a2700c0
Bump Windows cache (#6770)
To “fix” the “output was not created” errors.

changelog_begin
changelog_end
2020-07-17 12:41:10 +02:00
azure-pipelines[bot]
f9b3957e81
update compat versions for 1.3.0 (#6754)
* update compat versions for 1.3.0

CHANGELOG_BEGIN
CHANGELOG_END)

* fix sandbox-migration for new LedgerIdRequirement

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2020-07-16 16:03:03 +02:00
Moritz Kiefer
d6e5862645
Add platform-version field to daml.yaml (#6736)
* Add `platform-version` field to `daml.yaml`

This PR adds the `platform-version` field to `daml.yaml`. Based on the
approach agreed upon in #6558, the logic for this all sits in
`daml-helper` and there are no changes to the assistant.

The details of how the logic work are in a comment so I’m not going to
repeat them here but the commands that are affected are:

- `daml sandbox`
- `daml sandbox-classic`
- `daml json-api`
- `daml start` (but only for sandbox and the JSON API, not for
  Navigator or anything else)

For tests, I’ve added a test to the compat workspace that installs two
SDKs simultaneously and tries out various combinations and verifies
that we get the correct version. Open to other ideas for testing this
but that seemed like the most sensible option that actually tests what
we run.

changelog_begin

- [DAML Assistant] You can now specify the version of Sandbox and the
  JSON API independently of your SDK version by setting
  ``platform-version`` in your ``daml.yaml``. This is useful if you
  are deploying to a ledger that is running components from a
  different SDK version. See
  https://docs.daml.com/tools/assistant.html#project-config-file-daml-yaml
  for details.

changelog_end

* Run platform-version tests

changelog_begin
changelog_end

* Fix tag globbing

changelog_begin
changelog_end

* fmt

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

* Try to fix env vars

changelog_begin
changelog_end

* Remove hardcoded references to 1.2.0

changelog_begin
changelog_end

* Rephrase doc comment

changelog_begin
changelog_end

* get things to compile

changelog_begin
changelog_end

* maybe fix things for realz

changelog_begin
changelog_end

* Remove debugging output

changelog_begin
changelog_end

* Get angry at windows

changelog_begin
changelog_end

* why is windows

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2020-07-15 16:30:01 +02:00
Moritz Kiefer
1db47df441
Bump migration timeout in compat tests (#6697)
With the increasing number of snapshots we sometimes hit the 300s timeout.

changelog_begin
changelog_end
2020-07-10 22:20:54 +02:00
Andreas Herrmann
cddb5e30ab
Remove unused with-packages-wrapper (#6693)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-07-10 16:02:01 +00:00