* ifaces: Add exercise interface semantics to spec
This is based on the semantics of 'exercise'.
Closes#11349 (for now). Also fixes a small bug in the semantics of 'exercise'.
changelog_begin
changelog_end
* Uniformize exercise syntax
This add a first test for evaluation order of exercise_interface and
fetch_interface. More tests will come in the following PR's.
This is part of #12697.
CHANGELOG_BEGIN
CHANGELOG_END
We add tests to check that by_interface fields are set for interface
transactions. We also extend the scenario service to show the
by_interface fields in the pretty printed transactions.
Fixes#13333
CHANGELOG_BEGIN
CHANGELOG_END
* explore less bouncing; convert every: Bounce -> yesBounce/noBounce
changelog_begin
changelog_end
* remove noBounce; yesBounce -> Bounce (with curly braces)
* multi args list for better layout
* use shadow variable naming more consistently
* reduce unnecessary polymorphism
* reinstate 2x Bounce in atomizeExps which are necessary
* avoid 2x linear args.size
* avoid pointless conversion to/from Array
* move definition of Res to correct place
* remove 2x comments to type param A which has been removed
* inline 2x unnecessary val defs
* enable Anf stack-safety tests for EUpdate cases
* fix stack-safety for closures in Anf transform
* fix stack-safety for try-catch handling in Anf transform
* add missing testcases for scope-exercise/prevernt-catch ANF stack-safety, and fix the overflow
changelog_begin
changelog_end
* interfaces: tests for requires typing
We add tests for the correct typing of the interface requires field.
CHANGELOG_BEGIN
CHANGELOG_END
* security evidence
This adds the presence of interface names, as well as lists of choices
and their argument/return types for each interface.
It also changes the semantics of DefTemplate and EnvironmentInterface:
each may contain "unresolved choices", which are the choices inherited
from interfaces for each implementing template;
EnvironmentInterface#resolveChoices will copy the full type information
as a concrete choice for each implementing template, which should be
much simpler for codegen and json-api.
A type generator should take account of the astInterfaces as well as
typeDecls in EnvironmentInterface; interfaces aren't included in
typeDecls because where I is an interface only ContractId I is
serializable.
* Ast.DataInterface is empty, just use the interfaces map directly
* port json-api for interface API changes; does not solve #12689
* port Scala codegen for interface API changes; does not add support
* port Java codegen for interface API changes; does not solve #11350
CHANGELOG_BEGIN
CHANGELOG_END
This extends the Scala encoder tests to include interface definitions
and interface implementatioins. Some bugs in the encoder and ast
rewriter are fixed.
CHANGELOG_BEGIN
CHANGELOG_END
We split kv replay as follow:
- [LF] we introduce a simple protobuf to store submission entry (which
roughly correspond to TRANSACTION_ENTRY and PACKAGE_UPLOAD_ENTRY KV
submission)
- [KV] we create a tool to extract form a ledger export a sequence of
submission entry
- [LF] we move the replay tool from KV to LF, and base it on
submission entries instead of ledger export
The objectify of this split is double:
- on the one side it will simplify maintenance, as it will make API
between KV and LF more clear (depends only on a protobuf definition)
- on the other side, it will made the use of the tool handy, as it
will make possible to benchmark the engine without direct dependency
between KV and LF.
CHANGELOG_BEGIN
CHANGELOG_END
* Improve MessageDigest and Mac instance creation to solve lock contention problem [DPP-956]
changelog_begin
Scalability bottleneck in regard to hashing has been fixed in multiple places.
changelog_end
Process:
- `git ls-files -z | xargs -0 -n 100 sed -i --follow-symlinks 's/DAML/Daml/g'`
- `git add -p`
- `git restore -p`
- Check there is no unstaged change left.
To review:
- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.
- Quicker check for fals positives:
```
git grep DAML | grep -v migration | grep -v DAML_
```
Fixes#13190
Note: This is the "second half" of #13191, which failed to cover all the
remaining DAMLs because of:
```
$ git ls-files | grep "'"
compiler/damlc/tests/daml-test-files/MangledScenario'.daml
```
CHANGELOG_BEGIN
CHANGELOG_END
* ifaces: tests: check for iface defs in templates
This adds a test that will fail when an interface definition is present
in a module when daml-lf < 1.dev.
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-lf/archive/src/test/scala/com/digitalasset/daml/lf/archive/DecodeV1Spec.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Update daml-lf/archive/src/test/scala/com/digitalasset/daml/lf/archive/DecodeV1Spec.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Update daml-lf/archive/src/test/scala/com/digitalasset/daml/lf/archive/DecodeV1Spec.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* remy's suggestions
Co-authored-by: Remy <remy.haemmerle@daml.com>
* ifaces: tests: check for interface collisions in ast
We add a test to check for interface name collisions in the daml-lf AST.
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-lf/language/src/test/scala/com/digitalasset/daml/lf/language/AstSpec.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Use `this` param in method bodies in LF.
Instead of having method bodies be functions from the template, have them reuse the existing template parameter (usually `this`).
Fixes#13123
changelog_begin
changelog_end
* fix validation-test
* Update 'implements' blocks to use new syntax
* Add InterfaceSyntax test case
* Add InterfaceMultipleMethodDeclsError test case
* Add InterfaceDifferentNumArgsError test case
changelog_begin
changelog_end
* LF Spec: Add interface expressions
This PR adds type rules and operational semantics for interface
expressions (including updates). The only thing I haven't added yet is
the operational semantics for exercise interface, and the operational
semantics for interface preconditions.
changelog_begin
changelog_end
* typo
* spurious duplicate
* minor edits
* review suggestions
* Prevent iface choice & method name collisions.
This PR adds interface choices and methods to the name collision checker.
changelog_begin
changelog_end
* check the names from interfaces
* add error
* implement name collision check in scala side
* scalafmt