Commit Graph

10954 Commits

Author SHA1 Message Date
Carl Pulley
7635fbe83c
Test that disclosed contracts respect template/contract preconditions (i.e. ensure clauses)
* Fixes #14227

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-26 08:37:06 +01:00
azure-pipelines[bot]
0db37eca1c
update NOTICES file (#15083)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-25 13:20:34 +02:00
azure-pipelines[bot]
392cc302b0
bump canton to 20220923 (#15082)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-24 17:46:38 +02:00
Chun Lok Ling
63e8dc2c82
Contract decoder class which constructed with list of template companions (#15078)
* new ContractDecoder

* change DecoderClass to use template companion for contract decoders

* add change log

CHANGELOG_BEGIN
CHANGELOG_END

* format

* Revert "add change log"

This reverts commit 6d59829883.
2022-09-23 21:09:41 +01:00
carrielaben-da
1d58dfee2f
TOC test changes (#14741)
Removing toc duplication

[CHANGELOG_BEGIN]
[CHANGELOG_END]

Co-authored-by: carrie-laben <91496516+carrie-laben@users.noreply.github.com>
2022-09-23 14:47:21 +00:00
Remy
6dd9a45e50
[Engine] small cleaning of LookupError (#15060)
* [Engine] small cleaning of LookupError

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-23 13:46:14 +00:00
Remy
56dfeb1e87
[LF] improve AstRewriter (#15073)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-23 15:13:19 +02:00
Carl Pulley
49f2f7ef20
Bug fix for Classify class - corrects continuation and expression counts
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-23 13:26:11 +01:00
Remy
a1e92e539f
[LF] fix encoder for ELocation (#15070)
* [LF] fix encoder for ELocation

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-23 10:28:21 +00:00
azure-pipelines[bot]
39fe2eaca2
bump canton to 20220922 (#15068)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-23 11:32:21 +02:00
tudor-da
e0dc3f8679
[ED] Enable explicit disclosure in conformance tests [DPP-1206] (#14974)
* Allow enabling explicit disclosure in Sandbox-on-X

changelog_begin
changelog_end

* Fix conformance tests

* Disable tests testing yet unsupported features

* Addressed Martino's review comments
2022-09-23 07:55:19 +00:00
Gary Verhaegen
dd5543eaf2
create-daml-app: make tests pass on m1 (#15031)
This is very much a "just make it work" type of patch. The main issues
were:

- A bunch of type errors in the `index.test.ts` file when opened in VS
  Code. I'm not sure how it happened, but it's possible I'm just using a
  more recent TS compiler than whoever edited this last.
- `localhost`, on my machine at least, resolves to `::1`, and therefore
  the connections were just not established. I've opted for replacing
  `localhost` with explicit `127.0.0.1`.
- `npm-cli.js` was not an executable in my `PATH`, and won't be for
  most users, but `npm` is not on our testing infrastructure's `PATH`.

Those tests are obviously not tested by CI, so please review carefully /
test this on your own machine before approving.

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-23 04:57:47 +02:00
Carl Pulley
3ace00d787
Refactor to ensure Instrumentation and Classify classes are immutable
* Refactor to ensure Instrumentation and Classify classes are immutable

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-22 17:57:16 +01:00
tudor-da
5dca9bddb8
Fix flaky ConflictCheckWithCommittedSpec due to timeout (#15066)
changelog_begin
changelog_end
2022-09-22 16:31:42 +02:00
Sergey Kisel
118ac6e2fd
Rename unknown key (#15063)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-22 13:43:23 +02:00
dylant-da
7db1bfab54
Point to GHC with merge commit for large tuples branch (#15062)
* Point to GHC with merge commit for large tuples branch

https://github.com/digital-asset/ghc/pull/134

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-22 11:45:23 +01:00
tudor-da
298920a323
[ED] Forward contract metadata in Ledger API streams (#14906)
changelog_begin
The `CreatedEvent.metadata` field is populated for `created_at` and `contract_key_hash` (where applicable)
for active contracts and transactions payloads in Ledger API streams
changelog_end
2022-09-22 12:19:27 +02:00
Gary Verhaegen
75b17a17ed
fix live-preview (#15061)
Accidentally broken in #14985.

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-22 10:03:11 +00:00
carrielaben-da
247e0d858f
Folder name corrections (#15051)
Correcting the folder names in the first two sections of the Basic Contracts tutorial to reflect what the user will actually see.

[CHANGELOG_BEGIN]
[CHANGELOG_END]
2022-09-22 10:01:31 +00:00
mziolekda
41dc32a016
Remove reliance on implicit party allocation in CI tests [DPP-1234] (#15037)
* Remove reliance on implict party allocation in the authorization tests of the sandbox-on-x

CHANGELOG_BEGIN
CHANGELOG_END

* Remove the HOCON and cli config parameters

* Remove implicit party allocation from the Submission Service

* Remove support for implicit parties from the bridge

* Fix codegen reliance on implicit party allocation

* Fix daml script tests

* Fix trigger tests

* format security-evidence.md post rebase

* Fix json-api tests

* One more json-api test

* Fix haskell tests

* Corrections post-review

* Cosmetic improvements

* Fix race condition in party allocation handling
2022-09-22 10:20:53 +02:00
Carl Pulley
aa062cde42
Final step of explicit disclosure cached contract refactor
* Fixes #13897

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-21 18:12:55 +01:00
Remy
3f163e8e2e
[engine] drop deprecated LenientExercise Command (#15059)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-21 16:48:05 +00:00
dylant-da
89e2f4db9b
Add warnings to conversion, Warn for tuples size > 5 (#15018)
* Add warnings to conversion

* Fix warning code, add warning for tuples larger than 5 in convertType

* Add flag AllowLargeTuples to ignore when tuples of size > 5 are used

* Predicate tuple warning on AllowLargeTuples flag

* Compile stdlib / prim packages with --allow-large-tuples

* satisfy changelog

CHANGELOG_BEGIN
CHANGELOG_END

* Fix type error in LFConversion test due to runConvertM signature change

* Move warning to convertDataCon, so un-type-annotated uses are detected

* Add TODO

* Add codeGenAllowLargeTuples internal function to DA.Internal.Desugar

* Unsplit convertDataCon and convertDataCon' via envAllowLargeTuples check

* Desugar codeGenAllowLargeTuples call to allow large tuples on subexprs

* Point to GHC with auto-inserted codeGenAllowLargeTuples calls

* Reorder codeGenAllowLargeTuples replacement to be before internals check

* Export codeGenAllowLargeTuples from DA.Internal.Desugar

* Reverse warnings at end of ConvertM run

* Comment role of Either and tuple in ConvertM

* Rename --allow-large-tuples=yes to --disable-warn-large-tuples=yes

* Make disable_warn_large_tuples an option, false by default

* Add tests for tuple size warning

* Use minimum tuple size to trigger large tuple warning

* Disable large tuple warning during stdlib compilation

* Use a pattern synonym for tuple detection

* lint
2022-09-21 14:16:39 +01:00
Sergey Kisel
ca92e45563
Tighten pure config validation [DPP-1205] (#15044)
* Tighten pure config validation [DPP-1205]

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-21 15:00:49 +02:00
Stephen Compall
77672d2896
better JsNull check for Oracle; test scenarios for nested cases (#15022)
* a couple comparison query scenarios with nested position
* same JSON null test, but different
- 'gt string' (scenario 0) fails without this change
- 'gt int' (scenario 1) succeeds regardless of this change

CHANGELOG_BEGIN
- [JSON API with Oracle] Fix some nested queries that were returning no
  data.  DisableContractPayloadIndexing must be set to true to take
  advantage of this fix.
CHANGELOG_END
2022-09-21 10:21:35 +00:00
dylant-da
5a3cb468f8
Make damlc options fail if used more than once (#15021)
* Make damlc options fail if used more than once

* Fix import issues with optparse-applicative

* Undo `optionOnce` conversion for arguments that should occur many times

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END

* Improve comments

* Add tests for optionOnce behaviour

* lint
2022-09-21 09:26:59 +00:00
azure-pipelines[bot]
406a950d87
bump canton to 20220920 (#15053)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-21 09:14:39 +02:00
Gary Verhaegen
6bbe10065d
prepare for 2.3.5 (#15049)
This is a Canton-only patch release, but because of how our release
pipeline is set up, we need a patch release on this side too.

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-20 19:15:49 +02:00
nickchapman-da
0ebe770e59
[engine] stack-safe daml-lf archive decoding (#14964)
Transform our code for the protobuf-decoding phase to be stack-safe, by means of a Work trampoline. The code-style rules are:

runWork is never called in a nested context.
We introduce an explicit Work.Delay to break recursion.
Increase the size of the many-fields test from 120 to 160 fields.

(At 164 fields we run into the protobuf limit)

Part of: #13410
2022-09-20 16:51:50 +01:00
Stefano Baghino
a15f576308
Add "Next steps" page to "An introduction to Daml" (#14899)
* Add "Next steps" page to "An introduction to Daml"

The idea is that of offering a comprehensive set of possible next steps after learning how to write Daml.

The page suggests certifications and points to existing examples as the previous final line on the last page,
as well as adding suggestions on where to learn more about building off-ledger services, how to install,
operate and maintain a ledger, where to learn about proven design patterns and the availability of Daml Hub
to get started without having to run your own ledger.

changelog_begin
changelog_end

* Apply suggestions from code review

Thank you @carrielaben-da, great suggestions as always!

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>

Co-authored-by: carrielaben-da <91496516+carrielaben-da@users.noreply.github.com>
2022-09-20 15:00:13 +00:00
Raymond Roestenburg
deba5b4630
Doc add live ready auth 14649 (#15045)
* Added readyz route.

* Doc for liveness and readiness endpoints for auth middleware.

CHANGELOG_BEGIN
- oauth2 middleware: liveness and readiness endpoints
CHANGELOG_END
2022-09-20 16:38:49 +02:00
Stephen Compall
a9ebecfe5c
retest Oracle with payload indexing (#15041)
* point to #14844 and #15040 for some TODOs
* duplicate the Oracle tests, disable large literals when indexing is on
* split test file for parallelization

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-20 10:32:58 -04:00
Carl Pulley
e134e04913
Part of explicit disclosure cached contract refactor
* Stubbed out `SBUpdateContractCache` builtin and integrated it into Engine and Compiler workflows

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-20 14:55:52 +01:00
Carl Pulley
f9b166ab35
Restrict degree to which Speedy.Machine exposes its mutable state
* Restrict degree to which Speedy.Machine exposes its mutable state

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-20 09:30:03 +01:00
azure-pipelines[bot]
cfa7a34022
bump canton to 20220919 (#15046)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-20 07:05:34 +00:00
Sergey Kisel
86cff50d1a
Ability to override participantId [DPP-1143] (#15029)
* Ability to override participantId [DPP-1143]

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>

Co-authored-by: Miklos <57664299+miklos-da@users.noreply.github.com>
2022-09-19 12:56:49 +00:00
azure-pipelines[bot]
09b395afdf
bump canton to 20220916 (#15038)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-19 08:18:11 +00:00
Nicu Reut
03256ddbf5
[lf kv lib] - Clean up transaction traversal [kvl-1566] (#15032)
* [lf kvlib] - Remove scalaz usages from transaction traversal

* Explicitly handle unsupported node types when traversing with witnesses

changelog_begin
changelog_end
2022-09-16 10:36:19 +02:00
fayi-da
51af09646c
add abstract class parents to type-parameterless records, variants, enums (#15023)
* Add abstract class parents to generated ordinary records and variants

* Add common supertype for generated enums

* Add abstract class parents to generated ordinary records and variants

CHANGELOG_BEGIN
- Ordinary Records and Variants now have a super class defining toValue()
- Generated enums now have a common supertype, DamlEnum<T>
CHANGELOG_END
2022-09-15 15:26:31 +01:00
dylant-da
8d40016012
Add dylant-da as a codeowner on compiler-related directories (#15030)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-15 13:35:51 +00:00
dylant-da
931734d59c
PoC: Custom errors, for Interfaces (#14950)
* Point to GHC version with custom typecheck interface error messages

* Fix tests for new messages

* satisfy changelog check

CHANGELOG_BEGIN
CHANGELOG_END

* Point to GHC revision with TcDaml module & minor fixes

* Add TcDaml to ghc-lib.cabal

* Point to GHC: better HasMethod msg, uses PrelNames

* Point at non-PrelNames approach - turns out that didn't work

* Point to GHC with multiple module checks

* Point to GHC with tentative PrelNames work fully removed

* Add tests for new "non existent method" and "view" error messages

* Point to merged GHC changes
2022-09-15 12:53:30 +00:00
azure-pipelines[bot]
a32d1c7bf8
rotate release duty after 2022-09-14 (#15015)
@nickchapman-da is taking care of [testing](https://github.com/digital-asset/daml/blob/main/release/RELEASE.md) today's release, so they get pushed back to the end of the line.

Please do not merge this before the release is fully tested.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-15 12:10:38 +01:00
Gary Verhaegen
3d70c68952
docs: no index (#14985)
This removes the index.rst files from the repo, and instead generates a
placeholder index that just includes all the rst files at build time.

The reason for this change is that the ToC is defined in docs.daml.com,
and having one on both sides is both confusing and error-prone.

CHANGELOG_BEGIN
CHANGELOG_END
2022-09-15 12:12:12 +02:00
Gary Verhaegen
03051f3854
release testing: node 18 works (#15013)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-15 11:16:35 +02:00
azure-pipelines[bot]
cbfc45becc
bump canton to 20220914 (#15026)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-15 11:02:17 +02:00
Sergey Kisel
9006f841c5
Remove references to Sandbox-on-X from shared help [DPP-1204] (#15027)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-15 08:48:31 +00:00
Nicu Reut
3f06e322fd
[lf kvlib] - Handle rollback nodes when traversing transaction [KVL-1566] (#15020) (#15028)
We need to extract all the package party mappings found in a transaction, including the nodes that are under a rollback node
Rollback nodes have no informees of their own but we extract the children as expected

changelog_begin
changelog_end
2022-09-15 08:48:14 +00:00
Gary Verhaegen
32ef2a8a64
2.4.0-rc2 (#15024)
CHANGELOG_BEGIN
CHANGELOG_END
2022-09-15 09:58:23 +02:00
azure-pipelines[bot]
22c5e4ad2c
bump canton to 20220913 (#15016)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-15 00:24:53 +02:00
mziolekda
161e430482
Handle exception in hikari connection health check [DPP-1232] (#14998)
* handle error using error code framework

CHANGELOG_BEGIN
CHANGELOG_END

* handle error using standard logger

* clean up

* sort imports

* mute recurrent errors
2022-09-14 09:27:20 +02:00