* Remove outdated TODO on ValueEnricher
* Rename collectNewPackagesFromTemplateIds for interface use, remove TODO
* Remove outdated TODO on interfaceInstanceBody parser
* Check body view has interface viewtype as type
* Amend type iterator to go over Interface view method, remove TODO
* empty changelog commit
CHANGELOG_BEGIN
CHANGELOG_END
* Fail in Preprocessing when viewing nonimplementing interfaces
* Fix interface instance check in Typing
* Fix lint
* Typecheck view expression with tmplParam in scope
* Remove done TODO in checkInterfaceInstance
* Move AmbiguousInterfaceInstance error into LookupError as a case variant
* lint
* Add unapply to LookupError to default to NotFound
* Refactor (Co)Implements(Method) DefRefs
InterfaceInstanceDefRef replaces ImplementsDefRef and CoImplementsDefRef
InterfaceInstanceMethodDefRef replaces ImplementsMethodDefRef and CoImplementsMethodDefRef
* Define PackageInterface.lookupInterfaceInstance
* Remove lookupTemplateImplements and related functions
* Replace uses of lookupTemplateImplements and similar with lookupInterfaceInstance
* Rename ETemplateDoesNotImplementInterface=>EMissingInterfaceInstance
* Rename EConflictingImplementsCoImplements=>EAmbiguousInterfaceInstance
* Replace checkIface(Co)Implementations with direct use of checkInterfaceInstance
* Remove LookupError.Reference cases for implements/co-implements
* Rename and refactor EMissingRequiredInterface{=>Instance}
* Rename and refactor EMissingInterfaceMethod=>EMissingMethodInInterfaceInstance
* Rename and refactor EUnknownInterfaceMethod=>EUnknownMethodInInterfaceInstance
* Clean up checkInterfaceInstance
* Include interface signature in InterfaceInstanceInfo
changelog_begin
changelog_end
* testcases which show current lack of stack-safety
changelog_begin
changelog_end
* make alpha-equiv be stack-safe; enable large tests
* use ++: in preference to ++ (and toList)
* 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
After this change //daml-lf/tests:test-scenario-stable-many-fields
does not seem to stack overflow anymore.
This is a workaround until we make the type checker stack safe, See #13410.
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
* Use lookupTemplateImplementsOrInterfaceCoImplements in checkGenImplementation
* Update docs for ImplementsDefRef to reflect reality
Namely, it does not point to a conversion function, and the actual value it points to is irrelevant.
Only its presence is used to determine whether a template implements an interface or not.
Consequently, it now points to the unit value instead of the identity function.
* Generate 'CoImplementsDefRef's for each co-implemented template
* Consider CoImplementsDefRef in SBuiltin when checking if a template implements an interface
Also factor out check into private function
* Compile co-implemented methods using CoImplementsMethodDefRef
* SBCallInterface now uses CoImplementsDefRef for co-implemented methods
* Add test cases for (co)implemented interfaces in SBuiltinInterfaceTest
* Remove TemplateDoesNotImplementInterface error
* Explicitly override def in '*Implements*DefRef'
changelog_begin
changelog_end
* 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
* Tests for stack-safety of type-checking
changelog_begin
changelog_end
* remove testcases app[123]of3
* typecheck returns Option[ValidationError]
* remove LARGE testset, which only has non-overflow because of ill-typed examples causing early exit
* ensure all test examples are well-typed
* fix TODO issue links
* Convert experimental primitive TYPEREP_TYCON_NAME into proper LF builtin
* Add entry for TYPEREP_TYCON_NAME in daml-lf spec
* disable quickcheck test in DA.Test.Packaging
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
* 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
* 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
* Extend daml lf parser to support new interface primitives
* Test parser on new interface primitives
* Add daml lf decoding test cases for new interface primitives
* Add TypingSpec test cases for new interface primitives
* add SBuiltinTest test cases for interface primitives
changelog_begin
changelog_end
* Add new primitives to proto spec
* implement E{Signatory,Observer}Interface in terms of EResolveVirtual{Signatory,Observer}
* define EToTypeRep primitive in terms of EToTypeRep Expr
* Remove experimental primitives TO_TYPE_REP and RESOLVE_VIRTUAL_{SIGNATORY,OBSERVER}
changelog_begin
changelog_end
* interfaces should not be implicitly serializable
* Add scala serializability check for interface choices
* Add scala serializability check for interface payloads
changelog_begin
changelog_end
Continues the work started in https://github.com/digital-asset/daml/pull/12543
These libraries were only needed to transition from Scala 2.12 to 2.13
and are no longer useful as all the necessary items are now available
in Scala 2.13.
changelog_begin
changelog_end
Since Scala 2.13.2, Scala introduced built-in support to
manage warnings in a more granular fashion, thus making
the silencer plugin we are currently using no longer
strictly useful. Removing compiler plugins also removes
friction from migrating to Scala 3 in the future. As a
cherry on top, the built-in warning configuration also
allows to check whether a `@nowarn` actually does
anything, allowing us to proactively remove unused
warnings should the need arise.
[Here][1] is s a blog post by the Scala team about it.
Warnings have been either solved or preserved if useful,
trying to minimize the scope (keeping it at the single
expression scope if possible). In particular, all
remaining usages of the Scala Collection API compatibility
module have been removed.
Using the silencer plugin also apparently hid a few
remaining usages of compatibility libraries that were used
as part of the transition from Scala 2.12 to Scala 2.13
that are no longer needed. Removing those warnings
highlighted those.
changelog_begin
changelog_end
[1]: https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html