Commit Graph

505 Commits

Author SHA1 Message Date
Moritz Kiefer
4e1c5fedb3
Check visibility for by-key operation of local contracts (#9470)
* Check visibility for by-key operation of local contracts

fixes #9454

I tried out two approaches for this:

1. The one here where we add a new callback. This has the advantage
   that the engine remains oblivious to visibility checks. They are all
   done outside and the engine doesn’t even know about the reading
   parties.
2. Make the engine aware of the reading parties. A start of that is in
   #9458.

Both work in principle but I ended up going for 1 in the end. Doing
half of the visibility checks outside the engine and half inside just
seems worse than the current state.

changelog_begin

- [Daml Engine] Fix a bug where it was possible to
  fetch/lookup/exercise a local contract by key even if the reading parties
  are not stakeholders. See #9454 for details.

changelog_end

* Disable new test on Canton

changelog_begin
changelog_end

* Exclude from compat tests

changelog_begin
changelog_end

* s/LocalLookup/LocalFetch/

changelog_begin
changelog_end

* Address review

changelog_begin
changelog_end
2021-04-22 21:39:12 +02:00
Moritz Kiefer
524d43eacb
Support rollback nodes in scenario service (#9410)
This focuses on the semantics rather than the display in Daml Studio
which needs more work (and seems not all that important at this
stage).

This already uncovered a bug which also applies outside of scenarios:

The consumedBy field was not affected by rollbacks which breaks the
mustBeActive check in partial transactions. This PR fixes this by
caching on try and restoring on rollback.

changelog_begin
changelog_end
2021-04-22 12:52:33 +02:00
nickchapman-da
ffdb71d32a
Create rollback nodes (#9367)
* recode contractValuesInOrder in RollbackTest

* first stab at creating rollback node; tests updated

* Rollback nodes are transparent for the cid scheme

* deativate failing exception tests

changelog_begin
changelog_end

Co-authored-by: Remy Haemmerle <Remy.Haemmerle@daml.com>
2021-04-14 18:51:35 +02:00
Sofia Faro
1627b70427
Pattern matching for RoundingMode (#9381)
* Pattern matching for RoundingMode

- Fix the order of RoundingMode constructors in GHC.Types to match the LF built-in order. Try to match this order across all code and documentation, and added a test for this order.
- Implements pattern matching for RoundingMode. The added machinery could also be useful for solving #5753 in the future.
- Implements Show instance for RoundingMode. (Mainly so we can use them in tests.) Moved BigNumeric Show instance to GHC.Show.

changelog_begin
changelog_end

* mkScrutineeEquality typo

* fix roundingModeLiteralMap order

* Use custom type for building case body

* Factor GeneralisedCaseAlternative into GeneralisedCasePattern

* Fix finalize

* Remove unused bindings
2021-04-13 15:47:16 +00:00
Robin Krom
8480032d85
daml package: bump timeout for tests (#9377)
CHANGELOG_BEGIN
CHANGELOG_END
2021-04-12 09:45:32 +00:00
Robin Krom
f84b6abc05
daml build: add a --access-token-file for remote dependencies (#9358)
* daml build: add a --access-token-file for remote dependencies

This adds a `ledger.access-token-file` field in the `daml.yaml` project
file and a `--access-token-file` flag to `daml build` to authorize
querying/fetching of remote dependencies.

CHANGELOG_BEGIN
[daml build] A new flag `--access-token-file` is added for the `daml
build` command. It allows the specify the path to an access token to
authenticate against the ledger API. This is needed if the project
depends on a remote Daml package hosted on such a ledger. Alternatively,
the path to the token can also be specified in the `daml.yaml` project
file under the `ledger.access-token-file` field.
CHANGELOG_END
2021-04-08 23:20:52 +02:00
Sofia Faro
06701f7d5e
Expose rounding modes as constructors + add BigNumeric docs. (#9336)
* Expose rounding modes as constructors.

This PR exposes the rounding modes as constructors for RoundingMode. Pattern matching for RoundingMode is not implemented and not critical (will open a separate issue).

This PR also adds documentation for BigNumeric.

changelog_begin
changelog_end

* Fix rounding mode literals

* Update data-types.rst

* expose constructors

* expose constructors (part 2)

* Update compiler/damlc/daml-prim-src/GHC/Types.daml

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Try to improve `Numeric n` description.

* Add message for RoundingMode match and a test.

* Restrict RoundingMode test to 1.dev

* Update version numbers to 1.13

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-04-07 14:58:31 +00:00
Remy
568a8528a8
LF: release preview of LF 1.13 (#9329)
CHANGELOG_BEGIN
- Daml: (Early access) add support for BigNumeric
CHANGELOG_END
2021-04-07 12:42:54 +02:00
Sofia Faro
f2e0464227
Add BigNumeric literals in Daml. (#9289)
* Add BigNumeric literals in Daml.

Adds support for BigNumeric literals (when available). Only literals that will fit in a single Numeric are supported for now.

I introduced the `IsNumeric t` typeclass because this is an easy way to restrict `fromRational` without moving it into its own typeclass. (Moving it into a typeclass causes some gnarly problems with the specializer -- it starts creating references to GHC.Real in an attempt to optimize the invocation, and that's a problem because  GHC.Real doesn't exist in LF.)

I then added the "fromNumeric" and "fromBigNumeric" conversion functions in that class, since they seem really convenient, and it also means we could in the future make it so that any type that implements `IsNumeric` gains literals (via Numeric or BigNumeric literals). This would improve a lot of Numeric code, since it eliminates the need to annotate types so often! But for now only Numeric and BigNumeric literals are supported.

changelog_begin
changelog_end

* lint

* Add test for too large bigNumeric
2021-03-31 13:39:39 +00:00
Robin Krom
b4bda47e7d
remote pkgs: resolve package names in data dependencies via ledger (#9270)
* remote pkgs: resolve package names in data dependencies via ledger

This implements part 3) of #8976.

This adds the ability to specify package names/versions in daml.yaml in
the data-dependencies stanza. They are being resolved via the project
ledger and a daml.lock lock file.

CHANGELOG_BEGIN
  [remote dependencies] Package names and versions, as well as package
  ID's are allowed in the `data-dependencies` list of `daml.yaml`. These
  packages are fetched from the project ledger. The auto-generated
  `daml.lock` file keeps track of the package name/version to package
  ID's resolution and should be checked in to version control of the
  project.
CHANGELOG_END

* added docs

* Update compiler/damlc/lib/DA/Cli/Damlc/DependencyDb.hs

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* Update docs/source/daml/reference/packages.rst

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* suggestions

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-03-31 15:37:36 +02:00
Andreas Herrmann
4edefbc2d9
Generate DALFs for data-dependencies in Daml script dump (#9265)
* Don't mark dalfs in data-dependencies as main dalfs

This causes the LF version consistency check to fail on DALF data
dependencies that were generated with a different LF version and also
occur in dalfsFromDependencies. E.g. a dalf like `daml-prim-DA-Types`
triggers this issue.

changelog_begin
- [DAML Compiler] DALFs in data-dependencies that are imported directly
  now require corresponding `--package` flags to make them visible. The
  reason for this is that DALFs that are data-dependencies are no longer
  treated as main DALFs.
changelog_end

* Daml script dump write DALFs instead of DARs

Produces DALFs for dependencies and adds them to the data-dependencies.
Package flags for main DALFs are added to the build options.

* Update test-cases

* address review

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2021-03-31 10:14:56 +02:00
Sofia Faro
f670daec6f
Add try-catch syntax. (#9203)
* Add try-catch syntax.

changelog_begin
changelog_end

* ++

* +++

* ++[>++<-]>

* ++[>++<-]>+

* ++[>+++<-]>

* ++[>+++<-]>+

* ++[>++++<-]>

* Use try-catch in ExceptionSyntax test

* add a syntax test for try catch

* +++[>+++<-]>

* +++[>+++<-]>+

* enable test4

* typo

* add a test with multiple patterns and guards

* final patch sha

* update stack snapshot (unix)

* update stack snapshot (win)
2021-03-25 13:36:09 +00:00
Moritz Kiefer
39377e88d6
Add unique(on)? to DA.List.BuiltinOrder (#9233)
changelog_begin

- [Daml Stdlib] Add unique(on)? as more efficient versions of unique,
  uniqueOn using the builtin daml-lf ordering.

changelog_end
2021-03-25 13:14:15 +01:00
Moritz Kiefer
a8cb170ed1
Add Ord instances for Any(Template|Choice|ContractKey) (#9224)
* Add Ord instances for Any(Template|Choice|ContractKey)

This is useful to use them as map keys. We have a large application
that currently does a linear search over a potentially very large set
of contracts which can be replaced with a map lookup with this.

changelog_begin
changelog_end

* Match builtin equality for Any(Template|Choice|ContractKey)

changelog_begin
changelog_end

* Use primitives directly

changelog_begin
changelog_end
2021-03-24 16:33:14 +01:00
Moritz Kiefer
81c710f8fc
Add DA.List.BuiltinOrder module (#9226)
This provides variants of `dedup*` and `sort*` which rely on Daml-LF’s
builtin ordering (using Map internally). I don’t have microbenchmarks
but even in macrobenchmarks this is a measurable improvement which
isn’t particularly surprising.

changelog_begin

- [Daml Stdlib] Add `DA.List.Builtinorder` module. This module provides
  variants of `sort*` and `dedup*` which rely on Daml-LF’s builtin
  ordering and are significantly more efficient in some cases.

changelog_end
2021-03-24 16:33:05 +01:00
Moritz Kiefer
90c5ce703a
Optimize mapOptional and add more efficient findOptional (#9214)
* Optimize mapOptional and add more efficient findOptional

Given that we don’t have list fusion catOptionals . map f is clearly
less efficient than this version.

I also added findOptional which can be pretty handy in certain cases.

changelog_begin
changelog_end

* more foldr

changelog_begin
changelog_end

* fix tests

changelog_begin
changelog_end
2021-03-23 17:07:45 +00:00
Robin Krom
f89aa294e5
damlc pkg: use cache for already present packages (#9193)
* damlc pkg: use cache for already present packages

This only downloads packages from a remote ledger, if the package is not
already present in the dependency db as a normal dependency.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-22 13:57:38 +01:00
Robin Krom
8c64f120da
pkgid data deps (#9153)
* damlc: Allow package IDs in data-dependencies.

This is the next step outlined in issue #8976. If package id's are
present in the `data-dependency` section of the daml.yaml file, we try
to fetch them (and their transitive dependencies) from the default
ledger of the project.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-18 12:17:38 +01:00
Sofia Faro
c26c349c8b
Generate exception instances from syntax. (#9140)
* Generate exception instances from syntax.

changelog_begin
changelog_end

* II

* III

* VII

* update ghc patch and add test

* VIII

* IX

* Remove DatatypeContexts

* X

* update stack snapshot

* don't need datatypecontexts warning anymore

* X-2

* XII

* XIII
2021-03-17 12:19:22 +00:00
Robin Krom
7669d8c88c
daml pkg: split installation of deps and package db inititialization (#9056)
* daml pkg: split installation of deps and package db inititialization

This is the next step for the daml package manager program #8976.
This splits the installation of dependencies from the initialization of
the (ghc) package database.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-12 22:55:11 +01:00
Sofia Faro
e538f2d676
Add DA.Exception and enable LF primitives. (#9082)
- Add `DA.Exception` module that re-exports `DA.Internal.Exception`
while hiding the `DamlException` class.

- Uncommented out the primitive calls in `DA.Internal.Exception`, so
the standard library is actually calling the underlying LF primitives.

- Expanded the `ExceptionDesugared` test to actually throw and catch
an exception. :-)

changelog_begin
changelog_end
2021-03-11 11:42:16 +00:00
Sofia Faro
e6ea8fa9b3
Start adding exception syntax support. (#8960)
* Start adding exception syntax support.

changelog_begin
changelog_end

* .

* ..

* . .

* ....

* .___.

* ..__..

* ._._._.

* update stack snapshot

* recompile ghc-lib

* update stackage

* add CmmParse patch

* incorporate CmmParse.y patch into ghc branch

* Add a first test for exception syntax desugaring.

* Add a test for multiple message declarations

* update ghc patch

* Update duplicate message test with location

* add brackets test

* Add final patch SHA

* update stack-snapshot and unpin for unix

* Update stackage pin on windows
2021-03-10 12:07:53 +00:00
Moritz Kiefer
0281b442b8
-Werror all the things (#9027)
We used to do this for some packages but it broke cpp. I don’t
actually know why it doesn’t do that anymore but I’ll gladly accept
that fact and turn it on everywhere.

changelog_begin
changelog_end
2021-03-04 19:08:59 +01:00
Moritz Kiefer
2c08586d33
Expose Daml stacktraces for Daml Script errors (#9025)
* Expose Daml stacktraces for Daml Script errors

This finally plugs together the pieces from the previous PRs to
provide stacktraces on any ScriptF command (and thereby anything
involving an interaction with the ledger).

fixes #8754

changelog_begin

- [Daml Script] When running Daml Script on the command line you will
  now see a Daml stacktrace on failures to interact with the ledger
  which makes it significantly easier to track down which of the calls
  fails. By default, you will only get the callsite of functions like
  `submit`. To extend the stack trace, add `HasCallStack` constraints
  to functions and those will also be included.

changelog_end

* Fix non-determinism in tests

changelog_begin
changelog_end

* fmt

changelog_begin
changelog_end
2021-03-04 16:13:50 +01:00
Moritz Kiefer
e5421288d9
Improve errors on duplicate record field names (#9010)
* Improve errors on duplicate record field names

fixes #8994

changelog_begin
changelog_end

* Apparently I was wrong about names

changelog_begin
changelog_end

* hlint

changelog_begin
changelog_end

* newlines don’t render well in daml build

changelog_begin
changelog_end

* maybe I should test if my code compiles before pushing

changelog_begin
changelog_end
2021-03-04 10:13:24 +01:00
Robin Krom
7490832966
damlc-test: add 'large' label to BUILD (#8997)
Hopefully this gives the tests more time to complete on the mac nodes.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-03 11:38:57 +00:00
Robin Krom
11ec339f6f
feature: damlc lints all files in project directory (#8979)
* feature: damlc lints all files in project directory

fixes #8887.

This changes the input options of `damlc lint` to take several files. If
no file is given, all `.daml` files contained in the directory are
linted.

CHANGELOG_BEGIN
CHANGELOG_END
2021-03-02 15:50:57 +01:00
Moritz Kiefer
514bf2597e
Include table view for failed scripts (#8967)
fixes #8966

changelog_begin

- [Daml Studio] Failed scripts (and scenarios) now also offer the
  option to view the table view at the state before the failing
  transaction to ease debugging.

changelog_end
2021-03-01 09:58:01 +01:00
Robin Krom
012b04368d
damlc test: feature: add --all flag. (#8919)
* damlc test: feature: add --all flag.

This adds a flag `--all` that will test all present scenarios/scripts in
the code and also report code coverage with respect to all present
templates/choices, whereas without the flag, code coverage is reported
relative to a single package.

CHANGELOG_BEGIN
[damlc test] Added a `--all` flag to test all present scripts/scenarios.
CHANGELOG_END
2021-02-26 18:44:40 +01:00
Moritz Kiefer
275eaedd2a
Fix closure references in Daml Repl (#8950)
* Fix closure references in Daml Repl

Turns out the comment "we probably need to extend this to merge the
modules from each line" was exactly correct: If the result evaluates
to a closure (or a value including a closure), it can reference
definitions from the current module. This happens if the simplifier
lifted something out of the current definition (otherwise we have only
one and it cannot be recursive so no chance of leaking a reference).

This PR fixes this by checking whether the result references the
current module and if it does, we keep it around.

changelog_begin
changelog_end

* Address review comments

changelog_begin
changelog_end

* fmt

changelog_begin
changelog_end
2021-02-26 13:29:42 +00:00
Remy
a9b035e92e
LF: release LF 1.12 (#8856)
CHANGELOG_BEGIN

    - [LF] Release LF 1.12. This version reduce the size of transaction

    - [Compiler]: Change the default LF output from 1.8 to 1.11.

CHANGELOG_END
2021-02-24 21:17:33 +01:00
Remy
d17dd7e5f1
Ledger API test tool: test against legacy and preview version. (#8913)
* Ledger API test tool: test against legacy and preview version.

+ use dictionary instead of alias to map version keywords to LF version 

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-23 09:19:17 +01:00
Remy
d92f2c7003
Ledger: refactor bazel packaging of tedger test tool (#8894)
improve previous generalization from #8695

- use lf version instead keyword (like 'stable', 'latest', 'dev') to
  tag actual target.  This will allow two keywords to map to the same
  versions without doing twice the compilation/test work.

- use alias to map keywords tag target to versioned tag target.

- move package manage dar to test_commong.

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-22 11:41:19 +01:00
Moritz Kiefer
777749539c
Draw the rest of the Scala 2.13 owl (#8852)
* Draw the rest of the Scala 2.13 owl

Not quite but pretty close and this switches us over from inclusions
to exclusions which makes it much easier to track.

Ledger API test tool should be fixed by #8821. Non-repudiation needs a
tiny bit of work since unwrapArray doesn’t work the same on 2.13 but
shouldn’t be hard to fix.

changelog_begin
changelog_end

* Fix ScriptService tests

Those tests were all dumb. They asserted on a fixed order while the
function to sort the things was broken so we ended up with the random
Map order which is unsurprisingly not the same.

This is easily fixed by fixing the sort function.

There is also a second issue with query not sorting.

changelog_begin
changelog_end

* Turns out if you fix one test the next one breaks

And clearly nobody ever tested this or give this a second thought.

changelog_begin
changelog_end
2021-02-15 19:20:24 +00:00
Robin Krom
5ec36e4ff9
damlc test: show full coverage report (#8834)
* damlc test: show full coverage report

We add a flag `show-coverage` to `damlc-test` to show templates that
are never created and choices that are never executed during the tests.

CHANGELOG_BEGIN
[damlc test] A new flag `show-coverage` shows full test coverage
reports.
CHANGELOG_END
2021-02-15 16:40:13 +01:00
Sofia Faro
34fe42237d
data-deps: Dont let defaults leak constraints. (#8833)
* data-deps: Dont let defaults leak constraints.

Fixes #8802

changelog_begin
changelog_end

* use expandSynApp instead of expandTypeSynonyms

* revert isConstraint change

* fix indentation
2021-02-12 15:44:29 +00:00
Moritz Kiefer
f15a2a36b0
Bump DLint to include fix for disable comments (#8820)
changelog_begin

- [DLint] You can now disable dlint hints for a specific functions in
  the form `{- DLINT ignore functionName "hintName" -}`, e.g.,

```
{- DLINT ignore noHint "Use concatMap" -}
noHint f xs = concat (map f xs)
```

Note: The undocumented {- HLINT -} pragmas are no longer supported.

changelog_end
2021-02-12 11:13:44 +01:00
Robin Krom
49d957bec1
damlc: show test coverage (#8810)
* damlc: show test coverage

We add output to show percentage of created templates and executed
choices for `damlc test`.

This fixes #6370.

CHANGELOG_BEGIN
[damlc] Feature: Test coverage is reported for `damlc test`.
CHANGELOG_END

* added a test

* Update compiler/damlc/lib/DA/Cli/Damlc/Test.hs

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>

* suggestions

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2021-02-11 17:08:41 +01:00
Sofia Faro
2943c4089c
Pick up user-defined exceptions in LFConversion. (#8777)
This uses a "DamlException" tag to annotate which types should
be exported as exceptions. This tag will be added during the
desugaring of exceptions.

The code that scrapes for the HasMessage instance is based on the
corresponding template instance scraping code, but simplified since
we only have to pick up one instance. If we decide to pack more
information into the DefException structure in the future, we can
easily extend this.

This PR also adds a small test to make sure that a user-defined
exception is exported as such.

changelog_begin
changelog_end
2021-02-09 12:27:09 +00:00
Moritz Kiefer
4b33da2420
Expose transaction trees in DAML Script (#8750)
This is spun off from #7934 for ease of review.

For now, all of this is hidden (and for extra caution also marked as
early access). I expect we’ll tweak the API in a bunch of ways before
marking it stable but this at least is sufficient for the prototype.

At this point, we cannot support this over the JSON API. Not too
worried about that at least for now.

fixes #7847

changelog_begin
changelog_end
2021-02-04 15:21:30 +01:00
Martin Huschenbett
06a33d2c53
DLint: Disable "Redundant pure" lint by default (#8733)
* DLint: Disable "Redundant pure" lint by default

When using `ApplicativeDo`, e.g. in Daml Scripts, a final pure might be
necessary although it would be redundant in a monadic context. This
leads to spurious warnings from the linter which I found quite
confusing.

CHANGELOG_BEGIN
CHANGELOG_END

* Adjust tests

CHANGELOG_BEGIN
CHANGELOG_END
2021-02-03 17:38:19 +00:00
Sofia Faro
44c7b0bd53
Deprecate DA.Next.Set and DA.Next.Map (#8689)
Fixes #8449

changelog_begin

- [DAML Standard Library] DA.Next.Map and DA.Next.Set are deprecated.
  Please use DA.Map and DA.Set instead, or use DA.TextMap directly
  for ledger API backward compatibility.

changelog_end
2021-01-29 13:29:13 +00:00
Sofia Faro
69b28d2ef2
Add --target=1.12 support in the compiler. (#8673)
* Add --target=1.12 support in the compiler.

changelog_begin

- [DAML Compiler] Add support for ``--target=1.12`` in the DAML compiler.

changelog_end

* version1_12 not version1_11

* Update codegen tests.

* Update codegen tests again

* Fix data-dependencies test.
2021-01-29 12:41:21 +00:00
Sofia Faro
98fe621066
Add DA.Set to match DA.Map (#8651)
* Add DA.Set to match DA.Map

Fixes #8448

changelog_begin
changelog_end

* Make it a stable package

* Add test.

* add map field

* fix stable-packages test

* update Examples.daml
2021-01-28 16:12:16 +00:00
Robin Krom
ce4fff5133
ghcide: update to newest commit (#8665)
* ghcide: update to newest commit

CHANGELOG_BEGIN
CHANGELOG_END

* update golden tests
2021-01-28 15:03:52 +01:00
Robin Krom
036e46a1ee
damlc: check for inconsistent dependencies (#8619)
* damlc: check for inconsistent dependencies

This fixes #8553.

We check that all dependencies have the expected LF version.

CHANGELOG_BEGIN
CHANGELOG_END

* move filter to guard

* turn mainUnitId lookup into set lookup
2021-01-26 12:57:24 +01:00
Moritz Kiefer
e0c5abd647
Switch to GHC 8.10.3 (#8394)
* Switch to GHC 8.10.3

changelog_begin
changelog_end

* Update bazel-haskell-deps.bzl

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>

* Comment on rules_haskell patch

changelog_begin
changelog_end

* .

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2021-01-25 11:53:53 +00:00
Sofia Faro
438c204fc4
Add choice observers in LF spec. (#8592)
* Add choice observers in LF spec.

Part of #7709. Adds choice observers to the syntax, type system, and
and operational semantics of LF. Adds a test for the operational
semantics of choice observers.

changelog_begin
changelog_end

* typo

* remove duplicate rule

* Always have choice observers

* Add comment in serialization section
2021-01-22 13:10:41 +00:00
Sofia Faro
461273bb8f
Cleaning up the eval order tests. (#8580)
When I first wrote these tests I didn't realise you could have the `@ERROR` annotation anywhere in the file so I put them all near the top. This PR is just to move the `@ERROR` annotations closeer to where the error is generated, so it's easier to maintain. This is in preparation for updating the spec & tests for choice observers.

changelog_begin
changelog_end
2021-01-21 11:25:41 +00:00
Robin Krom
aa8c1f8fee
damlc: incremental package db initialization (#8541)
* damlc: incremental package db initialization

We keep a hash over all dependencies of a project in the package
database metadata and only recompute the package database if a
dependency changes, i.e. the computed hash changes.

Fixes #4413.
Fixes #8409.

CHANGELOG_BEGIN
CHANGELOG_END

* using Fingerprint

* added tests

* format

* use SdkVersion instead of hardcoded version

* added a reference in tests

* factored out project file template
2021-01-20 15:52:37 +01:00