Commit Graph

924 Commits

Author SHA1 Message Date
Stephen Compall
3902380b14
declare retroactive interface implementations in TypeScript (#14892)
* include retro-implements in TS interface type decls

* split interface exercise test into two sub-tests

* test that contract ID conversion resolves

CHANGELOG_BEGIN
- [TypeScript codegen] Support for retroactive interface implementations
  included.  Choice inheritance is deprecated and `will be removed
  <https://github.com/digital-asset/daml/issues/14893>`__; to invoke an
  interface choice on a template-typed contract ID, convert it to an
  interface-typed ID with *TemplateName*``.toInterface``.
CHANGELOG_END
2022-09-02 10:10:58 -04:00
Stephen Compall
85f93f54a0
make exercise by interface contract ID safe (#14134)
* declare Interface, ToInterface, FromInterface in @daml/types library

* generate ToInterface and FromTemplate companion declarations

* add toInterface and unsafeFromInterface to template companion implementations

* declare marker types for every interface

* remove type parameter from interface companions' types

* add the union for forward implements

CHANGELOG_BEGIN
- [TypeScript codegen] To exercise an interface choice on a
  template-typed contract ID, you must now explicitly convert the
  contract ID to an interface-typed ID.  For example, where ``cid:
  ContractId<TemplateName>``, you can use
  ``TemplateName.toInterface(InterfaceName, cid)`` to produce a
  ``ContractId<InterfaceName>``.

  Interface contract IDs are also now typed as shown above; for example,
  the former type ``ContractId<InterfaceNameInterface<TemplateName>>``
  would now simply be ``ContractId<InterfaceName>``.
CHANGELOG_END
2022-08-31 09:25:53 -04:00
Chun Lok Ling
bb4a17e345
add test case (#14882)
CHANGELOG_BEGIN
CHANGELOG_END
2022-08-31 11:28:59 +01:00
Chun Lok Ling
a29b95d38b
Test retro implements in java codegen (#14875)
* fixes #14822, added test case to ensure retroactive implements works in java code gen

CHANGELOG_BEGIN
CHANGELOG_END

* fixes #14822, added test case to ensure retroactive implements works in java code gen
* format
* address Stephen's comment
* fmt
2022-08-31 09:19:08 +01: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
f43bc5c8d1
use new api-type-signature names in some dependents (#14785)
* use new names in json-api

* use new names in java codegen

* use new names in Scala codegen

* use new names in TypedValueGenerators

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-23 17:52:10 +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
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
Stephen Compall
e8558d29dd
interface subscriptions from Java bindings (#14537)
* declare InterfaceFilter counterpart

* add interfaceIds to InclusiveFilter

* mark InclusiveFilter final

* add interface views to CreatedEvent

* there are only two Filter.Interfaces

- suggested by @stefanobaghino-da; thanks

CHANGELOG_BEGIN
- [Java bindings] The existing ``CreatedEvent`` constructor has been
  deprecated in favor of a new one that includes new interface-related
  arguments.  Most users should not be using this constructor directly,
  preferring ``fromProto`` instead, but the remainder should pass in
  empty maps as the new arguments.

  Likewise, the ``InclusiveFilter`` constructor has been deprecated.
  Existing callers should use the ``ofTemplateIds`` static method
  instead to replace current calls, keeping in mind that it will not be
  valid to pass ``Identifier``s representing interface IDs to this
  method.
CHANGELOG_END

* remove callers of deprecated InterfaceFilter constructor

* generate only valid InterfaceViews, include in Java data
2022-08-16 16:53:45 -04:00
Stephen Compall
4462a0b873
remove unneeded yarn resolutions (#14714)
* regenerate yarn lock

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-16 11:30:31 -04:00
Simon Meier
df89924627
ledger api: add interface filters for acs and transaction streams (#14033)
* Ledger API: interface filters for acs and transaction streams, API-only change.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
Co-authored-by: Marton Nagy <marton.nagy@digitalasset.com>
Co-authored-by: Sergey Kisel <sergey.kisel@digitalasset.com>
Co-authored-by: Sergey Kisel <98825453+skisel-da@users.noreply.github.com>
Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
2022-08-15 13:26:36 +02: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
Raymond Roestenburg
c3792aceda
Removed toInterface on Key. (#14652)
CHANGELOG_BEGIN
CHANGELOG_END
2022-08-10 13:21:28 +02:00
Chun Lok Ling
c03b741e15
Add static conversion method ContractId => T.ContractId in ContractId (#14650)
* add static conversion method ContractId => T.ContractId in ContractId

CHANGELOG_BEGIN
CHANGELOG_END

fixes #14299

* rename methods

* format

* address Ray's comment

* empty
2022-08-09 17:34:36 +01:00
Chun Lok Ling
7e4b18ace6
Testing fromValue with contract id (#14633)
* testing from value contract id

CHANGELOG_BEGIN
CHANGELOG_END

* delete commented code

CHANGELOG_BEGIN
CHANGELOG_END

* separate Bar template from Foo daml Modules
2022-08-08 10:44:16 +01:00
Moritz Kiefer
70d7482349
Support exercise without actor in Scala codegen (#14627)
* Support exercise without actor in Scala codegen

changelog_begin
changelog_end
2022-08-05 07:26:38 +00: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
Stephen Compall
4768d404b7
Address @daml/* security advisory (#14584)
- CVE-2022-25878

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-02 11:02:31 -04:00
Stephen Compall
d2c7be9dd8
interface views for daml-lf/interface library (#14569)
* add viewType to DefInterface
* interface view type resolvers
* in codegen, interfaces depend on their view types

CHANGELOG_BEGIN
CHANGELOG_END
2022-08-01 10:40:26 -04:00
Remy
b475d710aa
LF: Create LF 1.15 in scala to park basic interface constructs (#14534)
basic interface constructs contain:
- interface definition
- interface implementation
- retroactive template implemenation
- exerciseInterface and fetchInterface
- basic builin

but do not contain:
- "requires"
- exercise guards

CHANGELOG_BEGIN
CHANGELOG_END
2022-07-29 20:09:57 +02:00
Stephen Compall
3a33b3bcde
make getInterfaceId optional (#14485)
* remove hasInterfaceId, add Optional to type

* add some missing properties in ExercisedEvent to equals, hashCode, toString

* mark ExercisedEvent final, as with other events

CHANGELOG_BEGIN
- [Java bindings] ``ExercisedEvent#getInterfaceId`` has a different type
  since 2.3.x, indicating its optionality.
CHANGELOG_END
2022-07-25 12:50:33 -04:00
Simon Maxen
f26b9b2761
Add metering_report_json to GetMeteringReportResponse [DPP-1104] (#14496)
* Add metering_report_json to GetMeteringReportResponse

changelog_begin
changelog_end
2022-07-25 14:21:49 +01:00
Stephen Compall
d4bae0c518
Java bindings interface id blind booleans (#14423)
* add a test that breaks on missing identifier

* fix both hasInterfaceId boolean inversions

- confirmed that the test in parent breaks unless both changes are made

* add changelog

CHANGELOG_BEGIN
- [Java bindings] Fix a regression found in 2.3.0 RC with the
  introduction of interface IDs in ``ExercisedEvent``s.
CHANGELOG_END
2022-07-14 20:08:24 +00:00
tudor-da
9d5115da0b
[Explicit disclosure] Introduces Protobuf changes for supporting explicit disclosure payloads [DPP-1093] (#14336)
* Introduces Protobuf changes for supporting explicit disclosure payloads

changelog_begin
changelog_end

* Update ledger-api/grpc-definitions/com/daml/ledger/api/v1/event.proto

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

* Enrich metadata description according to Marcin's suggestion

Co-authored-by: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com>
2022-07-12 07:58:49 +00: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
Stephen Compall
6e3069d220
add retroImplements to lf/iface DefInterface (#14192)
* add resolveRetroImplements to EnvironmentInterface
* test that resolveRetroImplements does nothing with no data
* resolve retroactive interfaces in Java codegen
* resolve retroactive interfaces in Scala codegen
* resolve retroactive interfaces in json-api

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-29 13:13:02 -04:00
Stephen Compall
ebe7a04191
export LedgerOptions from @daml/ledger (#14277)
Fixes #14073.

CHANGELOG_BEGIN
- [js] Type ``LedgerOptions``, the type of `new Ledger` arguments, can
  be imported by name from ``@daml/ledger``, and is included in the
  documentation.
CHANGELOG_END
2022-06-28 13:45:01 +00:00
Dharmaraj Parmar
162100a30b
Timeout for LedgerIdentityClient (#14098)
* Fixes #14097

CHANGELOG_BEGIN
- [Java Bindings] Enable timeout for `LedgerIdentityClientImpl.getLedgerIdentity().
CHANGELOG_END

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2022-06-28 08:58:59 -04: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
Gary Verhaegen
3e8a49cdae
scala quickstart: remove examples (#14207)
These are not referenced from anywhere in the repo, and running them
manually is made very annoying by the removal of the Scala codegen and
the `quickstart-scala` template.

If they were deliberately kept to serve as examples of using the Scala
bindings (which I understand are still in use despite being deprecated),
I think we should find another way to keep that bit of documentation
alive, specifically a way that actually gets tested.

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-16 19:16:05 +02:00
Sergey Kisel
b1d8c14c55
Removal of Sandbox Classic in Haskell code [DPP-1073]. (#14127)
* Removal of Sandbox Classic in Haskell code.

CHANGELOG_BEGIN
CHANGELOG_END

* Further sandbox-classic removals

* Upload dar files when withSandbox is used.

* fix formatting

* Moved upload of dars in createSandbox.

* Fixed test by passing the token before the token file is created.

* Added implicit party allocation argument for haskell tests.

* DPP-1073 Infer sandbox token from the shared secret.

* Different slicing of runLedgerUploadDar

Co-authored-by: Andreas Triantafyllos <andreas.triantafyllos@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2022-06-16 14:14:39 +02:00
Gary Verhaegen
8d6cde3484
docs: fix ts docs pages (#14157)
- The "version replacement" step was broken: it replaced
  `0.0.0-SDKVERSION` with `{sdk_version}` instead of the current SDK
  version. This is fixed by adding a `format` call in the `ts_docs`
  Bazel rule.
- The section removal was broken as it assumed the version number was
  not replaced at all (so tried to detect `0.0.0-SDKVERSION` still).
  This is fixed by using a more robust "section removal" method.

CHANGELOG_BEGIN
CHANGELOG_END
2022-06-15 13:19:18 +02:00
Stephen Compall
d4251ead05
choice name overloads in TypeScript codegen (#14092)
* move template/interface combination to daml/types library
* interface collision stops overloading at runtime
* include Omit in template extends interfaces clauses

CHANGELOG_BEGIN
- [codegen js] When a choice is inherited from two or more interfaces,
  the template object no longer inherits one of the choices at random.
  Such choices must always be invoked directly by referring to the
  interface object.
CHANGELOG_END

Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
2022-06-13 08:49:39 -04:00
Sergey Kisel
5a63ed85ea
build-and-lint-test removal dependency to sandbox-classic (#14120)
CHANGELOG_BEGIN
CHANGELOG_END
2022-06-09 16:57:13 +02:00
Stephen Compall
4075389f92
remove inherited choices from Scala codegen, test interface/template IDs (#14113)
* inherited choices are gone, convert to interface
* use toInterface for conformance tests on interfaces

CHANGELOG_BEGIN
- [Scala codegen] Interface choices can no longer be invoked directly on
  template IDs, or via ``createAnd`` or ``key`` directly.  Instead, use
  ``toInterface[Ifn]`` before calling the relevant ``exercise*`` method.

  The resulting ledger commands now contain the correct interface ID
  rather than template ID for looking up the choice, but see #13993 for
  a caveat regarding create-and-exercise and exercise-by-key.
CHANGELOG_END
2022-06-08 08:37:56 -04:00
Sergey Kisel
1d8f195438
Sandbox Classic Removal in Tests (#13934)
CHANGELOG_BEGING
CHANGELOG_END
2022-06-07 19:54:52 +00:00
Stephen Compall
15b82efb87
toInterface and unsafeToTemplate in Scala codegen (#13991)
* Template.Implements marker, and toInterface for contract IDs
* unsafeToTemplate for interface contract IDs
* toInterface for create-and-exercise, exercise by key

CHANGELOG_BEGIN
- [Scala codegen] Template contract IDs and interface contract IDs have
  new coercion methods, ``toInterface`` and ``unsafeToTemplate``,
  respectively.

  ``toInterface`` can also be used with ``createAnd`` as well as ``key``
  for create-and-exercise and exercise-by-key respectively; however, see
  #13993 for a caveat regarding ledger API support.
CHANGELOG_END
2022-06-07 16:55:19 +00:00
Stephen Compall
4341130fe0
interface contract ID types in Scala codegen (#13975)
* define Interface and InterfaceCompanion parent classes
* generate package ID aliases for interface-only modules
* generate choice methods for interfaces
* include all interfaces in what to write from Scala codegen
* handle interface references in variance resolution

CHANGELOG_BEGIN
- [Scala codegen] Interface contract ID types, and references to them in
  serializable types, are now supported, as is exercise of interface
  choices on interface contract IDs.  To support this, ``DomainCommand``
  now includes a ``ContractTypeCompanion``, which may describe either a
  template or an interface, rather than a ``TemplateCompanion``.
CHANGELOG_END
2022-06-07 14:30:11 +00:00
Stephen Compall
9a086ec225
remove two-argument fromIdAndRecord from Java codegen output (#14104)
CHANGELOG_BEGIN
- [Java codegen] The two-argument overload for ``fromIdAndRecord``,
  deprecated since SDK 0.12.18, has been removed.  Code that still uses
  this should use either ``fromCreatedEvent``, or the remaining overload
  of ``fromIdAndRecord`` if no ``CreatedEvent`` is available.
CHANGELOG_END
2022-06-07 08:58:27 -04:00
Stephen Compall
eef97d04d2
remove inherited exercise methods from Java codegen (#14078)
* stop resolving in Java codegen, and use direct choices only
* wrong issue reference in Scala codegen

CHANGELOG_BEGIN
- [Java codegen] Direct invocation of interface exercise methods on
  templates is no longer supported, and the ``exercise*`` methods, which
  could generate invalid commands in some cases anyway, are removed.
  Use ``toInterface`` to access interface exercise methods.
CHANGELOG_END
2022-06-03 09:08:24 -04:00
Stephen Compall
eb3425b6c6
don't exclude interface-only modules in JS codegen (#14003)
* reproduce

This produces no files for EmptyIfaceOnly and yields the error

src/__tests__/test.ts(571,39): error TS2339: Property 'EmptyIfaceOnly' does not
exist on type 'typeof import(".../node_modules/@daml.js/build-and-lint-1.0.0/lib/Lib/index")'.

* generate files with no serializable types, but interfaces
- fixes parent test

CHANGELOG_BEGIN
- [codegen js] Files are now generated for Daml modules with interfaces
  even if no serializable types are present, and the module contents are
  generally propagated as if they had serializable types in them.
CHANGELOG_END
2022-06-02 11:17:59 -04:00
Stephen Compall
4f7eefc8d5
two-phase create-and-exercise with unified exercise methods in Java (#14037)
* new getCompanion methods generated for contract IDs
* document new output for exercise methods
* link to #14039

CHANGELOG_BEGIN
- [Java codegen] ``createAndExercise*`` and ``exerciseByKey*`` methods
  are deprecated; instead, use the new ``createAnd().exercise*`` and
  ``byKey(key).exercise*`` methods.

  When the ledger API supports it, interface choices will be reachable
  via ``createAnd().toInterface(Ifc.INTERFACE).exercise*`` and
  ``byKey(key).toInterface(Ifc.INTERFACE).exercise*``, exactly the
  syntax supported by contract-ID exercise; see #14056.
CHANGELOG_END
2022-06-02 12:09:59 +00:00
Stephen Compall
1dbebba03a
toInterface, unsafeFromInterface overloads in Java codegen (#14004)
* InterfaceCompanion marker parent
* define INTERFACE singleton class and sole value with every interface
* don't allow instantiation of interface classes; they are never what you want
* use singleton for to<interface>, rename unsafeFrom<interface> to unsafeFromInterface
* rename to<interface> to toInterface
* document Java interface output changes

CHANGELOG_BEGIN
- [Java codegen] For interface types ``Ifc``, the template contract ID
  conversion method ``toIfc()`` has been removed and replaced with
  ``toInterface(Ifc.INTERFACE)``, and the interface contract ID
  conversion method ``unsafeFromIfc`` has been replaced with
  ``unsafeFromInterface``, always the same name.
CHANGELOG_END
2022-06-02 06:28:35 -04: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
Stephen Compall
49a5474232
javadocs for codegen support in javaapi bindings (#13959)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Raymond Roestenburg <98821776+ray-roestenburg-da@users.noreply.github.com>
2022-05-24 11:26:27 +00: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
Gary Verhaegen
7434fb0f86
fix build-and-lint (#13876)
To be clear, this is a hotfix. Whoever is responsible for this test
should provide a more comprehensive fix with a fairly high degree of
urgency.

Current main is broken because we have a transitive dependency on
`@types/prettier` with a version constraint of `"*"`, and the latest
version (`2.6.1`) is not compatible with our pinned-down version of the
TypeScript compiler (`3.8.3`). A short-term solution would seem to be to
generally bump most of our npm dependencies in this test.

Currently, main tests are _not_ failing because they're still using the
cache, which has a success for this test (and its inputs, as far as
Bazel can determine, have not changed). This is in my opinion a more
important failure (that it doesn't fail), and so a proper fix of this
issue should include pinning down all of our transitive dependencies
(not just `@types/prettier` as I've done here). Arguably _in addition
to_ bumping most of them to recent-ish versions.

The daily releases break because the version string invalidates the
cache, which is how the problem surfaced.

CHANGELOG_BEGIN
CHANGELOG_END
2022-05-16 10:55:16 +02:00
Stephen Compall
30e9b87279
minimal Scala codegen interface support (#13858)
* add inherited choices for Scala codegen, test output exercises

CHANGELOG_BEGIN
- [scala codegen] Choices inherited from interfaces may be exercised
  directly from those templates via ``createAnd``, contract ID, or
  exercise-by-key.  Exercise by interface-contract-ID and
  interface-contract-ID types in signatures are not supported.
  See `issue #13858 <https://github.com/digital-asset/daml/pull/13858>`__.
CHANGELOG_END
2022-05-12 08:03:00 -04:00
Stephen Compall
59498586a5
Override annotation for create; add toValue to Template (#13859)
CHANGELOG_BEGIN
- [daml codegen java] Templates now have a generic ``toValue`` method.
  See `issue #13859 <https://github.com/digital-asset/daml/pull/13859>`__.
CHANGELOG_END
2022-05-12 07:58:56 -04:00