Commit Graph

514 Commits

Author SHA1 Message Date
Brian Healey
bb89f369c0
revert to use synopsys detect 7.1.0 (#12155)
* revert to use synopsys detect 7.1.0 run-full-compat: true

CHANGELOG_BEGIN
CHANGELOG_END

* run on branch run full compat

run-full-compat: true

* run on branch run full compat

run-full-compat: true

* revert changes to run branch
2021-12-15 14:39:28 -05:00
Robin Krom
5af58a1652
interfaces: doc generation for interface methods (#12096)
This adds documentation generation for interface choices and methods.

CHANGELOG_BEGIN
CHANGELOG_END
2021-12-15 13:57:09 +00:00
Sofia Faro
d1fb5e442c
interfaces: Implement 'requires' syntax (#12105)
* interfaces: Implement 'requires' syntax

part of: https://github.com/digital-asset/daml/issues/11978

ghc counterpart: https://github.com/digital-asset/ghc/pull/92

changelog_begin
changelog_end

* .

* ...

* ...

* ....

* ....

* update bazel-haskell-deps

* use requires syntax in tests

* .......

* .......

* update bazel-haskell-deps

* update InterfaceDesugared

* .........

* update bazel-haskell-deps

* ...........

* update bazel-haskell-depos

* update compile.yml

* update bazel-haskell-deps
2021-12-14 12:19:52 +00:00
Moritz Kiefer
346fecbb03
Publish damlc tarball cross-platform (#12103)
For now, I’ve emitted Windows since this is not an artifact we want to
publish externally and for Canton Linux & MacOS covers our usecases.

changelog_begin
changelog_end
2021-12-10 12:11:45 +00:00
Moisés Ackerman
0298ed3a21
Exercise interface (#12066)
* Define HasExerciseGuarded class

* Pass predicate to UExerciseInterface primitive

* Update InterfaceDesugared test file

* Add InterfaceGuarded test file

changelog_begin
changelog_end
2021-12-10 12:10:15 +00:00
Gary Verhaegen
255cdd178a
notify_user: wait for independence test (#12077)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-09 15:19:47 +00:00
Moritz Kiefer
0a17087b99
Publish split-release artifacts more granularly (#12072)
This publishes damlc & the Daml libraries as standalone artifacts so
Canton can avoid downloading the whole SDK tarball (hopefully).

changelog_begin
changelog_end
2021-12-09 13:45:58 +01:00
Sofia Faro
51cb552b79
Add typerep argument in UExerciseInterface call from daml (#11959)
changelog_begin
changelog_end
2021-12-08 13:25:45 +01:00
Moisés Ackerman
8df9a42f29
Interface desugaring cont. (#11964)
* Move toInterfaceContractId and fromInterfaceContractId out of Implements class

* Split Implements class into single-method classes

* Define toInterface outside its class to swap type arguments

This allows users to call 'toInterface @Interface', since the type of the template can usually be inferred

* Move interface classes and functions to DA.Internal.Interface

changelog_begin
changelog_end
2021-12-07 13:56:57 +01:00
Moritz Kiefer
5a019eaaa6
Split release process (PoC) (#11991)
* Split release process (PoC)

This PR adds the necessary infrastructure for the new split release
process. Releases are still triggered via the LATEST file but you can
choose between the old and the new release process by adding
SPLIT-RELEASE at the end of the line.

As a first step this publishes all artifacts we currently publish to
Github releases to our GCP bucket.

changelog_begin
changelog_end

* drop report-start

changelog_begin
changelog_end

* fix gcp bucket

changelog_begin
changelog_end

* review feedback

changelog_begin
changelog_end

* Update azure-pipelines.yml

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

* SPLIT-RELEASE ->SPLIT_RELEASE

changelog_begin
changelog_end

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
2021-12-06 19:25:00 +01:00
nicu-da
383e251e88
[kvutils] - Rename expire_at to prunable_from for clarity [KVL-1199] (#11960)
changelog_begin
changelog_end
2021-12-06 00:02:26 -08:00
Moisés Ackerman
ad77eed798
Move method interfaceTypeRep to its own class (#11940)
changelog_begin
changelog_end
2021-12-04 15:33:58 +00:00
Moisés Ackerman
0b79d8ae7c
Deprecate 'controller ... can' syntax (#11363)
Closes #11317

* Add warning for uses of 'controller ... can' syntax

* Remove uses of 'controller ... can' syntax

* Add test cases for -W{,no-}controller-can

* Update docs to reflect 'controller ... can' syntax deprecation

changelog_begin
* Deprecate 'controller ... can' syntax.
  * It will be removed in a future version of Daml.
  * Instead, use 'choice ... with ... controller' syntax. Note that this does not implictly add the controller as an observer, so it must be added explictly as one (or as a signatory).
changelog_end
2021-12-01 13:36:04 +01:00
Moisés Ackerman
683ab87143
Move ghc-lib{,-parser} to bazel-haskell-deps (#11775)
* Move ghc-lib{,-parser} to bazel-haskell-deps

changelog_begin
changelog_end

* Always show changes to bazel-haskell-deps.bzl
2021-11-30 18:11:33 +00:00
Gary Verhaegen
4e50060021
self-service compat: set branch name to not main (#11902)
The "tell slack about failures" step is conditional on the branch name
being main; for whatever reason if we don't supply a branch name Azure
sets it to `main`, regardless of the fact that the commit is not in that
branch at all.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 16:50:53 +00:00
Gary Verhaegen
a81995c82e
switch dev images to Temurin (#11895)
The AdoptOpenJDK project has been renamed to Adoptium so they renamed
the adoptopenjdk images to Temurin.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 14:45:35 +00:00
Moritz Kiefer
68a23436e8
Only run self-service compat job on PRs (#11893)
This is currently failing for the notice file update PR. While we
could try to hack around the git commands to do something sensible, I
don’t really see the point. We really only need this for PRs.

changelog_begin
changelog_end
2021-11-26 10:26:21 +01:00
Gary Verhaegen
dbda67ba81
bump JVM in Docker image (#11883)
Please don't depend on this, it breaks all the time.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-25 18:08:38 +01:00
Gary Verhaegen
b8937ad81b
ci: self-service compat test start (#11853)
It should now be possible for anyone to trigger the daily compat build
by adding a `run-full-compat: true` trailer to their commit message.

CHANGELOG_BEGIN
CHANGELOG_END

run-full-compat: true
2021-11-24 18:05:04 +00:00
Moritz Kiefer
32e9c4b13a
Bump go rules (#11829)
* Bump go rules

Was debugging something else and this seemed simple enough to factor
it out.

changelog_begin
changelog_end

* Bump Bazel on Windows

changelog_begin
changelog_end

* bump bazel manifest

changelog_begin
changelog_end
2021-11-23 18:58:55 +00:00
Moisés Ackerman
d23d113667
Restructure interface desugaring (#11555)
* Update ghc patch

* Replace Implements proxy datatype with a class

* Expose 'Implements' class in Prelude

* Add DA.Internal.Desugar.HasMethod class

This allows us to get the type of a method of an interface through the functional dependency

* Convert interfaces from new desugaring

* Update Interface daml-test-file to use Interface class functions

* Update InterfaceDesugared daml-test-file

* Replace remaining uses of Is<Interface> methods with Implements

* Document HasMethod, Method and mkMethod

* Ignore _method_ bindings in convertBind

* Ignore interface desugaring types/classes/instances/functions in LF conversion

* update snapshot after pin on windows

changelog_begin
changelog_end
2021-11-19 10:06:49 +01:00
Moritz Kiefer
91b4fb9acf
Backport: Skip protobuf compatibility check for PRs to non-main (#11772)
Backport from #11770

changelog_begin
changelog_end

Co-authored-by: Nicu Reut <nicu.reut@digitalasset.com>
2021-11-18 14:33:45 +00:00
Moritz Kiefer
a3556a57ae
Retry release signature checks (#11771)
changelog_begin
changelog_end
2021-11-18 14:09:42 +00:00
Moritz Kiefer
bb19c0de91
Drop Scala 2.12 support (#11619)
* Drop Scala 2.12 support

This only includes the CI/build system infrastructure
changes. Dropping compatibility layers from our code for 2.12 can be
done separately.

This is fine even in the context of backport builds since we already
disable the Scala 2.12 job for those anyway.

fixes #11315

changelog_begin
changelog_end

* Update bazel-java-deps.bzl

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>

Co-authored-by: pbatko-da <pawel.batko@digitalasset.com>
2021-11-17 18:38:43 +01:00
Moritz Kiefer
d3bb036591
Fix sandbox database config in script & trigger tests (#11655)
* Fix sandbox database config in script & trigger tests

Setting jdbcUrl does absolutely nothing because it later gets
overwritten again.

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-12 06:18:12 +00:00
Moritz Kiefer
cf445b2e73
Skip platform independence tests on release PRs (#11631)
* Skip platform independence tests on release PRs

changelog_begin
changelog_end

* yaml that shit

changelog_begin
changelog_end
2021-11-10 12:55:33 +00:00
Moisés Ackerman
cfd521ff86
Fix GHC build errors on macOS (#11560)
changelog_begin
changelog_end
2021-11-09 14:42:52 +01:00
Robin Krom
af1bee7b82
precondition lf conversion (#11538)
* interfaces: lf conversion of preconditions

This adds the LF conversion of preconditions from the desugared GHC code
to Daml LF for preconditions. This depends on the corresponding patch of
the GHC fork.

CHANGELOG_BEGIN
CHANGELOG_END

* pin linux stackage snapshot

* added a test

CHANGELOG_BEGIN
CHANGELOG_END

* pinned linux stackage snapshot

CHANGELOG_BEGIN
CHANGELOG_END

* additional InterfacePrecondition test

this checks that that conjunction of all preconditions of intererfaces
and templates is checked.

CHANGELOG_BEGIN
CHANGELOG_END

* pin stackage snapshot

* pin windows stackage snapshot

* update compile.yml (again)

* pin linux stack snapshot

* fix InterfacePrecondition test

* pin windows stackage
2021-11-09 11:43:46 +00:00
Moisés Ackerman
7d68e05f7f
Remove virtual choices (#11482)
* Remove virtual choices

* Remove choices without a body in 'interface' definition
* Remove choices in 'template ... implements' section

part of #11372

changelog_begin
changelog_end

* Remove virtual choices cont.

Switch uses of virtual choices to fixed choice with method implementation

* update snapshot after pin on windows

* Disable failing interface tests with TODO #10810
2021-11-08 17:05:23 +01:00
Hubert Slojewski
9e045c105b
Remove a leftover from check-protobuf-stability.sh (#11513)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-02 17:11:17 +00:00
Gary Verhaegen
79505b5474
oracle debug (#11386)
Collect Oracle logs for further debugging.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-01 12:19:01 +01:00
Robert Autenrieth
927b2378c3
Make Oracle tests exclusive (#11408)
* Make Oracle tests exclusive

This attempts to solve connection timeouts we often see in tests.

changelog_begin
changelog_end

* Revert "Make Oracle tests exclusive"

This reverts commit 7804c433b3476542fc156cad9d4da4755740b123.

* Run all Oracle tests sequentially
2021-10-27 16:01:00 +02:00
Robin Krom
12e782b1ea
ifaces: update ghc-parser (#11383)
* ifaces: update ghc-parser

This updates the ghc-parser, including the `ifaceTypeRep` method
generation for interfaces.

CHANGELOG_BEGIN
CHANGELOG_END

* pin stack snapshot on unix

* add tests

* update ghc-lib hash

* pin stackage dependencies on unix

* pinned stackage windows
2021-10-27 11:29:22 +00:00
Sofia Faro
76eb1657d2
Interface fixed choices: ghc parser (#11275)
* Interface fixed choices: ghc parser

(WIP)

changelog_begin
changelog_end

* .

* ..

* ...

* stackage unpin unix

* ...

* fold create/observer/signatory into fake lfconversion primitives

* stackage unpin

* .....

* ......

* ........

* .........

* . . . . .

* unpin stackage on unix

* ...... ......

* ...

* . . . . .

* unpin stackage on unix

* . . . . . . . . .

* unpin stackage on unix

* Loosen restriction on ETo/FromAnyChoice fake primitives

* uncomment exercise in Interface.daml

* remove comments

* !!!

* the final re-pinning, part 1

* the final re-pinning: part 2
2021-10-20 17:45:13 +00:00
Samir Talwar
139b6f3b9e
CI: Set PROJ_DIR inside the bash lib, not outside. (#11236)
* CI: Set `PROJ_DIR` inside the bash lib, not outside.

We can't reference variables set outside.

CHANGELOG_BEGIN
CHANGELOG_END

* CI: Remove an unnecessary `export`.
2021-10-13 14:55:20 +02:00
Robert Autenrieth
66adbc0366
DPP-463 switch conformance tests to append only (#11101)
* Use append-only schema in tests

changelog_begin
changelog_end

* Fix Oracle build

* Update ledger/ledger-on-memory/BUILD.bazel

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>

* Run more conformance tests on append-only

* Run pruning tests in split-participant mode

* Disable multi-participant test in split participant

* Add missing ContractIdIT test

Co-authored-by: tudor-da <tudor.voicu@digitalasset.com>
2021-10-11 23:31:30 +02:00
Robin Krom
3115d104aa
daml script interfaces (#11124)
* interfaces: introduce TemplateOrInterface class in stdlib

The template typeclass is to strong for many applications. The new
constraint `TemplateOrInterface` only contains the methods to convert
contract IDs and choices.

CHANGELOG_BEGIN
CHANGELOG_END

* ghc-lib update, interface script tests

* pinned stackage on unix

* added missing implementation in preprocessor

* added test

* fixing tests

* remove Iface type

* pinned stackage windows

* make sure createAndExercise is not called on interfaces
2021-10-11 18:22:40 +02:00
nicu-da
5abedac9ab
Check the commit message to skip the compatibility check [KVL-1111] (#11162)
* Check the commit message to skip the compatibility check

CHANGELOG_BEGIN

CHANGELOG_END

* Use git trailers to skip the check conditionally
2021-10-08 02:18:36 -07:00
Samir Talwar
d3810af47e
CI: Upgrade Nix. (#11173)
Inspired by seeing `curl` TLS errors in a different repository's CI.

I don't know if this will help, but it's worth a try. Note that the
domain name has changed.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-08 09:13:50 +00:00
Gary Verhaegen
fcd4549569
test release rotation: factor out selection (#11161)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-07 12:46:55 +00:00
nicu-da
a3b90499fd
Check proto compatiblity with target head for PRs [KVL-1110] (#11123)
* Add the ability to check protobuf compatibility with the branch head alongside the latest release tag.

CHANGELOG_BEGIN
CI - add check to PR for protobuf breaking changes against the target branch head
CHANGELOG_END
2021-10-07 08:55:38 +00:00
Stefano Baghino
265e36255c
Add a notice to the release testing rotation file (#11142)
Reminds people adding new users to the rotation that they should also
be added to DACH-NY/daml-language-ad-hoc to have a box in the cloud
for Windows testing.

Adds the possibility of adding comments at the beginning of the rotation file.

changelog_begin
changelog_end
2021-10-06 21:08:11 +00:00
Remy
9cffa1faf6
LF: check LF transaction protobuf aginst local snapshots (#11064)
instead of last stable branch.

CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 20:10:41 +02:00
Remy
37d94aaef6
Add unit for daily performance tests (#11107)
CHANGELOG_BEGIN
CHANGELOG_END
2021-10-04 13:00:38 +02:00
Robin Krom
9fd6326ae7
interfaces: consuming/non-consuming iface choices (#11009)
* interfaces: consuming/non-consuming iface choices

We add the consumption behaviour to the interface choice definition and
typecheck accordingly.

CHANGELOG_BEGIN
CHANGELOG_END

update to new ghc-lib, conversion implementation

* update ghc-lib

* pinning stackage on unix

* pin stackage on windows
2021-09-30 15:56:28 +00:00
Gary Verhaegen
6ae3afa8fb
fix perf reporting (#11073)
CHANGELOG_BEGIN
CHANGELOG_END
2021-09-29 17:39:46 +00:00
Gary Verhaegen
12e0c72d5c
fix blackduck logic (#11049)
We believe the Blakduck logic is currently faulty. We have had a
violation on an NPM dependency, and Blackduck keeps reporting it despite
our having removed the dependency.

We believe that what is happening is that, in the first step of
checking, we udpate the Haskell dependencies, _and then check the
validity of the whole project_, which includes the NPM deps. Because
that fails, we never get to the step where we actually update the NPM
deps, and Blackduck is stuck forever.

The solution is to not fail on violations for the Haskell update steps.
Haskell deps are still checked in the second step, because, again, it is
checking the whole project.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-28 14:28:19 +00:00
Gary Verhaegen
59ad995282
fix buf check (#11014)
`SYSTEM_PULLREQUEST_TARGETBRANCH` is not defined on main builds.

CHANGELOG_BEGIN
CHANGELOG_END
2021-09-24 10:23:48 +02:00
fabiotudone-da
f5d2135f97
Check protobuf compatibility of main and PR commits w.r.t. previous stable release [KVL-1109] (#10950)
* Check protobuf compatibility of release commits w.r.t. previous stable release

CHANGELOG_BEGIN
CHANGELOG_END

* Remove blank line

* Don't persist credentials

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

* check-protobuf-against-stable.sh: SRC_DIR -> PROJECT ROOT + simplify

* Don't set LATEST_STABLE global in a function

* Simplify by using only the main work tree

* Simplify further as the check will be only run from `main`

* Move the check to `ci/build.yml` so that it is also run on PRs

* Enter the development environment to use tools

* Make variables read-only

* Support release branches and PRs targeting them

* Fix and document the reference tag finding logic

* Fix SYSTEM_PULLREQUEST_TARGETBRANCH and print it

* Don't log the source branch

* Fix comment formatting

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

* Enable Slack integration

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

* Don't check if the branch is a release one

...as the check won't be run on release branches.

* Add compatibility_stable_protobuf to collect_build_data

* Do not activate dev-env globally but only in sub-shells

* Add an explanation about why the check is not run on release branch commits

* Simplify further by leveraging `buf`'s ability to compare against branches

* Use `buf`'s `tag` locator instead of `branch`

* Split buf checks by module and remove previous manual check

* Explain how to run locally

* Use more future-proof WIRE_JSON for participant-integration-api

Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>

* Use stricter FILE for the ledger gRPC API

* Propose an explanation for WIRE in kvutils

* Fix comment typo

* Re-introduce linting configuration for kvutils

* Simplify explanation for KVUtils' breaking check rule

* Remove extra (C) header from 3rd-party proto

* Don't touch the copyright of google/rpc/status.proto

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Simon Meier <meiersi-da@users.noreply.github.com>
2021-09-23 15:50:33 +00:00
akshayshirahatti-da
721575ea73
[JSON-API] Postgres perf job (#10986)
* Addition of a postgres perf job

CHANGELOG_BEGIN
CHANGELOG_END

* use a single job with strategy matrix

* cleanup test job from main pipeline
2021-09-23 09:16:58 +01:00