Partly because the current version is from February (of this year,
fortunately), and partly because I need a more recent one to bump node
to 18 and fix the GSG for that.
* point to GHC with improved error
* Point to new GHC
* Fix error in RelTimeDetailsHidden1
* Point to updated ghc
* Point to new GHC
* Satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Fix assertion in RelTimeDetailsHidden1
* Amend tests with out-of-bounds NumericScale, point to updated GHC
* Drop quotes around type error
* Add tests for field access errors
* point to merged GHC
* point to updated GHC
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Point to updated GHC
* Expect new interface view error message in ImplementsNonInterface
* Add test for trying to implement a non-interface
* Point to GHC with better error suppression, fix tests
* Remove unused TryImplementNonInterface
* point to rebased ghc
* point to forwarded GHC changes
* point to updated GHC
* Fix expected error in ImplementsNonInterface
* Point to merged commit
* Prevent unused import warnings
* Remove all explicit occurences of GHC.Tuple.Check
* Update desugar tests
* Remove magic from GHC.Tuple.Check
* Add GHC.Tuple.Check back to DarReaderTest
* Point to merged changes
* Create tuple size check function in GHC.Tuple.Check
* Update desugar test
* lint
* Fix accidental minus in stable-packages
* Replace GHC.Types with GHC.Tuple.Check in doctest generation
* Fix DarReaderTest
* Fix DamlDocTest for GHC.Tuple.Check import
* Remove unnecessary DamlSyntax pragma
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Point to merged GHC changes
* Point to akrmn's merged in changes
* Point back at merged in changes
* restart CI
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Define DA.Bazel.Runfiles.locateResource as an alternative to locateRunfiles
* Use locateResource to get default dlint rules file
Fixes#15443
* Use locateResource to get scenario-service.jar
* Use locateResource to get ghc-pkg executable
* Use locateResource to get stable-packages directory
* Use locateResource to get ghcversion.h
* Use locateResource to get hpp executable
* Use locateResource to get builtin package dbs
* Drop unused function DA.Daml.Options.Types.getBaseDir
* Use locateResource to get d3{,plus}.min.js
* Use locateResource to get repl-service.jar
* data Resource now takes a runfilesPathPrefix instead of a runfilesPath
* Add hlint warning 'locateRunfiles/package_app'
* Let locateRunfiles crash when used outside of bazel target
* typo
* point to updated GHC
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Point to updated GHC
* Expect new interface view error message in ImplementsNonInterface
* Add test for trying to implement a non-interface
* Point to GHC with better error suppression, fix tests
* Remove unused TryImplementNonInterface
* Point to merged GHC
* Success!
* Remove dead / unnecessary code from debugging
* Remove unused `userWrittenTuple` helper
* Import `GHC.Types.magic` where necessary
* Test for example in issue #15338
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Remove fst/snd lint tests, which weren't correct/useful anyways
* Update DocTest to import GHC.Types where necessary
* Update desugar tests
* Fix daml repl to include GHC.Types import
* Add GHC.Types to the doctest
* style improvement: if cond then action else pure () -> when cond action
* Point to merged GHC
* Replace '1.dev only'=>'Daml-LF >= 1.15' in docs for interface functions
* Define coerceInterfaceContractId
* Test coerceInterfaceContractId in InterfaceContractDoesNotImplementInterface
* Test coerceInterfaceContractId in InterfaceConversions
* Add entry for coerceInterfaceContractId in interface reference docs
* update *.EXPECTED.desugared-daml files
changelog_begin
- [Daml Standard Library] Added function ``coerceInterfaceContractId``
changelog_end
* Extract helper _validate_dar in data_dependencies.bzl
* Generalize daml_script_test from daml_script.bzl
* Move regression test for #14291 into compatibility tests
changelog_begin
changelog_end
run-full-compat: true
The problem is that `damlcForTarget tools depLfVer` could return an older damlc
than needed for `targetLfVer`.
The reason this didn't fail before is that the legacy damlc supports up to
LF=1.14, and `lfVersionTestPairs` never had `depLfVer < 1.14 && targetLfVer > 1.14`
changelog_begin
changelog_end
* Remove mention of FunctionalDependencies as data-dependencies caveat
FunctionalDependencies in data-dependencies have been supported since #7698
changelog_begin
changelog_end
* Remove mention of advanced type system features as data-dependencies caveat
module DA.Generics and language extension DeriveGeneric have long been removed
from the language, and I couldn't think of other similar "advanced type
system features" that work for plain dependencies but not for data-dependencies.
* Extend list of data dependable extensions
* Point to fixed GHC
* Fix daml-test-files for improved GHC errors
* Fix error message to match critical parts of improved GHC errors
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* point to updated GHC
* Point to updated GHC
* Fix damlc tests for new GHC error messages
* Point to updated GHC
* Fix `instance Show Text` to produce escaped Text (#15177)
This adapts the code used in GHC's 'instance Show Char where { showList }', representing characters as single-character
'Text's using a type synonym. CPP can be used during development to switch to a newtype-based implementation in order
to check type safety.
changelog_begin
- [Daml Standard Library] ``show @Text`` now escapes special characters, producing syntactically correct expressions (#15177)
changelog_end
* Add daml-test-file testing `show @Text`
* Avoid 'explode' in 'showLitChr'
* Cleanup 'showLitChr'
* Update DarReaderTest.scala
* Clean up import of GHC.Base
* Add Note for __DEBUG__SHOW_TEXT_CHR_NEWTYPE macro
* Extract longStringSize from longStringOf in daml-test-file ShowText.daml
* Document differences with GHC implementation
* Remove redundancy between showLitChr and {ascii=>ctrlChrText}
* Add 'exhaustive' test case in daml-test-file ShowText.daml
* Change 'ctrlChrText' default case to throw error
The original implementation forces the caller to always use Text as the error type. This is unnecessarily restrictive as the types can be polymorphic on the caller's side.
CHANGELOG_BEGIN
* [Stdlib] Generalize the (<?>) operator to support a generic type for Validation
CHANGELOG_END
* Only report coverage for package-local choices/templates, add extra info
* Unify information for printTestCoverage
* Extract modules from all packages & local modules, not just tested ones
* Create reports about local/external choices/templates
* Remove unnecessary reporting
* Report local package coverage, external package coverage, all coverage
* Refactor printReport
* fix test, satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Fix another test
* Fix wording to `defined in local/external package`
* Check coverage against all modules in scope, not just tested modules
* Fix wording again, back to local/external modules - more accurate
* Replace TemplateInfo with Qualified Template
* Ensure daml preprocessor is only skipped when building 'daml-{prim,stdlib}'
changelog_begin
changelog_end
* Test that the daml preprocessor can't be skipped simply by changing the module name
* Add HasField instances for DA.Stack.SrcLoc (#15142)
changelog_begin
[DA.Stack] The SrcLoc datatype now supports dot syntax for field access (#15142)
changelog_end
* Add daml-test-file SrcLocFields to test dot syntax on DA.Stack.SrcLoc
* Define 'HasField f SrcLoc t' instances using record syntax
* Point to latest GHC with archive choices on interfaces
* Update Desugared daml for interfaces Archives
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-doc test files
* Add relevant identifiers to SignatureReaderSpec for iface Archive choice
* lint
* Point to GHC with generated HasArchive instance
* Add test for archive on interface
* Test that second archive doesn't work
* Update desugar tests
* Point to GHC merge
TLDR: Remove broken code which constructs stackTrace().
Happy never to have to read those NOTE(MH) comments in the pushLocation code again!
(1) This code was fundamentally broken for various reasons:
- It doesn't make sense to track location info on the continuation stack. The continuation stack is a record of the evaluation still to come; not a context for the current evaluation.
- Stack traces can't sensibly be provided in a language such as Daml which promises that tail-recursion is evaluated in constant stack-space.
- Attempting to keep location info on the continuation stack does not play well when exceptions are thrown and the stack is unwound.
(2) The stack-trace management code was also very hacky:
- The pushLocation code contained special cases when the continuation stack was headed by a KArg/SToken continuation. This is an internal implementation detail. The KArg doesn't even exist when we stop using the deprecated SEAppGeneral expression constructor.
- The pushLocation code also contained special support for copying stack-traces into SEVal and SDefinition caches, and then later back on to the continuation stack. Yuck!
(3) The stackTrace() code was barely used:
- Some time ago an alternative/simpler location tracking system (lastLocation) was implemented.
- Only ScenarioRunner makes use of the stackTrace()
- Only a single test changes behaviour when we drop use of stackTrace() in favour of getLastLocation
* Add test for typesignature.add codelens with HasField
* Reexport class HasField from DA.Internal.RebindableSyntax
* Update expected signature in test for typesignature.add codelens with HasField
changelog_begin
- [Daml Studio] Suggested type signatures no longer qualify HasField typeclass
See `#13790 <https://github.com/digital-asset/daml/issues/13790>`__.
changelog_end
* Update expected error in RelTimeDetailsHidden1 daml-test-file
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.
* Add warnings to conversion
* Fix warning code, add warning for tuples larger than 5 in convertType
* Add flag AllowLargeTuples to ignore when tuples of size > 5 are used
* Predicate tuple warning on AllowLargeTuples flag
* Compile stdlib / prim packages with --allow-large-tuples
* satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Fix type error in LFConversion test due to runConvertM signature change
* Move warning to convertDataCon, so un-type-annotated uses are detected
* Add TODO
* Add codeGenAllowLargeTuples internal function to DA.Internal.Desugar
* Unsplit convertDataCon and convertDataCon' via envAllowLargeTuples check
* Desugar codeGenAllowLargeTuples call to allow large tuples on subexprs
* Point to GHC with auto-inserted codeGenAllowLargeTuples calls
* Reorder codeGenAllowLargeTuples replacement to be before internals check
* Export codeGenAllowLargeTuples from DA.Internal.Desugar
* Reverse warnings at end of ConvertM run
* Comment role of Either and tuple in ConvertM
* Rename --allow-large-tuples=yes to --disable-warn-large-tuples=yes
* Make disable_warn_large_tuples an option, false by default
* Add tests for tuple size warning
* Use minimum tuple size to trigger large tuple warning
* Disable large tuple warning during stdlib compilation
* Use a pattern synonym for tuple detection
* lint
* Make damlc options fail if used more than once
* Fix import issues with optparse-applicative
* Undo `optionOnce` conversion for arguments that should occur many times
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Improve comments
* Add tests for optionOnce behaviour
* lint
* Point to GHC version with custom typecheck interface error messages
* Fix tests for new messages
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Point to GHC revision with TcDaml module & minor fixes
* Add TcDaml to ghc-lib.cabal
* Point to GHC: better HasMethod msg, uses PrelNames
* Point at non-PrelNames approach - turns out that didn't work
* Point to GHC with multiple module checks
* Point to GHC with tentative PrelNames work fully removed
* Add tests for new "non existent method" and "view" error messages
* Point to merged GHC changes
* Add test case
* Restart UniqSupply on every call of setupDamlGHC
changelog_begin
- [data-dependencies] Fixed an issue where packages with data-dependencies would get non-deterministic package ids (`#14936 <https://github.com/digital-asset/daml/issues/14936>`__).
changelog_end
* Improve error for wrong viewtypes
* Add tests for new viewtype errors
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Use strict foldl
* Update tests to be non-hyphenated
* Allow EExpectedViewType to define own article
* Use _TApps instead of _TypeSplitApp
* Remove hyphen from "type-constructor" in EExpectedViewType
* Add article to EExpectedViewType messages
* Improve EExpectedViewType errors for unexpected Type, add particle
* Fix tests for improved viewtype errors
* Add 'damlc validate-dar' test case for interface definition
* Add failing 'damlc validate-dar' test cases for interface instances
* Remove instance MonoTraversable e (NameMap a) from Data.NameMap
* Add (orphan) instance MonoTraversable ModuleRef (NameMap a) in DA.Daml.LF.Ast.Optics
* Data.NameMap: remove runtime check on HOF name changes
changelog_begin
changelog_end
* Make InterfaceGuardedNotExtended error out with guard message
* Move ConvertM into own module, make convertPrim failable
* Error out when exerciseGuarded is called
* Remove _exerciseDefault, now unused
* Error at runtime if _exerciseInterfaceGuard called in <= LF 1.15
* Add InterfaceChoiceGuardFailedNotExtended - test guarded exercises error
* lint
* Satisfy changelog
CHANGELOG_BEGIN
CHANGELOG_END
* Only error on exerciseGuarded if extended interfaces are NOT supported
* Make convertPrim impure - handle strict errors by inserting runtime errs
* Use ifdef/else/endif instead of ifdef/endif/ifndef/endif
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Add per interface choice context in serializability checks
* Update expected errors in daml-test-files
* Drop done todo
* Keep TyCon in InterfaceBinds
* Move convertInterface to top level
* convertInterface now returns a list of definitions
* Refactor convertInterface
* Create interface data type def in convertInterface
* Check for featureSimpleInterfaces in convertInterface
* Check for featureSimpleInterfaces in convertInterfaceInstance
* cleanup convertRequires
* Validate that an interface type constructor has no parameters
changelog_begin
changelog_end
* Add newtype for interface viewtype docs
* Change type of InterfaceDoc field if_viewtype to Maybe InterfaceViewtypeDoc
* Extract interface viewtype in distributeInstanceDocs
changelog_begin
changelog_end
* Add version 1.15 - move interfaces into them
* Update Ast/Version & docs for 1.15, split interface into simple/extended
* Stage 1.15 protobuf
* Remove references to dev from 1.15 protobufs
* Add Tests file for 1.15 in ledger API testtool
* Update Version 1.15 changelog with Call/implements
* Make 1.14 default again
* Add 1.15 as preview version
* Add 1.15 test suite to testtool
* Reinclude 1.15 in COMPILER_LF_VERSIONS to build model-tests-1.15
* Move v1_15 ledger-api-tests into own suite
* Fix InterfaceNotSupported message to 1.15 or higher
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Update tests with extended interface features to only run on 1.dev
* Allow unsafe_from_interface and interface_template_type_rep in 1.15
* Fix StableVersions back to 1.14, make EarlyAccessVersions 1.15
* Run retroactive implements tests only in extended interfaces
* lint
* Temporarily disable 1.15 conformance tests - handle in another PR
* Also disable conformance-test-tls1.2-or-newer-1.15
* Disable PureConfigReaderWriter tests that assume early-access == stable
* lint
* Temporarily disable decode extended interface primitives test
* Use dictionary comprehension to generate ledger/test-common test_names
* Move InterfaceSubscriptionsIT test back into 1.dev suite
* lint
* Make exercise guards nullable, ignore Nothing in decode/encode
* Desugar UExerciseInterface[Guarded] differently, point to updated GHC
* Update to new GHC revision, removes pred argument from `exercise`
* Attach correct range to guard support error (if any)
Co-Authored-By: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Rename interface features
Co-Authored-By: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Remove unnecessary mention of v1_14 from supportedInputVersions
Co-Authored-By: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Clarify purpose of `Maybe Expr` type for exercise guard
Co-Authored-By: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Remove guarded exercise when Extended Interfaces are not enabled
* Remove all instances of guarded exercises in versions <= 1.15
* Add check for isId to splitDFunId
* Exclude via $cexerciseGuarded check - ClassOpId approach did not work
* Run damlc interface tests w/o requires when since DAML_INTERFACE
* Update desugared daml for UExerciseInterface[Guarded] generation
* Temporarily disable failing damlc tests
* Remove 1.dev-only references from 1.15 protobuf
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* Add daml-doc EXPECTED.{md,rst} files for QualifiedInterface.daml
* Add daml-doc EXPECTED.{md,rst} files for {,Qualified}RetroactiveInterfaceInstance.daml
* 'implements' in templates are now rendered as 'interface instance's
* Update daml-test-files {,Qualified}Interface.daml EXPECTED daml-doc output
* daml-doc now includes interface instances in interfaces
* Update daml-test-files {,Qualified}RetroactiveInterfaceInstance.daml EXPECTED daml-doc
* Add daml-doc test case for interface instance in interface
* Generalize runDamldoc to runDamldocMany
* Generalize damldocExpect to damldocExpectMany
* Add daml-doc test cases for qualified interface instance anchors
* Extract interface viewtypes in daml-doc
* Render interface viewtypes in daml-doc
* Update EXPECTED daml-doc for daml-test-files with interface viewtypes
* Add comment for use of partial function (Data.Map.Strict.!)
changelog_begin
changelog_end
* Add version 1.15 - move interfaces into them
* Update Ast/Version & docs for 1.15, split interface into simple/extended
* Stage 1.15 protobuf
* Remove references to dev from 1.15 protobufs
* Add Tests file for 1.15 in ledger API testtool
* Update Version 1.15 changelog with Call/implements
* Make 1.14 default again
* Add 1.15 as preview version
* Add 1.15 test suite to testtool
* Reinclude 1.15 in COMPILER_LF_VERSIONS to build model-tests-1.15
* Move v1_15 ledger-api-tests into own suite
* Fix InterfaceNotSupported message to 1.15 or higher
* satisfy changelog check
CHANGELOG_BEGIN
CHANGELOG_END
* Update tests with extended interface features to only run on 1.dev
* Allow unsafe_from_interface and interface_template_type_rep in 1.15
* Fix StableVersions back to 1.14, make EarlyAccessVersions 1.15
* Run retroactive implements tests only in extended interfaces
* lint
* Temporarily disable 1.15 conformance tests - handle in another PR
* Also disable conformance-test-tls1.2-or-newer-1.15
* Disable PureConfigReaderWriter tests that assume early-access == stable
* lint
* 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
* Remove -XRankNTypes in DA.Daml.LF.TypeChecker.Check
* Add TemplateOrInterface type in Haskell
* Define type InterfaceInstanceHead in daml-lf-ast
* Define 'lookupInterfaceInstance'
* Use lookupInterfaceInstance for checking implemented interfaces
* Use lookupInterfaceInstance for checking required interfaces
* Extract checkInterfaceInstance from checkIfaceImplementation
* Reword 'implements' errors in terms of interface instances
* Introduce tmplParam in checkInterfaceInstance
* Check interface instances in interface
* Add InterfacePart argument to ContextDefInterface
changelog_begin
changelog_end
changelog_begin
- [Daml Stdlib] Add `insertWith` to `DA.Map` which allows combining
the newly inserted value with the existing value (if any).
changelog_end
* Point to new GHC with errors for missing views
* Add placeholder view to ImplementsNonInterface
* Fix doc comment in InterfaceViewNotSpecified
* Add test for error when method named `view` is declared
* Add placeholder unit viewtype to doc tests
* Update err message in ImplementsNonInterface - error now detected in LF
* empty changelog commit
CHANGELOG_BEGIN
CHANGELOG_END
* Extract interface views from binds instead of 'md_insts'
* Extract interface binds together
* Define and use pattern 'HasMethodDFunId' to extract 'HasMethod' instances
* Extract interface methods in 'scrapeInterfaceBinds'
* Extract interface requirements in 'scrapeInterfaceBinds'
* Include locations in InterfaceBinds.ibMethods
* Introduce 'InterfaceInstanceGroup' newtype
* Extract interface instance binds together in 'scrapeInterfaceInstanceBinds'
* Extract 'convertInterfaceInstance' from 'convertImplements'
* Update expected error in daml-test-file ImplementsNonInterface
changelog_begin
changelog_end
* Test that invalidly typed contracts are rejected
CHANGLELOG_BEGIN
* Engine/speedy-level tests for explicit disclosure (#14227): test that invalidly typed contracts are rejected.
CHANGELOG_END
* 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
Add key hash to scenario service error reporting
CHANGELOG_BEGIN
* Engine/speedy-level tests for explicit disclosure (#14227): Add key hash to scenario service error reporting.
CHANGELOG_END
* data-dependencies: accept Unit as a valid dfun body
changelog_begin
* data-dependencies: fixed a bug in the handling of instances of typeclasses without methods (#14585)
changelog_end
* 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
* LF conversion: split Env type into Env+ModuleContents
Env is now limited to information _about_ the module and the compilation environment, as well as compiler state such as local aliases and a fresh tyvar name supply
ModuleContents has the fields from old Env which are extracted from type, class and function declarations in the module being converted
* rename x=>coreModule
* Extract convertBinds function
* Extract convertTypeDefs function
* move binds into ModuleContents
* Move typeDefs into ModuleContents
* Move depOrphanModules into ModuleContents
* Move exports into ModuleContents
* Move fixities into ModuleContents
* Extract mkEnv function
* Extract convertModuleContents function
* Remove unused fields {Env,DamlEnv}.envIsGenerated
* Remove unused field ModuleContents.mcInterfaceChoiceData
* Remove unused field ModuleContents.mcInterfaceBinds
changelog_begin
changelog_end
* Damlc: Remove precondition for interfaces
follow up of #14511, goes together with digital-asset/ghc#129
* Address Ackerman's review
* Update ghc rev
CHANGELOG_BEGIN
CHANGELOG_END
* Basic explicit disclosure testing
CHANGELOG_BEGIN
* Engine/speedy-level tests for explicit disclosure (#14227): test that explicit disclosure works for contracts and keys.
CHANGELOG_END
* Point to new GHC version with viewtype and view syntax
* Make minimum modifications to erase newly generated view code
CHANGELOG_BEGIN
CHANGELOG_END
* Point to updated GHC - no longer requires viewtype/view at syntax level
* Add DA_Internal_Interface to convertTypeDef exclusion check
* Move desugared types/values for interface views into DA.Internal.Desugar
* Disable unused TypeFamilies extension in DA.Internal.Interface
* Point to updated GHC, "Remove shortViewName"
* Update to latest GHc view syntax changes
* Update GHC to merged view syntax changes
* 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
* Update GHC patch
* Add daml-test-files for overlapping methods and fields
* changelog
changelog_begin
* [daml] Programs where a class method overlaps with a record field are no longer accepted (#14390)
changelog_end
* 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>
* 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
fixes#14230
CHANGELOG_BEGIN
- [Bug Fix] fix DA.Foldable Standard library. Both DA.Foldable.foldl
and DA.Foldable.toList were recuring in the wrong direction.
CHANGELOG_END
CHANGELOG_BEGIN
[DAML Studio] as the `parent` and `rolledbackBy` fields of `LedgerNodeInfo` are not used within the code base, they have been removed.
CHANGELOG_END
* fixes#14183
CHANGELOG_BEGIN
- [DAML Studio] Refactor and simplification of Transaction#processNodes to avoid need for custom state during processing. Refactor of Transaction#processTransaction to make processing workflow more transparent and easier to unit test. See https://github.com/digital-asset/daml/issues/14183 for details.
CHANGELOG_END
* Improve error for `implements` on non-interface using GHC source-map
* Pass source location for implements directly
* Update GHC revision to pick up updated implements location
* Change revision to point to merged GHC source location changes
CHANGELOG_BEGIN
CHANGELOG_END
* Handlers output strings in convertInterfaceTyCon
* Improve error for requires on non-interface
* Use prettyPrint instead of GHC.showSDocUnsafe . ppr
* Test error messages for implement/require noninterface
* Fix error line numbers, point to merged GHC changes instead of branch
* Enable interfaces in new tests, Fix copyright year
* Add trailing newline to interface tests
Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Add simpleImportTestOptions helper
* Add failing test
* data-dependencies: Generate opaque constructor for interfaces
changelog_begin
changelog_end
* Add comment in test case
* 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>
This is a follow up of #14175 and #14176.
Basically
- we kill the `On` mode which is not used anymore.
- we factorize the visibility check.
- we rename `LocalContractNotVisible` into `ContractNotVisible`
CHANGELOG_BEGIN
CHANGELOG_END
* Show key in transaction log when exercising by key
* Only show key if key was actually used
* Show key if used by a fetch in transaction view
* Add test for key showing up in log on fetch/exercise
* CHANGELOG_BEGIN
Display key used by exerciseByKey and fetchByKey in transaction log
CHANGELOG_END
* Dummy commit for CHANGELOG
changelog_begin
changelog_end
* Use "by key" instead of "using key", to better match function names
* Test that key is only reported when ByKey is used
* fixes#13835
CHANGELOG_BEGIN
- [Daml Studio] Fix a bug where some contracts were considered inactive even though their consumption was under a rollback. See https://github.com/digital-asset/daml/issues/13835 for details
CHANGELOG_END
* Add missing activeness check when reading from globalKeyInputs
changelog_begin
- Engine. Fix lookup by key. See issue Lookup archived contracts may succeed when combined with rollback exceptions #14107 for more details.
changelog_end
* Add failing test
* Do not overwrite existing dalfs when installing a dar dependency
changelog_begin
* data-dependencies: fixed an issue with the handling of transitive dependencies through a data-dependency (#13981)
changelog_end
* Add integration test for runtime check of contract id in contract key
* Replace 'LookupKeyed' with 'FetchKeyed' in 'blindFetch' scenario
changelog_begin
changelog_end
* Replace 'FetchKeyed' with 'LookupKeyed' in 'divulgeeLookup' scenario
* Add failing test case
* Use convTypeLiftingConstraintTuples for superclasses
changelog_begin
* data-dependencies: fixed an issue with the handling of constraint synonyms in superclasses (#13916)"
changelog_end
This changes the output of `daml test`, such that at the end of the test
suite a summary is printed, indicating which tests failed and which
passed.
Fixes#13535.
CHANGELOG_BEGIN
CHANGELOG_END
* Add parens around 'fromAnyException' view pattern in '_tryCatch' desugaring
* Add parens around desugared 'setField' calls and around its first argument.
* Update desugaring golden files
* Add golden test for parens around 'setField' in renamed daml
changelog_begin
changelog_end
This adds an option to specify a pattern such that only tests containing
the given pattern in their name will be executed.
Fixes#13534.
CHANGELOG_BEGIN
CHANGELOG_END
* ifaces:support exercising by required interface
This adds support to exercise an interface choice on a contract ID,
where the interface is required by one of the implemented interfaces of
the contract template.
Fixes#13434.
CHANGELOG_BEGIN
CHANGELOG_END
* some improvements based on review
* added a test plus a bugfix
* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/PhaseOne.scala
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* 2 more interface tests for the command preprocessor
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Add Keyability check in DA.Daml.LF.TypeChecker
* Update expected errors in daml-test-files/ContractIdInContractKey.daml
* Update no-contract-ids-in-keys daml-lf scenario test to circumvent new check
changelog_begin
[Daml Compiler] Implemented compile-time check disallowing ContractId types in contract key types. This check looks for potential problems with the contract key type only within the template's module.
changelog_end
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* ghc-lib:remove unused let bindings
This updates ghc-lib, such that no unused let bindings are created in
Archive choices.
Fixes#13431.
CHANGELOG_BEGIN
CHANGELOG_END
* update ghc-lib hash
* Update of InterfaceDesugared.daml
changelog_begin
- [Daml Stdlib] Add `unionWith` function. `unionWith` is a more
flexible version of `union` that accepts a function to combine
values found in both maps.
changelog_end
* Generalize buildLfPackageGraph to arbitrary payload type
* Reinstate 'data-dependencies + exposed-modules' test without quickcheck
* Add property-based test on the graph resulting from buildLfPackageGraph'
changelog_begin
changelog_end
* 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: Make fromInterfaceContractId pure.
This PR changes `fromInterfaceContractId` to make it pure. This means
it cannot verify the contract id coercion, and should only be used
with care. To balance this, this PR also adds `fetchFromInterface` which
combines a `fetch` with a `fromInterface` and `fromInterfaceContractId`,
to serve as a safer alternative to `fromInterfaceContractId`, and is more
useful than the old `fromInterfaceContractId` since it also returns the
fetched & converted contract payload.
changelog_begin
changelog_end
* fix integration tests
* add submitMustFail tests for fromInterfaceContractId
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
Previously, all dependencies were installed first in a single step, and then
the data-dependencies were installed according to the dependency graph.
This failed for dependencies with data-dependencies since those are processed later.
This was achieved by installing _all_ dependencies and data-dependencies according to the
dependency graph. Additionally, to ensure that the instance-rewriting behavior is preserved,
the dependency graph is extended with edges from each data-dependency to the subset of
dependencies without data-dependencies.
[instance rewriting behaviour: the class instances from data-dependencies are rewritten
to refer to a matching class definition from a dependency when such a class definition exists.
]
* Add edges from each data-dependency to all dependencies without data-dependencies
* Generate stub sources inside for loop
* Update PackageMap manually
* Make PackageNode a sum type
* Add TODO for replacing recachePkgDb
* Tests
* Generalize 'data-dependencies + exposed-modules' test with QuickCheck
* Add test for building a project where a dependency has a data-dependency
* Add test for building a project where a dependency has a data-dependency which is a plain dependency of the main project
* Add test for building a project where a dependency has a data-dependency which is not a dependency of any kind of the main project
changelog_begin
changelog_end
We encounter that when there are no transactions which can happen
legitimately if you’re testing pure functions.
fixes#11244
changelog_begin
- [Daml Studio] Fix an issue where script views failed to display if
there were no transactions. Now you can see trace messages even in
those cases.
changelog_end
* Replace scenario messages with script
In theory we could try to be clever and print the "right" thing. In
practice, scenarios are almost dead so the complexity for that doesn’t
seem worth it.
fixes#13178
changelog_begin
changelog_end
* .
* Speed up Daml repl startup
Daml repl startup is stupidly slow to the point where starting up and
executing 1+1 takes ~7s (piped to stdin so no typing included).
This PR speeds this up to ~4.5s. In addition to that, we also display
the repl process sooner and complete the last bit of setup while the
user is typing.
Specifically, we do the following:
1. Startup the JVM process in parallel with initializing our package
db and only block on it once it’s started (and remove a stupid 1s
sleep which doesn’t actually matter).
2. Load all packages in one go instead of one by one. This (roughly)
matches how the script service works.
3. Only block on packages being loaded once we start running the
script. Users can type before and we even typecheck their stuff
before.
We could take this further and do even more in parallel with users
typing but this seems to strike a good balance between implementation
complexity, UX (if startup actually fails you get somewhat sensible
errors) & performance.
changelog_begin
changelog_end
* handle tls logs
changelog_begin
changelog_end
* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* s/terminateBarrier/exitBarrier/
changelog_begin
changelog_end
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
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
Process:
- `git ls-files | xargs sed -i 's/DAML/Daml/g'`
- `git add -p`
To review:
- Check for false positives by carefully reviewing the diff in this PR.
- Check for false negatives with `git grep DAML`.
CHANGELOG_BEGIN
- Removed all traces of DAML. This may affect error messages and debug
outputs.
CHANGELOG_END
* 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
This is needed so shared libraries are properly resolved and this
actually works outside of our build. Same issue that broke
damlc_legacy originally and we had someone trying to use cpp on their
own project (whether they should is another question but having it
half working is even worse).
I don’t know how to write a test for this unfortunately. It would only
fail if our nix store is not available which is pretty hard to
simulate. I could spin up a docker image or something but that doesn’t
seem worth the trouble.
fixes#13100
changelog_begin
changelog_end
* 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
* Add test for multiple ensure declarations in interface
* update ghc patch
* Update expected result for daml-doc interface test
changelog_begin
changelog_end
* interfaces:ensure that implementations are ordered
We make sure that the implementations are ordered by insertion in the
Scala AST. This is important to guarantee an evaluation order of the
interface preconditions that is determined by the order of interface
implementations of a template.
CHANGELOG_BEGIN
CHANGELOG_END
* use VectorMap instead of ListMap
The previous way of tracking this only worked for direct children of
rollback nodes but lost the information when there was an exercise
node in between.
Reported in https://discuss.daml.com/t/exception-rollback/4000
changelog_begin
- [Daml Studio] Fix a bug where contracts that have been rolled back
would still show up as active in the table view and in the list of
active contracts at the end of the transaction view. This only
affected display. Fetching those contracts failed and `query` also
did not return those contracts.
changelog_end
* Include orphan instance imports in buildLfPackageGraph
* Add failing test for cross-DAML-LF version data-deps with stdlib orphan instances
* Add failing test for cross-DAML-LF version data-deps with custom orphan instance
changelog_begin
changelog_end
* Upgrade sphinx
Don’t want to be stuck on 1.8.3 forever. The current version is
4.4.0 (this upgrades to 4.3.1 which is the latest in nixpkgs).
I did had to drop footnotebackref. This runs into the same issue as
https://tex.stackexchange.com/questions/137594/hyperref-footnotebackref-in-longtable
but just copying the fix doesn’t work and I don’t understand enough
about the details here to fix this myself.
We have 7 footnotes in the Daml docs + some in the Canton docs. That
does not seem worth sticking on a sphinx version from 2018 for just to
get backreferences from footnotes to the link on the same page.
changelog_begin
changelog_end
* turns out you need fonts maybe
* .
changelog_begin
changelog_end
* suppport :force: in daml-docs
changelog_begin
changelog_end
Part of #12792, this is the builtin we need to be able to effectively
store a TemplateTypeRep inside a template (i.e. you store a string
containing the template id, not a typerep).
changelog_begin
changelog_end
This is completely unmaintained, unused and partially broken so delete
it for now. Worst case, we recover it from Git history.
closes#6550 because it now refers to deleted code.
changelog_begin
changelog_end
I tried to keep the changes somewhat minimal and reuse what is already
there. I think there is a fair amount of cleanup we can do afterwards
but hopefully this way it’s easier to review.
fixes#12837
changelog_begin
- [Daml Script] `daml test-script` has been replaced by `daml script
--all`. The option to spin up a ledger automatically has been
removed and you always have to specify one.
changelog_end
* Disable implicit party allocation in Daml Studio
fixes#12058
This matches what sandbox does in 2.0 so it reduces a source of
inconsistency and potential confusion.
changelog_begin
changelog_end
* Update compiler/scenario-service/protos/scenario_service.proto
Co-authored-by: Remy <remy.haemmerle@daml.com>
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Migrate Haskell tests to Sandbox on X
The diff here looks extremely confusing. sandbox-classic is now
sandbox on x not sandbox classic so this isn’t a typo. It is really
moving to sandbox on x.
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* Replace most scenario references in the docs by Daml script
There are still some left in the Daml studio docs (should be updated)
and in quickstart-java (should be updated but probably not by us
🤷) but I’ll leave those for separate PRs.
changelog_begin
changelog_end
* delete unused code
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
List.foldl1 uses the first argument as the accumulator, whereas
Foldable.foldl1 uses the second argument. I believe the latter is an
oversight (though the documentation doesn't suggest one way or the
other), so swap them here.
As discovered and reported by @gyorgybalazsi on the Daml Forum:
https://discuss.daml.com/t/in-daml-foldl1-works-differently-from-haskell-is-this-intentional/3819
CHANGELOG_BEGIN
- [Daml Standard Library] An argument order in the default
implementation of ``Foldable.foldl1`` was reversed from that of
``DA.List.foldl1``; this incompatibly changes the former to match the
latter.
CHANGELOG_END
Adds a check that experimental primitive is defined in damlc, before you can use it.
This is only for the Haskell side, and only intended so we can catch bugs in the compiler more easily. (It would have caught the bug where `observer` wasn't defined correctly in LFConversion.)
I also removed RESOLVE_VIRTUAL_CREATE since we're not using it anywhere, it has been superseded by UCreateInterface.
changelog_begin
changelog_end
With this change, Daml exerciseByKey use the LF primitive
ExerciseByKey instead of the combinason of FetchByKey + Exercise.
CHANGELOG_BEGIN
CHANGELOG_END
The functions are available through typeclasses / typeclass instances
generated during desugaring. Moved the test over to use these, and
discovered a bug in our implementation of `observer`.
changelog_begin
changelog_end
The upgrade to node-fetch 3.x broke our vscode extension because it
can only be loaded from proper ES modules. I tried changing our
tsconfig to emit that but I couldn’t figure out how to make vscode be
happy with an es module extension. So in the end I gave up and stuck
with commonjs and downgraded to node-fetch 2.x which is still in
maintenance mode and gets bugfixes for now.
However that resulted in me finding a bunch of other issues: The
upgrade to new LSP versions resulted in our LSP server crashing on
messages sent by the vscode extension. So I had to upgrade the client
libraries as well to fix that which required upgrading typescript
as well as @types/vscode which forces a bump of the minimum vscode
version. 1.52.0 is from November 2020 so not that concerned but I’ll
let product know in case theyre worried.
With this change things now work correctly and the extension is
backwards compatible with SDK 1.18.0 which matches our usual approach
of trying to get users to install the latest version of the extension.
changelog_begin
- [Daml Studio] The minimum supported vscode version is now 1.52.0.
changelog_end
* Upgrade ghcide
Spun out from the GHC 9 upgrade to make it easier to review. All
credit goes to Moisés.
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
Co-authored-by: Moisés Ackerman <6054733+akrmn@users.noreply.github.com>
* damlc: Don't rely on polymorphic constant worker
Fixes https://github.com/digital-asset/daml/issues/12166 which was
caused by assuming that GHC would create a "worker function" for
all constructors. GHC doesn't create one if the constructor takes
no arguments. This only caused a problem with partially applied
constructors, so, it only applies to zero argument constructors of
polymorphic types in situations where the type argument is eta-reduced.
changelog_begin
changelog_end
* rename the test file
* Update compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
I got unreasonably confused why we sometimes pass `Nothing` here and
why the templates are sometimes unused so this PR attempts to clarify
this a bit.
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
* Make UserId properly opaque by defining it as a variant instead of as a record.
changelog_begin
changelog_end
* hand coded Show instance for UserId
* rename: userName --> userIdToText
* Add missing serializability checks for interfaces
The checks for argument & result type were missing before. I openey
https://github.com/digital-asset/daml/issues/12482 to do the same fix
on the Scala side.
fixes#12475
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* Remove user-management error cases from scenario-service proto.
changelog_begin
changelog_end
* remove Error.UserManagement
* remove UserManagememtError
* simp
* meh... done over by scala's poor excuse for a type system
* Error handling for User Management exposed via daml-script
changelog_begin
changelog_end
adapt ScriptTest.daml to new user-management interface
adapt create-daml-app Setup.daml to new user-management interface
* Add deriving Ord for UserId
* change example of invalid user-id char to "%" from "." (which is no longer illegal)
* recover/reify ALREADY_EXISTS from GrpcLedgerClient.createuser
* fix testcase expected order of users from daml-script listUsers
* adapt create-saml-app Setup.daml to changed interface of user-management
* reinstate sort lost in merge
* sort user in ScriptService user-management test
* improve comment for error foobar hack
* improve doc comment for validateUserId
* use upper case as test example for invalid user-id
This upgrades vsce to the latest version and also markdown-it which is
unfortunately still pinned to an older version with a vulnerability.
There are some minor changes required to our invocations of vsce. I
tried to test this locally up to the point where it fails due to me
not having a token. We’ll only fully see it working after the next
stable release unfortunately.
changelog_begin
changelog_end
* Add timeouts to polling funcs in daml start.
This PR adds timeouts to some polling functions used in daml start and
the assistant integration tests, and also early exits based on a process
exit status. E.g. waitForHttpServer will make sure some process is
still running, instead of waiting to timeout.
The effect of this is that now whenever there is some error in a
subprocess, daml start and the integration tests will finish early
instead of running forever (or timing out in bazel).
changelog_begin
changelog_end
* missing a readPortFile instance
* Clarify unhandled exception error message
The previous error doesn’t make it clear that this is an exception in
user code rather than a Scala exception in our code.
Daml-lf exception would technically be more correct but I don’t think
it’s helpful here so I went with Daml exception.
changelog_begin
changelog_end
* adjust ledger api test tool
changelog_begin
changelog_end
* Update test assertions
changelog_begin
changelog_end
* fix another assertion
changelog_begin
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
* Set --enable-scenarios to False by default
changelog_begin
changelog_end
* Enable scenarios for shake test
* Add --enable-scenarios=yes for //compiler/lsp-tests
* Add enable_scenarios arg to rules_daml/daml.bzl helpers
* daml_compile
* daml_build_test
* daml_test
* Add enable_scenarios to ledger/test-common helper da_scala_dar_resources_library
* Add --enable-scenarios=yes for //ledger/test-common
* Remove unused scenario in //ledger/test-common PingPong test
* Add --enable-scenarios=yes for //daml-lf/tests
* Add --enable-scenarios=yes for //language-support/java tests
* Add --enable-scenarios=yes for group-chat example
* Add --enable-scenarios for //ledger/sandbox-perf LargeTransaction test
* Add --enable-scenarios=yes for //docs tests
* Add --enable-scenarios=yes for //daml-lf/scenario-interpreter tests
* format bazel
* Add --enable-scenario=yes for 'daml_doc_test's
* Add --enable-scenarios=yes for DamlDocTestIntegration
* Add --enable-scenarios=yes for DamlcTest
* Add --enable-scenarios=yes for Test/DataDependencies
* Add --enable-scenarios=yes for daml-ghc-deterministic.sh
* Add --enable-scenarios=yes for Test.IncrementalBuilds
* Add --enable-scenarios=yes for tests:memory-bond-trading and tests:memory-examples
* Add --enable-scenarios=yes for daml-assistant/integratio-tests
I keep confusing myself because of this and I expect I’m not the only
one. We have this for forM already so this only seems natural.
The definition is in DA.Foldable rather than DA.Internal.Compatible
since it doesn’t make sense to have it imported when you don’t import forA_.
changelog_begin
changelog_end
We erase the call to `mkMethod` in `convertExpr` instead of pattern
matching against the binding. This fixes a bug when the method body
contained statements using typeclass dictionaries such as
`do [2] === [2]`.
CHANGELOG_BEGIN
CHANGELOG_END
* Add --enable-scenarios hidden flag
* Fail LFConversion when a scenario is defined and --enable-scenarios=no
* Remove unused optIsGenerated=True test cases
* Refactor getIntegrationTests
* Add no-scenarios-enabled tests
* Add enable-scenarios flag to scenario-service server
* Add test ensuring that scenario-returning functions are still allowed
* Remove 'enable scripts' option (--daml-script)
* Add --scripts synonym to --scenarios
* Rephrase scenarios flags descriptions
changelog_begin
changelog_end
Previously, it was only applied for messages towards the script
service but not for messages towards the Haskell client. Now we
increase the max size in both directions.
See
https://discuss.daml.com/t/increase-max-message-size-in-daml-studio/3573/9
for the forum thread that raised this.
changelog_begin
- [Daml Studio/Daml Test] The `grpc-max-message-size` field in
`daml.yaml` now also applies to the message that contains the result
of a script.
changelog_end
* Drop damlc code for LF <= 1.11
Still a tiny bit left for pre 1.14 but this covers most of it.
changelog_begin
changelog_end
* delete numeric equal prmitives
changelog_begin
changelog_end
* daml-docs: Refactor context type.
Also remove context and args from templates, since that was
only needed with generic templates v1.
changelog_begin
changelog_end
* fix tests
* Drop non-type synonym code from LF conversion
We stopped emitting LF < 1.8, this is unused and untested at this
point.
changelog_begin
changelog_end
* drop parameter from mkDictProj
changelog_begin
changelog_end
* Update compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Update TODOs to outdated issues.
In particular update a lot of defunct interface TODOs to the LF 1.15
issue (or add the LF 1.15 issue if it's also relevant).
changelog_begin
changelog_end
* typo
* remove numeric/bignumeric todo
* scalafmt!!
* drop choice observer TODO
* interfaces: Prevent circular and non-closed reqs
Updates the haskell side to be more strict about requirements:
- requirements must be transitively closed, so if A requires B, and B requires C,
then A requires C.
- no circular requirements allowed
The logic for circular requirements is a bit duplicated to get a better
error message.
Part of https://github.com/digital-asset/daml/issues/11978
changelog_begin
changelog_end
* Update compiler/daml-lf-tools/src/DA/Daml/LF/TypeChecker/Check.hs
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* take a list in NotClosed error
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
The problem with envEmptyInterfaces is that it can only detect
interfaces in the current module. When you try to implement an
interface across a module boundary, LFConversion has very little
information about the interface.
This PR removes envEmptyInterfaces and simplifies the code
that used it, so it works uniformly for all interfaces
regardless of how many methods it has. The alternative would be
to pass more information into LFConversion, but this seems simpler.
changelog_begin
changelog_end
This adds a couple of doc strings to interfaces to test that they are
properly extracted and shown in the generated documentation.
CHANGELOG_BEGIN
CHANGELOG_END
* interfaces: Add "requires" field in Haskell AST.
Part of #11978. Adds typechecking for this on the interface and
implementation side.
changelog_begin
changelog_end
* Fix all the errors
* Move toInterfaceContractId and fromInterfaceContractId out of Implements class
* Split Implements class into single-method classes
* Define toInterface outside its class to swap type arguments
This allows users to call 'toInterface @Interface', since the type of the template can usually be inferred
* Move interface classes and functions to DA.Internal.Interface
changelog_begin
changelog_end