Commit Graph

8706 Commits

Author SHA1 Message Date
Gerolf Seitz
be7e377d79
Release 1.17.2-snapshot.20211124.7857.0.b33b94b8 (#11953)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-02 10:22:48 +00:00
mziolekda
96f0f4f63f
Introduce better TLS version tests (#11950)
CHANGELOG_BEGIN
CHANGELOG_END
2021-12-02 11:00:39 +01:00
Robin Krom
20d1b95fe2
docs: support for interface implementations (#11643)
* docs: support for interface implementations

This produces documentation for interface implementations of templates.

CHANGELOG_BEGIN
CHANGELOG_END

* Update compiler/damlc/daml-doc/src/DA/Daml/Doc/Render/Output.hs

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>

* add check for modulename for implementations

CHANGELOG_BEGIN
CHANGELOG_END

* added golden tests to daml-test-files

Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
2021-12-02 09:51:41 +00:00
Moritz Kiefer
cf110a4bbf
Only run ledger API test tool compat tests between stable releases (#11954)
We break things way too frequently between releases so the exclusions
are a huge mess with little benefit.

changelog_begin
changelog_end
2021-12-02 09:34:20 +00:00
azure-pipelines[bot]
7ddcc3274a
update NOTICES file (#11952)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-12-02 08:39:48 +01:00
Sofia Faro
81e27a9442
Add some predicates in DA.Set (#11947)
I noticed we didn't have a "subset" function in DA.Set when Oliver
showed me some daml test code that had to define it manually. So I
decided to add it, and a couple more predicates.

changelog_begin
changelog_end
2021-12-01 17:22:52 +00:00
nickchapman-da
a1db59f40f
Stack safe free-vars computation. (#11946)
* Adding missing stack-safety testcase for SEScopeExcerise.

changelog_begin
changelog_end

* run all testcases at depth of 10,000. This is plenty deep enough to ensure stack-safety

* recode free-vars computation to be stack-safe. and test
2021-12-01 17:06:57 +00:00
Robert Autenrieth
422493e1c5
Fix ACS parametrization (#11942)
changelog_begin
changelog_end
2021-12-01 17:27:24 +01:00
Robert Autenrieth
bc8dff1878
DPP-738 Increase 2-phase retrieval merge function unit test coverage (#11939)
* Add unit tests for ACSReader helpers

changelog_begin
changelog_end

* Validate ACSReader helper parameters

* fmt
2021-12-01 17:27:14 +01:00
nicu-da
ad5e26a8a2
kvutils - Add expire_at for command deduplication state values [KVL-1199] (#11931)
changelog_begin
changelog_end
2021-12-01 08:17:22 -08:00
Moritz Kiefer
0eb88d6589
Drop outdated fixme comment about struct ordering (#11945)
This has been fixed over a year ago in #7319

changelog_begin
changelog_end
2021-12-01 14:02:46 +00:00
azure-pipelines[bot]
614da7b734
rotate release duty after 2.0.0-snapshot.20211130.8536.0.683ab871 (#11935)
@SamirTalwar-DA is taking care of 2.0.0-snapshot.20211130.8536.0.683ab871 (#11934), so they get pushed back to the end of the line.

Please do not merge this before #11934.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2021-12-01 14:03:48 +01: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
nicu-da
bf239882f0
Update nix to include bazel fix for Monterey (#11929)
changelog_begin
changelog_end
2021-12-01 04:01:46 -08:00
Moritz Kiefer
bbef7e3a8e
Only run migration tests for stable versions on each PR (#11938)
* Only run migration tests for stable versions on each PR

The ones that also go through snapshots are still there but only run
on the daily run.

The reason for this PR is that we’ve actually gotten damlc tests
pretty fast now to the point where I’m waiting for the compat tests to
finish on PRs that don’t force conformance test reruns.

changelog_begin
changelog_end

* actually use it …

changelog_begin
changelog_end
2021-12-01 11:00:25 +00:00
Moritz Kiefer
8179c73763
Drop support for Daml-LF party literals from the Scala side (#11922)
* Drop support for Daml-LF party literals from the Scala side

This PR enforces that forbidPartyLiterals is always `true` and drops
the corresponding literals from the AST. Haskell side is in #11930

fixes #11581

changelog_begin
changelog_end

* Update daml-lf/interpreter/src/test/scala/com/digitalasset/daml/lf/speedy/ComparisonSBuiltinTest.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

* Revert "Update daml-lf/interpreter/src/test/scala/com/digitalasset/daml/lf/speedy/ComparisonSBuiltinTest.scala"

This reverts commit 55e542ce4e3a7fd15544ee703de3277ffc309b17.

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-12-01 10:37:42 +00:00
azure-pipelines[bot]
18dc85680a
release 2.0.0-snapshot.20211130.8536.0.683ab871 (#11934)
* release 2.0.0-snapshot.20211130.8536.0.683ab871

This PR has been created by a script, which is not very smart
and does not have all the context. Please do double-check that
the version prefix is correct before merging.

@SamirTalwar-DA is in charge of this release.

Commit log:
```
683ab87143 Move ghc-lib{,-parser} to bazel-haskell-deps (#11775)
9350632eae Fix releasing of resources in case connection initialization failed (#11915)
e1559af313 Update `ModelConformanceValidator` comments and prevent them from getting outdated easily (#11924)
16a41f7da2 Avoid package validation in speedy compilation benchmark. (#11927)
16135e6f7c Limit supported input versions in damlc to >= LF 1.8 (#11905)
0ee4154972 Use Absolute-indexes as keys for the Env-mapping during closure-conversion (#11912)
1d7bca801e Add optional typerep argument in UExerciseInterface. (#11910)
c2c22f8dea kvutils: Protos no longer depend on the Daml-LF transaction proto [KVL-1166] (#11909)
5641948410 [Docs] Add labels to error codes to support references to them (#11913)
0e776769ee Update protobuf docs template to handle oneOf (#11887)
5a9481f9d8 unify heading markup according to README.md (#11919)
61334cff77 kvutils - Add Writer which can handle deduplication periods as offsets [KVL-1172] (#11900)
0b9d57b95e Add ContractDoesntImplementInterface error. (#11884)
49e5d415f6 align index.rst files for HTML and PDF (#11907)
dbbb05fe2e Split daml-lf encode/decode Haskell libraries (#11906)
e5d3902372 iface: support for fixed choices in TS codegen (#11630)
31cc540cf9 Turn package name & version warnings into an error (#11859)
4e50060021 self-service compat: set branch name to not main (#11902)
2f4aa4797e refactor to avoid impossible code path (#11901)
a81995c82e switch dev images to Temurin (#11895)
f3a0e2eba1 Set scalafmt dialect explicitly (#11898)
60e372dcd2 Don't run pruning tests on H2, they time-out (#11897)
58e69ade1a LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
8ef348dab0 Use absolute stack locations in SExpr1 (#11877)
071bcf7639 update NOTICES file (#11892)
a1705d669a participant-state - Add an implicit logging context to the write service [kvl-1072] (#11838)
9ff64f7faa Change daml script’s sleep to sleep for a minimum amount of time (#11886)
132c277bda Add a Canton sandbox to the SDK (#11881)
68a23436e8 Only run self-service compat job on PRs (#11893)
c27406cdcf [DPP-762][Self-service error codes] Automate generation of inventory of error categories. #11879
13797229cf Adapt the compatibility exclusions (#11872)
d66ecc90c9 LF: Drop Archive Snapshot for LF < 1.14 (#11820)
abc141b57e Increase pruning tests timeout (#11891)
66b407467f Update protobuf docs plugin (#11880)
b0dda53868 LF check stable proto with buf and md5sum. (#11888)
056fc52706 Log while processing base64 encoded server key [DPP-761] (#11835)
dbda67ba81 bump JVM in Docker image (#11883)
f69bd688cc ledger-api-bench-tool: Fix flaky `MetricsCollectorSpec` (#11750)
cb758e8d91 Fix call to experimental interface signatory builtin (#11882)
024400b9e4 Error when fetching the wrong template id (via fetch by interface). (#11862)
0852c8f6fa Make DA.List.Total return Optional instead (#11878)
df373466dc [JSON-API] Add query store metrics (#11809)
2f8f69e7cb Drop DA.Next.Set and DA.Next.Map (#11864)
5f3a4d2067 [Self-service error codes] Fix section numbering in pdf for error codes section by moving it a level higher. (#11867)
cf3ac011ca [Self-service error codes] Do not return error code id and definite_answer in metadata for security sensitive errors (#11828)
026b92a8b1 Add gRPC definitions for participant user management service (#11818)
2fde30d916 Disable writing volatile bits in Scala statsfile (#11875)
4ed9deda39 Remove xxd from dev-env (#11876)
eaded41aca remove mergify (#11866)
3cd5028b61 fix a few more things in the daml-lf spec (#11851)
beca0ee3e9 Refactor StandaloneApiServer factory (#11842)
6356f13cde Properly upgrade gRPC to 1.41.0 (#11858)
f6accd3a2f Release 1.18 RC2 (#11869)
d858873c44 fix main (#11868)
da8dd7ee2f rotate release duty after 1.18.0-snapshot.20211123.8463.0.bd2a6852 (#11845)
066da4f30c [Self-service error codes] Small fixes for docs/scripts/live-preview.sh (#11856)
258fb65d1c Document how to deal with HTTP JSON API schema changes (#11336)
b8937ad81b ci: self-service compat test start (#11853)
de8d15fb1e fix Nix install on macOS nodes (#11696)
b3d1d40b50 Expose submissionId via the Java bindings (#11839) (#11847)
86da6e8eef LF: Test scala interface type checking (#11833)
5f52f00afb increase linux cluster size (#11860)
5c12d757f4 Add a guard when exercising by interface. (#11836)
7c3a2a7801 Add a new KV submission failure error (#11854)
aebc5a734f All packages must be valid (#11850)
0374843143 speedy compilation benchmark (#11852)
393893a601 LF encoder: make package validation optional (#11849)
25b476fdb2 DPP-726 Add string interning unit tests (#11841)
59eb0d2eff kvutils - For duplicate command rejections, add the submission id as metadata [KVL-1175] (#11848)
970243dd46 Ensure stack-safety during closure-conversion. (#11778)
e63c80dddd update LATEST (#11846)
db425216d1 libs-scala: Change `SourceQueueResourceOwner` to `BoundedSourceQueueResourceOwner` [KVL-1177] (#11832)
109b60613c Make the `InstrumentedSource.queue` use the `BoundedSourceQueue` [KVL-1177] (#11807)
```
Changelog:
```

- [Daml Compiler] The supported input LF versions for
  data-dependencies are now limited to LF 1.8 and newer.

- [Daml2js] DARs with LF version < 1.8 are no longer supported.

- [Integration Kit] kvutils protos no longer depend on the Daml-LF transaction proto

- [Daml Standard Library] DA.List.Total functions now return Optional
  instead of being polymorphic in the return type. DA.Optional.Total
  has been removed.

- [JSON-API] added metrics to separately track:
    - time taken to update query-store ACS (from ledger)
    - lookup times for the query store

- [Daml Standard Library] DA.Next.Map and DA.Next.Set have been removed
  after being deprecated since Daml-LF 1.11

- [Ledger API] Introduce gRPC definitions for experimental user
  managament service to manage users and their rights for interacting
  with the Ledger API served by a participant node.

[HTTP JSON API] [Docs] Document lack of data continuity guarantees and how to deal with schema changes
[Java Bindings] submissionId is now exposed via the bindings, see issue #11705
[Integration Kit] Add a new SUBMISSION_FAILED internal error
kvutils - For duplicate command rejections, the submission id of the already accepted transaction is returning as part of the gRPC metadata. The submission id will be included under the key `existing_submission_id`.

- [Integration Kit] `SourceQueueResourceOwner` has been renamed to `BoundedSourceQueueResourceOwner` and takes a `BoundedSourceQueue` from now on

- [Integration Kit] InstrumentedSource.queue.offer no longer returns a Future

```

CHANGELOG_BEGIN
CHANGELOG_END

* bump to include fix for damlc package validation

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-12-01 11:26:59 +01:00
Moritz Kiefer
cf172619e5
Drop support for Daml-LF party literals-LF from the Haskell side (#11930)
This PR enforces that forbidPartyLiterals is always `true` and drops
the corresponding literals from the AST in our Haskell code. Scala
code will follow separately.

part of #11581

changelog_begin
changelog_end
2021-12-01 11:00:09 +01:00
Moritz Kiefer
1d0ff3cc71
Fix package version validation in damlc (#11937)
Currently the validation only allows for 3-component version
names. However even our own releases don’t respect that for snapshots
so instead we relax the validation to allow an arbitrary number of
numeric components which matches what ghc-pkg allows.

changelog_begin
changelog_end
2021-12-01 08:17:48 +00:00
azure-pipelines[bot]
e3aa2444aa
update NOTICES file (#11936)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-12-01 08:24:31 +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
Marton Nagy
9350632eae
Fix releasing of resources in case connection initialization failed (#11915)
Previously InitHookDataSourceProxy was not closing the connection if initialization failed,
which causing worker-locks to stuck on PostgreSQL side, preventing subsequent HA initialization.
This PR fixes by closing explicitly the connection, if initialization failed.

changelog_begin
changelog_end
2021-11-30 18:21:37 +01:00
Hubert Slojewski
e1559af313
Update ModelConformanceValidator comments and prevent them from getting outdated easily (#11924) 2021-11-30 16:54:00 +00:00
nickchapman-da
16a41f7da2
Avoid package validation in speedy compilation benchmark. (#11927)
changelog_begin
changelog_end
2021-11-30 16:50:42 +00:00
Moritz Kiefer
16135e6f7c
Limit supported input versions in damlc to >= LF 1.8 (#11905)
* Limit supported input versions in damlc to >= LF 1.8

1.8 was the version that introduced type synonyms, we really don’t
gain much by dropping more since data-dependencies mainly depends on
that. and this provides for a very natural upgrade path for users
where pretty much everyone should be able to upgrade directly to SDK
2.0 without having to go through intermediate versions.

changelog_begin

- [Daml Compiler] The supported input LF versions for
  data-dependencies are now limited to LF 1.8 and newer.

changelog_end

* fix some tests

changelog_begin
changelog_end

* Drop export 1.6 tests

changelog_begin
changelog_end

* Drop daml2js support for LF < 1.8

changelog_begin

- [Daml2js] DARs with LF version < 1.8 are no longer supported.

changelog_end

* .

changelog_begin
changelog_end

* bash is bad, stop using it

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-30 17:24:08 +01:00
nickchapman-da
0ee4154972
Use Absolute-indexes as keys for the Env-mapping during closure-conversion (#11912)
* Use Absolute-indexes as keys for the Env-mapping during closure-conversion.

Do runtime check to confirm behaviour matches the existing Relative-indexes.

changelog_begin
changelog_end

* remove quadratic shift!

remove (dev)pretty-print code
remove relative-index keys from Env-mapping
remove runtime *diff* check
increase depth for stack-safety tests

* improve/simplify indexing calculation for Env-keys
2021-11-30 16:07:17 +00:00
Sofia Faro
1d7bca801e
Add optional typerep argument in UExerciseInterface. (#11910)
* Add type rep argument for interface exercises.

(Still WIP.)

Part of #11703. Fixes the order in which errors are raised ("wrong type"
takes priority over "does not implement interface"). This PR also simplifies
ExerciseInterface by making the guard mandatory, otherwise there's too
many variations. We can revisit that later if we want.

changelog_begin
changelog_end

* haskell side

* dont throw exception in checkTemplateId

* scalafmt

* evidence security

* fix TypingSpec test
2021-11-30 15:10:33 +00:00
Hubert Slojewski
c2c22f8dea
kvutils: Protos no longer depend on the Daml-LF transaction proto [KVL-1166] (#11909)
CHANGELOG_BEGIN

- [Integration Kit] kvutils protos no longer depend on the Daml-LF transaction proto

CHANGELOG_END
2021-11-30 15:25:18 +01:00
pbatko-da
5641948410
[Docs] Add labels to error codes to support references to them (#11913)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-30 14:30:58 +01:00
Moritz Kiefer
0e776769ee
Update protobuf docs template to handle oneOf (#11887)
Builds upon #1180 to render the oneof fields a bit nicer.

Note that we also need to kill newlines in the descriptions. That’s
not an issue in the plugin but in how rst renders tables.

fixes #11761

changelog_begin
changelog_end
2021-11-30 13:22:57 +01:00
Andreas Lochbihler
5a9481f9d8
unify heading markup according to README.md (#11919)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-30 11:32:09 +01:00
nicu-da
61334cff77
kvutils - Add Writer which can handle deduplication periods as offsets [KVL-1172] (#11900)
changelog_begin
changelog_end
2021-11-29 10:28:07 -08:00
Sofia Faro
0b9d57b95e
Add ContractDoesntImplementInterface error. (#11884)
* Add a ContractDoesntImplementInterface error

Part of #10810 and #11703

changelog_begin
changelog_end

* use inside

* rename error
2021-11-29 15:54:31 +00:00
Andreas Lochbihler
49e5d415f6
align index.rst files for HTML and PDF (#11907)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-29 14:48:20 +01:00
Moritz Kiefer
dbbb05fe2e
Split daml-lf encode/decode Haskell libraries (#11906)
* Split daml-lf encode/decode Haskell libraries

I was working on limiting the supported input versions in damlc. This
requires the list of stable package ids so we can allow those to be
decoded even if they are older.

However that leads to a cyclical dependency:
To get the package ids of the stable packages, I need to encode
them. The version check is in the decoder. If those live in the same
package, I now end up with a cyclical dependency and
Bazel (understandably) gets very sad.

This PR splits decoding/encoding into two libraries with the
generation of stable packages only depending on encoding.

changelog_begin
changelog_end

* Fix dependants

changelog_begin
changelog_end
2021-11-29 12:49:02 +00:00
Robin Krom
e5d3902372
iface: support for fixed choices in TS codegen (#11630)
This adds support for fixed choices to the TS codegen. However,
currently this fails because the JSON API does not accept interface
template ID's when exercising a choice.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-29 08:07:36 +00:00
Moritz Kiefer
31cc540cf9
Turn package name & version warnings into an error (#11859)
* Turn package name & version warnings into an error

fixes #11321

changelog_begin
changelog_end

* .

changelog_begin
changelog_end
2021-11-26 18:46: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
nickchapman-da
2f4aa4797e
refactor to avoid impossible code path (#11901)
changelog_begin
changelog_end
2021-11-26 15:46:26 +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
f3a0e2eba1
Set scalafmt dialect explicitly (#11898)
Scalafmt started issuing warnings because we don’t do this since our
latest nixpkgs upgrade which included a scalafmt upgrade.

changelog_begin
changelog_end
2021-11-26 13:57:57 +00:00
mziolekda
60e372dcd2
Don't run pruning tests on H2, they time-out (#11897)
CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 13:06:03 +00:00
Remy
58e69ade1a
LF: replace "dev" LF version by "1.dev" in bazel files (#11894)
the more consistent, as asked by Moritz in review of #11820

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 12:23:17 +00:00
nickchapman-da
8ef348dab0
Use absolute stack locations in SExpr1 (#11877)
* SExpr1.SELocS - carry relBad/absGood - abs unused so far

* compute/pass SELocS.abs in ClosureConversion, and check in Anf that it matches the reconstructed value

CHANGELOG_BEGIN
CHANGELOG_END

* Remove relative stack locations. Rename as SELocAbsoluteS. Simplify Anf. Remove shiftLoc in ClosureConversion.
2021-11-26 12:10:30 +00:00
azure-pipelines[bot]
071bcf7639
update NOTICES file (#11892)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2021-11-26 11:12:28 +00:00
nicu-da
a1705d669a
participant-state - Add an implicit logging context to the write service [kvl-1072] (#11838)
changelog_begin
changelog_end
2021-11-26 11:12:17 +00:00
Moritz Kiefer
9ff64f7faa
Change daml script’s sleep to sleep for a minimum amount of time (#11886)
* Change daml script’s sleep to sleep for a minimum amount of time

We’ve seen a few flaky test failures where we slept for less than the
expected amount of time which isn’t what we want. We definitely cannot
guarantee an exact sleep time but at least a minimum.

changelog_begin
changelog_end

* Update daml-script/runner/src/main/scala/com/digitalasset/daml/lf/engine/script/ScriptF.scala

Co-authored-by: Remy <remy.haemmerle@daml.com>

Co-authored-by: Remy <remy.haemmerle@daml.com>
2021-11-26 11:12:08 +00:00
Moritz Kiefer
132c277bda
Add a Canton sandbox to the SDK (#11881)
This is only the first step so we have something to use in tests,
eventually `daml sandbox` should map to this Sandbox.

part of #11831

changelog_begin
changelog_end
2021-11-26 11:27:41 +01: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
pbatko-da
c27406cdcf
[DPP-762][Self-service error codes] Automate generation of inventory of error categories. #11879
Other changes:
- Fix ErrorCodeDocumentationGeneratorSpec not being in any bazel target.
- (partially) Fix inconsistent usage of deprecated, Deprecation and DeprecatedDocs annotation.

CHANGELOG_BEGIN
CHANGELOG_END
2021-11-26 10:22:14 +01:00