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
* 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
* Add interfaces to LF spec.
Part of #11349. This PR adds the interface & implements declarations, deals with "requires", and name collisions. I'm leaving expression types and operational semantics to a future PR.
changelog_begin
changelog_end
* missing curly
* change T to I for interfaces
* revisions from Remy
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
* speedy: short circuit precondition checking
Instead of evaluating all preconditions of templates and interfaces we
evaluate preconditions one by one and throw an exception as soon as we
find a failing one.
This implemented via a lazy SBCheckPrecond builtin and a foldleft
expression over the list of preconditions.
CHANGELOG_BEGIN
CHANGELOG_END
* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/Compiler.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* Update daml-lf/interpreter/src/main/scala/com/digitalasset/daml/lf/speedy/SBuiltin.scala
Co-authored-by: Remy <remy.haemmerle@daml.com>
* fix SUnit -> Unit
* tests
Co-authored-by: Remy <remy.haemmerle@daml.com>
* wrap interfaces in SAny in speedy
* expect SAny representation for interfaces in builtins
* Update SBResolveVirtual
* SBResolveSBUInsertFetchNode uses SAnyInterface
* SBResolveSBUBeginExercise uses SAnyInterface
* Wrap 'this' in SAnyInterface for interface preconditions
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
* Extracted kvutils Config to //leger/ledger-runner-config
changelog_begin
changelog_end
* Sandbox-on-X logback.xml does not depend on the kvutils/app one
* Remove unused dependencies
* Add copyright header back
* Remove dependency of SoX on kvutils
The computation of Node version relies on the
`packageToTransactionVersion` field of the PartialTransaction. This
is initialized during the Speedy `Machine` construction with the
compiledPackage used to initialized the Machine. However the
compiledPackage is a mutable field and can be udpated during
interpreation, potentially making the 'PartialTransaction''s
`packageToTransactionVersion` out of date.
This is not a production bug, as production code use the Machine's
`CompiledPackage` in a imutable way (with a mutable
ConcurrentCompilePackage), however this is a problem for testing code
that may use the field in a mutable way (with an immutable
`PureCompiledPackage`).
We solve the issue by making the computation of the version, outise
the PartialTransaction object.
CHANGELOG_BEGING
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>
* 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
* Update kvutils Config and SandboxConfig
* Remove `eager-package-loading` and `scenario` from SandboxConfig
* Add `profile-dir` and `stackTraces` to kvutils Config
* Configurable authService in kvutils
changelog_begin
changelog_end
* Addressed Samir's review comments
* Add back Maximum supported deduplication duration enforcement of 1 hour
During refactoring of #9993, the "unsafe" compilation of the seedy command
has been moved out of the scope of `Engine.runSafely`, whose only purpose
was to catch exceptions thrown by the Speedy compiler.
This fixes the issue and renames the function `runSafely` to
`runCompilkerSafely` to make its purpose more obvious.
This is not a critical bug, as the command preprocessing should ensure
that (1) the command are properly typed and (2) all the dependencies
have been loaded.
CHANGELOG_BEGIN
CHANGELOG_END
from 130 to 125, reason the test is currently flaky (It fails around 20% of the time).
Surprisingly, #12678 seems to have increase the stack usage for the type checker.
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
* Upgrade to Scala 2.13.8
changelog_begin
changelog_end
* Update hash for scala in nixpkgs
* update more hashes for scala upgrade
* Fix most warnings etc.
* Fix remaining errors etc.
* Fix formatting
* Resolve last errors hopefully
* Fix ledger api common build file
* Combine imports & revert accidental change that broke the CI run
* Rename exporting vals to scriptExport & minimize diff
* Remove more wrong changes
* moved warning around
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
* 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