* Fix a probable typo in //daml-fl/encoder/testing-dar-*
* apply TODOs in bazel files
* remove obsolete comments in bazel files
* use 'default' instead of 'latest' for targets relying on 'latest' in order to ensure interfaces are supported
* Refactor PackageMetadata construction
* Package Metadata now can include an upgraded package id
* define PackageInterface#lookupPredecessors
* Add SoftFetch in Daml LF
* Add softFetch function in Daml
* Add USoftFetch LFConversion primitive
* Define SoftFetch in terms of SBPromoteAnyContract
* daml_compile rule now takes upgrades arg
* Add script test for softFetch
* TODOs
* Check LF >= 1.dev when decoding 'upgradedPackageId' and 'softFetch' in DecodeV1.scala
* Check that softFetch is not called on templates with contract keys
* Seq=>List
* ModParser todo
* Extract PackageUpgradesIT from AbstractFuncIT
* Update docstring for SBPromoteAnyContract
* Fix build errors
* Fix build error
* DecodeV1Spec case for softFetch
* DecodeV1Spec case for upgradedPackageId
* EncodeV1 case for upgradedPackageId
* Fix build error
* Disable test due to cyclic dependency with canton
* Add transitive case to PackageUpgradesIT
* Clean up PackageUpgradesIT
* Fix build error
* Error if 'upgrades' field is present before featurePackageUpgrades
* Update doc on compileSoftFetchTemplate
* Reword WronglyTypedContractSoft error
We test encoder with exhaustive list of builtins for 1.11, 1.12, 1.13,
1.14, 1.15, 1.dev.
This test indirectly allso, LF parser, and LF type checking for
builtins.
* 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
* Remove templateId and viewtype from EViewInterface
* Fix lint
* Compile DefRefs for views, return them in SBViewInterface
* Stop looking for `_view` method, remove ENoViewFound in TypeChecker.hs
* Remove ENoViewFound / remove view method lookup, use view param instead
* Fix use of viewMethod.returnType / import of MethodName
* Replace uses of `_view` in Scala, update parser w/ viewtype/view clauses
* Fix lint
* Update Interface LF encoding test for views
* Stop using unit views in ParsersSpec
* Fix tests to have new Scala test parser viewtype/view syntax
* Fix Interface_extended_1.dev_.lf to have viewtypes/views
* Change all spec/lf viewtypes/views to Unit
* Remove accidental use of requires
* Fix ParsersSpec to have record viewtypes/views
* Fix ValueEnricherSpec for switch to unit views
* Remove no view test from Scala - lack of view is caught at compile-time
* Remove unused _view method in InterfaceViews.daml test
* Return control expression via Control.Expression
* Retrieve compiled views via implementation body
* Reduce duplication between implements and co-implements
This extracts the common part (methods and view) to a new type InterfaceInstanceBody
changelog_begin
changelog_end
* Update protobuf to include viewtype and implementation view
* Stub interface viewtype and implements view in updated AST
* Set views on Java builders in DecodeV1Spec
CHANGELOG_BEGIN
Update LF AST protobuf for interface viewtype and implementation view -
not currently linked to syntax or engine changes, all stubbed out in
LFConversion.
CHANGELOG_END
* Add view field to CoImplements
* Update iterators & parsers to account for CoImplements view
* Replace uses of TBuiltin(BTUnit) with TUnit
* Remove superfluous "Available in versions >= 1.dev" comment
* Fix missing TUnit imports, missing view param in daml-lf/parser
* Remove unused imports from DecodeV1Spec
* Add stub view in AstSpec
* Extend EncodeV1Spec with interface co-implements
* Add lookupTemplateImplementsOrInterfaceCoImplements to PackageInterface
* Use lookupTemplateImplementsOrInterfaceCoImplements in checkImplements
* Add TypingSpec cases for interface conversion functions via co-implements
* Add TypingSpec cases for interfaces with co-implements
* Apply code review suggestions: result type formatting
changelog_begin
changelog_end
* Add CoImplements to daml-lf AST
* Add AstSpec case for duplicate co-implements in interface
* Add placeholders for CoImplements in daml-lf validation
* Handle CoImplements in daml-lf iterators
* Handle CoImplements in daml-lf scala decoder
* Test DefInterface components in DecodeV1Spec
* Handle CoImplements in daml-lf (testing) parser
* Handle CoImplements in daml-lf (testing) encoder
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
* 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
Somewhat error-prone, so please review carefully.
Reasons we need this:
- Some file types are not properly handled by the script.
- The only exclusion mechanism we currently have (`NO_AUTO_COPYRIGHT`)
is overly coarse.
CHANGELOG_BEGIN
CHANGELOG_END
New year, new copyright, new expected unknown issues with various files
that won't be covered by the script and/or will be but shouldn't change.
I'll do the details on Jan 1, but would appreciate this being
preapproved so I can actually get it merged by then.
CHANGELOG_BEGIN
CHANGELOG_END
* 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 #11930fixes#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>
* 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
* Add a guard when exercising by interface.
This fixes part of #11703, when exercising an inherited choice by
interface and you know the template id, via the command preprocessor.
It does this by inserting a "guard" in between the interface fetch and
the exercise body. The guard is a function Interface -> Bool, which
is general enough to check the template id, without complicating too
much in speedy. And can be generalized in the future to check more,
like signatories, etc.
I added the guard as an optional argument to UExerciseByInterface.
This isn't hooked up to the protobuf AST yet (or Haskell side for
that matter) -- but I'll do it in the next PR! For now you can invoke
the guarded exercise via the command preprocessor, so I can enable the
approprate engine tests. (There's still some failing fetch tests left,
but I decided to leave this for later. Fetch can be a lot simpler than
guarded choices, since you always add a fetch node. No need for fancy
continuations.)
changelog_begin
changelog_end
* scalafmt
* Feedback and fix matches
* Update comments, we are always going to abort the transaction
* Raise WronglyTypedContract in SBGuardTemplateId.
* rebase and fix parser
* restore ANF
* scalafmt