Commit Graph

484 Commits

Author SHA1 Message Date
Nicu Reut
2f453a145c
Extract the testing metrics instance [PLEN-4] (#15192) 2022-10-10 18:52:49 +00:00
nickchapman-da
ef959deeac
[engine] improve stacktrace for daml-script InterpretationError (#15178)
* improve stacktrace for daml-script InterpretationError

changelog_begin
changelog_end

* adapt expected regexp
2022-10-06 15:54:50 +00:00
Moisés Ackerman
b26eab3d6c
Handle sums-of-products correctly in daml ledger export (#15152)
* Extract encodeVariant

* Add special case for encoding record members of variants

* Test special case for encoding record members of variants

* Test variant records in 'daml ledger export' golden test 'export-values'

* Update TODOs

* Add comments for untested cases in export-values golden test

changelog_begin
- [Daml export] Fixed an issue with the handling of sums-of-products (#14723)
changelog_end
2022-10-04 13:49:05 +02:00
Moisés Ackerman
b30e0a3844
Add non-docs golden test for daml ledger export (#15136)
* Extract example-export-client to //daml-script/export/integration-tests/example-export-client

changelog_begin
changelog_end

* Parametrize example-export-client with Daml script to export

* Parametrize example-export-client with parties

* Extract daml_ledger_export_test to daml-script/export/integration-tests/matches-docs/util.bzl

* Rename daml-script/export/integration-tests/{matches-docs=>golden}

* Rename //daml-script/export/integration-tests/golden:{example-export=>matches-docs}*

* rules_daml/daml.bzl:daml_compile now accepts dependencies

* Drop trailing whitespace in daml ledger export comment

* Add test //daml-script/export/integration-tests/golden:export-values-compare
2022-10-03 15:31:51 +02:00
azure-pipelines[bot]
319afd82d4
bump canton to 20220929 (#15138)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-09-30 09:00:55 +02:00
nickchapman-da
3180094987
[engine] avoid construction of unrestricted speedy expression applications (#15079)
Avoid construction of unrestricted speedy expression applications.SEApp (alias for SEAppGeneral)

- Replace occurrences of SEApp(General) to use SEAppAtomic, with SELet1 as required
- Add new helper SEApp for many cases where arguments are simple values.
- Rename the most general unrestricted constructor as SEAppGeneral_DEPRECATED. The only remaining use is by fromUpdateSExpr and fromScenarioSExpr, due to our unprincipled approach to stack-trace. See TODO in pushLocation. I hope to fix this in a future PR.
- Rename the slightly less unrestricted constructor as SEAppOnlyFunIsAtomic_DEPRECATED. The only call site being in Anf.scala (for the case when ANF is not performed). Maybe one day we can perform ANF in all cases, and hence remove this one remaining usage.
2022-09-26 14:33:51 +01:00
pbatko-da
ca81adeb3e
6 - Ledger API changes for UM/UP extensions for Hub [DPP-1211] (#14937)
changelog_begin

[Ledger API Specification]:
1. Add 'is_deactivated' attribute to participant users.
2. Introduce participant server's local metadata for parties and participant users consisting of:
 - a resource version for optional concurrent change control,
 - modifiable key-value based annotations.
3. Add experimental update RPCs for parties and participant users:
  - participant user's modifiable fields are: 'primary_party', 'is_deactivated', 'metadata.annotations',
  - party's modifiable fields are 'local_metadata.annotations'.
4. Discourage use of 'party_details.display_name' in favor of using party's metadata annotations.

changelog_end


Other notes:

- no-op updates are allowed,
- update paths are resource relative,
- as annotation deletion is by providing an key with the empty string value,
- as a corollary, only non-empty strings are valid annotation values.
2022-09-26 12:56:55 +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
Stephen Compall
99a48557d3
deprecate interface library names; use new names downstream (#14856)
* new names in daml-script/runner

* new names in json-api

* new names in Scala bindings/codegen

* new names in Java bindings/codegen

* new names in daml-lf interpreter tests

* more new names in daml-script tests

* new names in navigator backend

* deprecate all iface symbols and old method names

CHANGELOG_BEGIN
- [Scala API] ``com.daml.lf.iface`` has been deprecated, as discussed
  further in
  `issue #14783 <https://github.com/digital-asset/daml/pull/14783>`__.
  Use the deprecation warnings as guidance to the new names.
CHANGELOG_END

* prefix cases in OrderingSpec

- suggested by @remyhaemmerle-da; thanks
2022-08-29 20:43:47 +00:00
Stephen Compall
f85f7816c7
rename interface library to api-type-signature; alias symbols (#14783)
* move interface directory to api-type-signature; change bazel target; move scala files

* rename iface package to typesig; rename EnvironmentInterface to EnvironmentSignature

* rename Interface to PackageSignature

* rename fromReaderInterfaces to fromPackageSignatures

* rename InterfaceReader to SignatureReader

* rename InterfaceReader to SignatureReader in deprecation note

* rename readInterface to readPackageSignature

* rename InterfaceReaderError to Error

* rename InterfaceReaderMain to SignatureReaderMain

* rename InterfaceType to PackageSignature.TypeDecl

* rename astInterfaces to interfaces

* rename astInterfaces to interfaces in PackageSignature

* rename findAstInterface to findInterface

* rename a couple arguments

CHANGELOG_BEGIN
- [Scala API] The "quasi-public" API in ``com.daml.lf.iface`` has moved
  to the new ``com.daml.lf.typesig`` package, with many accompanying
  name changes as documented in `issue #13669
  <https://github.com/digital-asset/daml/issues/13669>`__.

  Daml 2.5.0 or later will remove the old names, and also rename the
  Maven artifact from ``daml-lf-interface`` to
  ``daml-lf-api-type-signature``.  We recommend that users of this API
  use the deprecation guidance in 2.4.0 to port their applications
  before this happens.
CHANGELOG_END
2022-08-23 15:21:45 +00:00
Remy
48abfeb9dc
LF: distinguish template Id from interface Id in exercise command (#14755)
preliminary work for #14747

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-19 14:00:40 +02:00
Moritz Kiefer
4cd96d2b56
Add performance warning to queryContractId & queryContractKey (#14754)
Turns out people use that when they have tens of thousands if not
hundreds of thousands of contracts and then I have to debug why their
scripts are slow.

changelog_begin
changelog_end
2022-08-18 17:59:46 +02:00
Moisés Ackerman
009c3c306b
Add interface instance syntax, including retroactive interface instances (#14715)
* Extract qualifyLocally in LFConversion

* Update ghc rev

* Add parent type argument to interface instance desugaring types

* Check interface instance parent in LFConversion

* Convert interface instances in interface declarations

* Update daml-test-files to use 'interface instance' syntax

* Update other tests to use 'interface instance' syntax

* Update interface reference docs to use 'interface instance' syntax

* Update other files to use 'interface instance' syntax

* Add todo in DA.Daml.LF.Ast.Pretty

* Add daml-test-files for retroactive interface instances

changelog_begin
changelog_end
2022-08-17 12:06:59 +00:00
Carl Pulley
f65e7f54c7
Adds verified configuration and testing to issue #14562
* Adds verified configuration and testing to issue #14562

CHANGELOG_BEGIN

* DAML Script Runner: DAR upload code in DAML script runner moved to integration tests.

CHANGELOG_END
2022-08-10 23:05:55 +01:00
dylant-da
0d37134bc2
Change placeholder unit viewtypes to empty records (#14656)
* Update views in integration-v1dev to be EmptyInterfaceView instead of ()

* Update expected desugared daml for `EmptyInterfaceView`

* Update compiler Shake / DataDependencies viewtypes to EmptyInterfaceView

* Add record viewtypes to docs, update docs

* Add empty records to daml-lf, language-support, ledger, trigger tests

* Qualify EmptyInterfaceView in ledger semantic Interface tests

* Fix imports for EmptyInterfaceView in IIou / CIou / Transferrable

* empty changelog commit

CHANGELOG_BEGIN
CHANGELOG_END

* Qualify EmptyInterfaceView import

* Fix imports of EmptyInterfaceView in TypeScript codegen tests

* Accept Interface doc changes

* Add EmptyInterfaceView to DataDependencies tests

* Remove missing interface viewtype test - all interfaces must have views

* Replace all EmptyInterfaceView with EmptyInterfaceView {}
2022-08-10 16:45:23 +00:00
nickchapman-da
6b80715dc9
make srcloc test less fragile (#14680)
changelog_begin
changelog_end
2022-08-10 14:02:27 +00:00
Carl Pulley
4f7fb45dd1
DAR upload code in DAML script runner moved to integration tests
* Fixes #14562

CHANGELOG_BEGIN

* DAML Script Runner: DAR upload code in DAML script runner moved to integration tests.

CHANGELOG_END
2022-08-09 15:24:07 +01:00
dylant-da
8e8e0dabdf
Convert viewtype and view methods to LF (#14456)
* Add DA_Internal_Interface to convertTypeDef exclusion check

* Move desugared types/values for interface views into DA.Internal.Desugar

* Convert viewtype and view method declarations

* Typecheck view types and view declarations

* Add unit viewtypes to InterfaceChoiceCollision tests

* Add unit viewtypes to more compiler/damlc tests

* Modify empty interfaces/implements to have viewtypes/views

* Add unit viewtypes to remaining Interface tests

* Test for error thrown when viewtype not specified

* Fix daml-lf/ interface tests to use new syntax / unit views

* Add placeholder view of type Unit to TestInterfaces

CHANGELOG_BEGIN
CHANGELOG_END

* Fix typescript interface tests with unit viewtype

* Add unit viewtype to Java & Scala codegen

* Add unit viewtype to triggers tests interface

* Add unit viewtypes to ledger/test-common

* Add unit viewtypes to ledger-service/http-json

* Fix some damlc tests

* Use viewtype syntax in InterfaceViewNonSerializable test

* Remove HasInferfaceView instances in convertBind

* Add unit view to QualifiedInterface.daml test

* Generate HasInterfaceView instances in DataDependencies

* Add unit viewtypes and views to compiler/damlc/tests

* Document reconstruction of HasInterfaceView

* Move desugared types/values for interface views into DA.Internal.Desugar

* Add desugarable function view w/ EViewInterface desugaring

* Remove templateName and viewtype from generated EViewInterface

* Update desugared-daml

* Proof of concept: use _view -> EViewInterface prim via HasInterfaceView

* Move view, HasInterfaceView to DA.Internal.Interface

* Update desugared-daml tests

* Stop removing and re-generating HasInterfaceView instances

* Do not generate docs for generated "_view_" methods

* Report errors with interface TypeConNames prettily

* Fix InterfaceViewNotSpecified @ERROR to reflect new error text

* Don't import magic `view` method from Prelude to avoid name clash

* Update shake interface goto definition test locations

* Temp disable view spec tests, will re-implement views in speedy

* Add unit viewtype to Java code snippet docs

* Update Interface syntax docs for views

* Add unit viewtype to Transferrable.daml

* Add back "empty" interface implementation to interfaces.rst

* Re-enable view tests by having _view methods on InterfaceViews.daml file

* Remove deprecated commented-out view desugaring code
2022-08-03 16:23:38 +01:00
azure-pipelines[bot]
df139c6eb1
bump canton to 20220718 (#14468)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-07-19 07:03:06 +00:00
nickchapman-da
bbfcc55af7
[engine] Transmit completed transaction via SResultFinalValue. (#14416)
* Transmit completed transaction via SResultFinalValue.

changelog_begin
changelog_end

* remove spurious mods

* mark two commented-out tests with TODO 14431

* address small comments

* rename: SResultFinalValue --> SResultFinal
2022-07-18 09:45:37 +00:00
Sergey Kisel
2e18276b1a
Unify TlsConfiguration between SDK and canton [DPP-1113] (#14349)
* Unify TlsConfiguration between SDK and canton [DPP-1113]

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-14 16:58:59 +02:00
Carl Pulley
cfaa5883d6
Testing infrastructure for disclosed contracts
CHANGELOG_BEGIN

* Changes to facilitate testing explicit disclosure under Engine/speedy-level tests for explicit disclosure #14227.

CHANGELOG_END
2022-07-07 14:23:54 +01:00
Sergey Kisel
e151090cf3
Introduction of HOCON configuration for SoX [DPP-1033] (#14029)
* Introduction of HOCON configuration

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-05 15:35:16 +02:00
Sergey Kisel
f9521f27eb
Accept new form of JWT tokens [DPP-1102] (#14323)
* Accept new form of jwt tokens [DPP-1102]

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-04 17:41:08 +02:00
Moisés Ackerman
ba9abf3c5f
Use the appropriate daml-script for each Script (#14321)
* Add failing test

* Overload daml-script 'Runner.run' to work directly with 'PureCompiledPackages'

* Use new daml-script 'Runner.run' in scenario-service

changelog_begin
* data-dependencies: fixed an issue with the handling of multiple versions of the daml-script package (#14291)
changelog_end

Co-authored-by: Remy <remy.haemmerle@daml.com>
2022-07-04 08:26:12 +00:00
Remy
52ec65040f
[Engine] Rename values/arguments of type PackageInterface (#14305)
to avoid confusion with Daml interface.

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-01 15:38:04 +02:00
Robin Krom
36b39aca7b
Move disclosed contract logic to speedy (#14288)
* Move disclosed contract logic to speedy

This moves the disclosed contract logic from the engine to speedy.

Fixes #14090.

* back to versioned contract instances

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-01 08:40:10 +00:00
Sergey Kisel
6a80a1a82f
Removal of sandbox-classic module and binary (#14201)
* Removal of sandbox-classic module and binary

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-21 11:09:51 +02:00
Sergey Kisel
a6d6b7c324
Remove AuthServiceConfig from StandaloneApiServer (#14133)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-09 19:39:04 +02:00
Sergey Kisel
1afd0bf479
Sandbox Classic dependency removal from daml-script integration test (#14128)
* Sandbox Classic dependency removal from daml-script integration test

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-06-08 15:09:08 +00:00
Sergey Kisel
18a6f30dc3
daml-script test removal dependency to sandbox-classic (#14121)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-08 13:33:08 +00:00
Sergey Kisel
1d8f195438
Sandbox Classic Removal in Tests (#13934)
CHANGELOG_BEGING
CHANGELOG_END
2022-06-07 19:54:52 +00:00
Remy
7638e086ae
Script: infer the typeId of Choice in daml (#13971)
part of #13653

goes with digital-asset/ghc#122

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-02 14:02:12 +00:00
Stephen Compall
96a6fe62e4
choice name overloading in lf/interface (#13938)
* introduce TemplateChoices to mediate template choice resolution
* if any resolutions fail in EnvironmentInterface, discard the template's resolution
* if any resolutions fail in Interface, discard the remaining unresolved

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-31 08:41:48 -04:00
Remy
76eabe613e
Release Daml-script runner (#13980)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-25 15:33:21 +02:00
Remy
ea0d101913
Interface: Rename fixedChoice to choice (#13883)
CHANGELOG_BEGIN
CHANGELOG_END
2022-05-17 12:03:53 +02:00
Remy
6f6a3052a1
Repurpose templateId in ExerciseCommand and add interfaceId in ExerciseEvent (#13660)
part of #13653

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-16 15:30:07 +00:00
azure-pipelines[bot]
9ae125eeae
bump canton to 20220505 (#13805)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines Daml Build <support@digitalasset.com>
2022-05-06 12:52:22 +02:00
Remy
615d2e6206
Daml-script: marking MultiParticipantIT as falky in windows (#13739)
The problem is tracked by #13737.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 16:09:23 +00:00
Nicu Reut
a792de39a5
Update scalafmt to 3.5.1. (#13584)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-28 09:57:04 +00:00
Remy
7dfbf58147
Daml-script: Use curly braces notation for records in ledger export (#13634)
instead of `with` notation

fixes #13620

CHANGELOG_BEGIN
- [Daml-script] fix a bug in daml-script export formatting
  See https://github.com/digital-asset/daml/issues/13620
CHANGELOG_END
2022-04-26 16:36:18 +02:00
Remy
0be64a8dd0
LF: Structure stable packages (#13682)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 12:47:06 +00:00
Moisés Ackerman
482fb040a4
Ensure MultiTest.waitForCid actually waits (#13698)
changelog_begin
changelog_end
2022-04-26 12:17:44 +00:00
Hubert Slojewski
35b68962e8
Remove remaining kvutils dependencies [KVL-1245] (#13695)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 13:42:18 +02:00
Remy
79af226966
LF: Add a convenient companion object for ArrayList (#13684)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 12:36:36 +02:00
Remy
2894038b04
Daml-Script: fix MultiTestIT test (#13692)
CHANGELOG_BEGIN
CHANGELOG_END
2022-04-26 08:05:26 +00:00
Moisés Ackerman
c61326884e
daml-script/runner: leave application id blank when an access token is provided but an application id isn't (#13654)
changelog_begin
changelog_end
2022-04-21 17:51:35 +02:00
Gary Verhaegen
e085a4932e
bump canton (#13574)
I'm considering automating this, but thought I'd do it manually once
first.

CHANGELOG_BEGIN
CHANGELOG_END
2022-04-12 15:23:11 +00:00
Remy
e94dc3eae8
Allow LF dev for daml script tests (#13455)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-30 10:15:17 +02:00
Rafael Guglielmetti
f24a39d2df
Use Canton 2.1.0-SNAPSHOT (20220328) for conformance tests (#13446)
CHANGELOG_BEGIN
CHANGELOG_END
2022-03-29 17:55:21 +02:00