Commit Graph

5340 Commits

Author SHA1 Message Date
Moritz Kiefer
73b38f8add
Move besu to commercially supported ledgers (#7560)
changelog_begin
changelog_end
2020-10-02 16:47:19 +00:00
Samir Talwar
aec25d2a49
ledger-on-sql: Use tagged execution contexts and data sources in Database. (#7525)
* metrics: Support tagged Futures when timing.

* ledger-on-sql: Use tagged execution contexts in `Database`.

We have to deal with multiple execution contexts in `Database`. This
makes it possible to use them implicitly, which is much cleaner.

CHANGELOG_BEGIN
CHANGELOG_END

* ledger-on-sql: Simplify `Database` a little.

* ledger-on-sql: Make the connection pool implicit.

* ledger-on-sql: Move the execution context into the connection pool.

* ledger-on-sql: Make connection pools more implicit.

* ledger-on-sql: Use the `sc` prefix for `scala.concurrent`.

* ledger-on-sql: Remove an unnecessary import.
2020-10-02 15:16:05 +00:00
Samir Talwar
059ae41095
participant-integration-api: Increase the migration connection timeout. (#7558)
250ms is a bit low for CI when our database might be overloaded.

5 seconds seems like a decent balance between a quick response and
being sympathetic to slow/overloaded machines.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-02 14:07:23 +00:00
Robin Krom
6a328212f2
language: automatic ts codegen for daml start (#7516)
This executes the code generations specified in the daml.yaml
configuration file on every invocation of `daml start`
and hence frees the user of doing it manually.

CHANGELOG_BEGIN
- [DAML Assistant] The `daml start` now runs all the code generators
specified in the `daml.yaml` project configuration file under the
`codegen` stanza. This frees the user of doing so manually on every
change to the DAML model.
CHANGELOG_END
2020-10-02 15:43:06 +02:00
Richard Kapolnai
3badccfb1f
Rename more contract instance (#7557)
* Replace "contract instance" with "contract" in docs folder
CHANGELOG_BEGIN
CHANGELOG_END

* remove contract instance in docs/source/concepts/glossary.rst

* Remove contract instance explanation docs/source/concepts/glossary.rst

* Update docs/source/concepts/glossary.rst

* Replace contract-contract-instance label ref with contract

* Remove redundant naming

* remove more "contract instance"
CHANGELOG_BEGIN
CHANGELOG_END

* fix comma in doc

Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
2020-10-02 15:30:53 +02:00
Richard Kapolnai
40c1cd5893
Check closing quotes (#7528)
* Missing closing quote in docs
CHANGELOG_BEGIN
CHANGELOG_END

* add Bash script to check missing quotes in docs
CHANGELOG_BEGIN
CHANGELOG_END

* add whitelist

* fix comment

* add CI job
CHANGELOG_BEGIN
CHANGELOG_END

* add CI job to azure pipeline

* use devenv in azure-pipelines.yml

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

* remove unnecessary yml

* fix quotes in Bifunctor.daml

* add check to BUILD.bazel with extended whitelist

* refactor: call bash script from BUILD.bazel

* Revert "use devenv in azure-pipelines.yml"

This reverts commit 28ab2c70fb.

* Revert "add CI job to azure pipeline"

This reverts commit 0eaa5188fe.

* filter whitelist in output too

* Update docs/scripts/check-closing-quotes.sh.whitelist

Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

* fix Bifunctor.daml quotes

* Update docs/scripts/check-closing-quotes.sh.whitelist

Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>

* use ~ instead of ` for section titles

* rename to allowlist

* revert Bifunctor quote changes back to 3 backticks

* fix filename

* Remove line breaks in quotes (#7550)

* remove line breaks in quotes
CHANGELOG_BEGIN
CHANGELOG_END

* remove line breaks in quotes
CHANGELOG_BEGIN
CHANGELOG_END

* README: avoid line breaks

* merge rename

* revert: use triple backticks in Bifunctor

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
2020-10-02 14:53:10 +02:00
Moritz Kiefer
e6c43c798f
Document cookie passing in trigger service auth (#7554)
This has come up 2 times now so seems sensible to point this out
explicitly.

changelog_begin
changelog_end
2020-10-02 14:46:53 +02:00
Moritz Kiefer
1780f4cd93
Fix qualified name handling in DAML REPL (#7544)
* Fix qualified name handling in DAML REPL

This fixes the issue reported in
https://discuss.daml.com/t/how-to-use-qualified-template-names-in-repl-queries/1329/7

We need to print names qualified otherwise, the type signature for
following lines will be ambiguous even if users qualified the name in
their input. Figuring out the right name to use in qualification is
tricky but Luckily GHC provides this already so we just have to make
sure to plug it into the right places.

changelog_begin

- [DAML REPL] Fix a bug where you got an error about a name being
  ambiguous even if you used a qualified name.

changelog_end

* Update compiler/damlc/daml-compiler/src/DA/Daml/Compiler/Repl.hs

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

* Factor out typechecking of imports

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
2020-10-02 12:16:17 +00:00
Richard Kapolnai
70196083c3
Replace "contract instance" with "contract" in docs folder (#4873)
* Replace "contract instance" with "contract" in docs folder
CHANGELOG_BEGIN
CHANGELOG_END

* remove contract instance in docs/source/concepts/glossary.rst

* Remove contract instance explanation docs/source/concepts/glossary.rst

* Update docs/source/concepts/glossary.rst

* Replace contract-contract-instance label ref with contract

* Remove redundant naming
2020-10-02 13:55:56 +02:00
Bernhard Elsner
cfed918e40
Fix bifunctor docs (#7552)
* Fix bifunctor docs

- Remove non-implemented Haddock markup
- Fix code blocks
- Fix Lexer to accept `≡`
- Change Haskell REPL `>>>` to DAML REPL `daml>`

CHANGELOG_BEGIN
CHANGELOG_END

* Further improvements
2020-10-02 11:48:03 +00:00
Martin Huschenbett
6ec61bf506
Write proper SDK version in DAR manifest for snapshots (#7546)
* Write proper SDK version in DAR manifest for snapshots

Currently, we don't write the actual SDK version in the DAR manifest but
rather the version that has been sanitized for `ghc-pkg`. For proper
releases, these are identical but for snapshots the latter does not
contain the `-snapshot` part and the commit hash because `ghc-pkg` can
only handle numeric components.

This PR changes this behaviour such that we write the actual
unsanitized SDK version in the DAR manifest.

The implementation might look a bit unintuitive. However, we use the
`PackageSdkVersion` type for exactly two things:

1. Writing it into the manifest.
2. Using it to initialize the package database.

As mentioned above, the former should not be sanitized whereas the
latter should. So far, we've done the sanitization right after reading
the SDK version from `daml.yaml` or `DAML_SDK_VERSION`. Now, we do the
sanitization only in the code concerned with initializing the package
database.

CHANGELOG_BEGIN
[DAML Compiler]
- Bugfix: write the proper SDK version in the DAR manifest for
  snapshot releases instead of a sanitized version
CHANGELOG_END

* Drop SdkVersion.toGhcPkgVersion entirely

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-02 12:59:18 +02:00
Remy
a3eceb606f
Ledger: revert time change from #7430 (#7541)
CHANGELOG_BEGIN
CHANGELOG_END
2020-10-02 12:25:26 +02:00
Gary Verhaegen
fda2eca084
periodically check signatures (#7543)
This is a first, very incomplete step in the spirit of small,
incremental PRs. Known missing features:

- Should check all versions, not just the 30 most recent ones.
- Should also download from GCP backup and compare.
- Should alert on Slack if anything is unexpected.
- Should handle versions prior to us starting to sign (and do what?).
- Should also check artifacts in Artifactory, not just GitHub Releases.
- Optionally should save to GCP if we don't have a backup already.

So at the moment it's just downloading the artifacts for the 30 most
recent releases and printing a message stating whether we have a
signature and whether it's valid.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-01 21:01:42 +02:00
Andreas Herrmann
c5abcece56
trigger service auth /auth endpoint (#7545)
* Factor out request bodies

Addressing review comment
https://github.com/digital-asset/daml/pull/7519#discussion_r497321689

* Implement /auth endpoint

changelog_begin
changelog_end

* /auth check the required claims

* Factor out middlewareUri

* fmt

* less implicit variables

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-10-01 15:10:38 +00:00
Remy
2f325349ef
Speedy Compiler: factorize and clean code (fixe of #7493) (#7540)
* Revert "Revert "Speedy Compiler: factorize and clean code (#7493)""

This reverts commit d99f35b3cd.

* Speedy: Reintroduce usage of muti-binding let.

This PR fixes recursion issue with `closureConvert` and `freeVars`.
The explosion of muti-binding in single binding makes the function
`closureConvert` crash with stackoverflow in some cases.

We reintroduce the usage of multi-binding let in the first pass of the
compiler. The ANF transformation pass will replace them with nested
single binding let. ANF pass do not have issue with deep expression,
as it handle them with trampoline.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-01 16:58:57 +02:00
Martin Huschenbett
6a0b13ad73
DAML Engine: Remove token argument to SBU* builtins (#7542)
We currently pass the token to all builtins named `SBU*` aka the
update builtins. Since we pass the token immediately on all call sites
of these builtins, there's no point in passing the token at all.

This PR removes the token passing for the `SBU*` builtins.
Unfortunately, this does not improve execution performance. However,
since it simplifies the code, I still consider it worthwhile.

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-01 13:02:00 +00:00
Sofia Faro
0382a62965
Fix data-deps dictionary function name mismatches. (#7539)
* Fix data-deps dictionary function name mismatches.

Fixes #7362. Incredibly, it's possible to fix this issue in
data-dependencies by sorting instance names in a funny way.
This is definitely a hack, but it should fix this issue,
which affects overlapping instances as well.

This PR adds a regression test.

changelog_begin
changelog_end

* Fix comments

* apply suggestion
2020-10-01 12:11:10 +00:00
azure-pipelines[bot]
768ba48516
rotate release duty after 1.6.0-snapshot.20200929.5303.0.f1e58206 (#7523)
@sofiafaro-da is taking care of 1.6.0-snapshot.20200929.5303.0.f1e58206 (#7522), so they get pushed back to the end of the line.

Please do not merge this before #7522.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-01 10:36:46 +02:00
azure-pipelines[bot]
52a6a53b3c
update compat versions for 1.6.0-snapshot.20200930.5312.0.b9a1905d (#7534)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-10-01 10:36:09 +02:00
Remy
29117a1903
Revert "Speedy Compiler: factorize and clean code (#7493)" (#7538)
* Revert "Speedy Compiler: factorize and clean code (#7493)"

This reverts commit 41b96f6203.

* changelog

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-01 08:21:50 +00:00
Remy
41b96f6203
Speedy Compiler: factorize and clean code (#7493)
We factorize scala code in the compiler:

Here are some example of changes:

*  factorize the common part of `compileChoice` and `compileChoiceByKey`
*  factorize the common part of `compileFetch` and `compileFetchByKey`

*  application patterns like
   ```
     SEApp(expr1, Array(expr2))
   ```
    are replaced by:
   ```
    app(expr1, expr2)`
   ```

*  let binding patterns like
   ```
        val x1 = expr1
        val x1Pos = nextPosition()
        SLet(x1, ...)
   ```
    are replaced by pattern
   ```
     let(expr){ x1Pos => ... }
   ```

*  function binding pattern like
   ```
        Abs(1){
          val x1Pos = nextPosition()
          x1
        }
   ```
    are replaced by
   ```
    function{ x1Pos => ... }
   ```

CHANGELOG_BEGIN
CHANGELOG_END
2020-10-01 08:52:25 +02:00
Gary Verhaegen
6419ff2f34
remove leo (#7535)
Leo has left the team and so should not have access anymore.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 18:16:57 +02:00
Gary Verhaegen
ba99b5ab47
backup release artifacts to gcs bucket (#7531)
Right now our artifacts are only stored on GitHub. Should they have any
issue, we're toast, as we can't always rebuild old artifacts. With this
change, we also store our artifacts on a GCS bucket, so we'd need both
GitHub and Google to have simultaneous issues to lose data.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 16:16:32 +02:00
Gary Verhaegen
9828e88054
stop pushing to daml-binaries (#7533)
This was a temporary measure; we're now pushing these artifacts to
standard GitHub releases.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 16:09:44 +02:00
Moritz Kiefer
293e5c55fa
Split DecodeDar into a separate module (#7530)
I originally implemented this for another change where I didn’t need it
in the end. However, it seems like a nice cleanup so spinning it out
into a standalone PR.

changelog_begin
changelog_end
2020-09-30 15:44:22 +02:00
tudor-da
3f31602340
Update Bazel/IntelliJ integration onboarding docs (#7532)
Update `Bazel/IntelliJ integration` docs with instructions
on how to configure the Bazel plugin with the location of the binary
2020-09-30 13:31:52 +00:00
azure-pipelines[bot]
26d949bc51
release 1.6.0-snapshot.20200929.5303.0.f1e58206 (#7522)
* release 1.6.0-snapshot.20200929.5303.0.f1e58206

This PR has been created by a script, which is not very smart and does not have all the context. Please do double-check that the version prefix is correct before merging.

@sofiafaro-da is in charge of this release.

CHANGELOG_BEGIN
CHANGELOG_END

* Bump release commit

changelog_begin
changelog_end

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-09-30 14:17:46 +01:00
Gary Verhaegen
60b300199b
improve "patch bazel windows" UX (#6764)
This does not get used very often so it is likely nobody will remember
how it works when we do use it. It's And due to the ordering Azure makes
of jobs in its UI, it's very easy to miss that there is a final,
Linux-based step and the values are actually printed there.

So this adds a little note to remind us of that.

Note that as this changes the `ci/patch_bazel_windows` folder, this will
also generate a new Bazel, so this PR will also update the Scoop
reference.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 14:09:51 +02:00
Moritz Kiefer
b9a1905dab
Fix exposed packages in DAML REPL (#7529)
To make `--import` work we also need to expose the
packages. Otherwise, we end up with a ton of confusing errors as soon
as you try anything. Luckily, we can do this fairly cheaply by using
the fact that GHC can expose both unit ids as well as just package
names. Until I realized that I started working on a different approach
of reading the DALFs first to resolve unversioned packages but that
seemed much more messy.

changelog_begin
changelog_end
2020-09-30 13:53:42 +02:00
Andreas Herrmann
5a4f1d5d18
trigger service auth /login endpoint (#7519)
* trigger service auth /login endpoint

changelog_begin
changelog_end

* Configure client id and secret through environment

Addressing review comment
https://github.com/digital-asset/daml/pull/7519#discussion_r497303019

* Single flag for OAuth2 server URI

Addressing review comment
https://github.com/digital-asset/daml/pull/7519#discussion_r497301985

* Explain redirectUri in comments

Addressing review comment
https://github.com/digital-asset/daml/pull/7519#discussion_r497305958

* TODO configurable redirect URI

Addressing review comment
https://github.com/digital-asset/daml/pull/7519#discussion_r497318955

* Verify that cookie holds a token

Addressing review comment https://github.com/digital-asset/daml/pull/7519#discussion_r497328320

* fmt

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-09-30 11:38:54 +00:00
Moritz Kiefer
1243afc4a1
Remove reference to release-notes.rst (#7524)
* Remove reference to release-notes.rst

https://github.com/digital-asset/daml/pull/7458 shuffled this
around. While we could update it, it doesn’t really make any sense. We
post our release notes to the blog now and not in the docs so this
whole checkout procedure is redundant. This is also true if we wanted
to make a bugfix release for a release < 1.5 where this file still
existed. The trigger_sha is always on master (following our current
release process) so the file would still not exist.

I did also remove it from the docs cronjob. We never reupload old docs
so this doesn’t make a difference.

changelog_begin
changelog_end

* Stupid whitespace change because windows is pissing me off

changelog_begin
changelog_end
2020-09-30 11:34:43 +00:00
Samir Talwar
5cea224a36
kvutils: Flush export files after each write. (#7527)
This will allow consumers to stream writes as they're written.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 10:48:13 +00:00
Samir Talwar
7adaa78696
kvutils: Run the commit strategies in as parallel a fashion as possible. [KVL-558] (#7520)
* kvutils: Document the deterministic nature of commit strategies.

* kvutils: Run the commit strategies in as parallel a fashion as possible.

Trees are faster than lists.

CHANGELOG_BEGIN
CHANGELOG_END

* kvutils: Move `serializeStateKey` into its own class.
2020-09-30 09:43:03 +00:00
Tamás Kálcza
9d0206fc44
Added undefined function (#7058)
* Added ??? operator.

CHANGELOG_BEGIN
- Added `(???)` to Prelude.
CHANGELOG_END

* Renamed (???) operator to undefined.
2020-09-30 10:56:28 +02:00
Remy
177a49f978
Speedy Profiler: add labels for new SDefinitionRef (#7492)
With this PR, the profiler nicely handles the new SDefinitionRef's added in #7472.

We add labels for:

    'create'
    'exerciseByKey'
    'fetch'
    'fetchByKey'
    'lookupByKey'

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-30 10:24:27 +02:00
nickchapman-da
689582be6e
Tests for all kinds of Authorization Failure. (#7479)
changelog_begin
changelog_end
2020-09-30 09:01:39 +01:00
Stephen Compall
f8e1431a28
more error logging for random transaction stream testing (#7482)
* add parameter information to "fall back to limit-based query with consistent results" test

* run only one test in CI, and run it a lot more

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* considering a grouped reporter

* never mind that

* clean up the error report

* link to #7521

* remove harder testing
2020-09-30 06:18:16 +00:00
Bernhard Elsner
f1e5820655
Intro to DAML Chapter 10 (#7508)
* Some minor improvements to the DAML Intro docs

CHANGELOG_BEGIN
CHANGELOG_END

* Intro to DAML Chapter 8

CHANGELOG_BEGIN
CHANGELOG_END

* Incorporate feedback

* Update docs/source/daml/intro/8_Upgrading.rst

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

* Remove wrong statements about interface files

* Complete rework to focus on dependencies, not upgrades

* Intro to DAML Chapter 9

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

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

* Make the JS code actual JS

* Update Chapter 9 to incorporate Chapter 8 changes

* Copyright headers and feedback

* Intro to DAML Chapter 9

CHANGELOG_BEGIN
CHANGELOG_END

* Intro to DAML Chapter 10

CHANGELOG_BEGIN
CHANGELOG_END

* Incorporate feedback

* Incorporate chapter 8 changes

* Update toctree

* Get rid of warnings

* Explain `when` short circuiting.

* Fix template

* Fix some literal-includes

* Apply suggestions from code review

Co-authored-by: anthonylusardi-da <59614480+anthonylusardi-da@users.noreply.github.com>

* Copyright headers

* Intro to DAML Chapter 11 (#7509)

* Intro to DAML Chapter 9

CHANGELOG_BEGIN
CHANGELOG_END

* Intro to DAML Chapter 10

CHANGELOG_BEGIN
CHANGELOG_END

* Intro to DAML Chapter 11

CHANGELOG_BEGIN
CHANGELOG_END

* Incorporate feedback

* Incorporate chapter 8 changes

* Minor fixes

* Update docs/source/daml/intro/11_Testing.rst

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

* Condense the test tooling section to a minimum

* Apply suggestions from code review

Co-authored-by: anthonylusardi-da <59614480+anthonylusardi-da@users.noreply.github.com>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: anthonylusardi-da <59614480+anthonylusardi-da@users.noreply.github.com>

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: anthonylusardi-da <59614480+anthonylusardi-da@users.noreply.github.com>
2020-09-29 22:24:40 +02:00
Bernhard Elsner
708e3e2543
Intro to DAML Chapter 9 (#7507)
* Some minor improvements to the DAML Intro docs

CHANGELOG_BEGIN
CHANGELOG_END

* Intro to DAML Chapter 8

CHANGELOG_BEGIN
CHANGELOG_END

* Incorporate feedback

* Update docs/source/daml/intro/8_Upgrading.rst

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

* Remove wrong statements about interface files

* Complete rework to focus on dependencies, not upgrades

* Intro to DAML Chapter 9

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

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

* Make the JS code actual JS

* Update Chapter 9 to incorporate Chapter 8 changes

* Copyright headers and feedback

* Update toctree

* Get rid of warnings

* Explain `when` short circuiting.

* Fix template

* Fix some literal-includes

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-09-29 18:30:15 +00:00
Samir Talwar
f0c1eb207c
concurrent: Tag DirectExecutionContext. (#7517)
* concurrent: Tag DirectExecutionContext.

1.  Tag `DirectExecutionContext` as `ExecutionContext[Nothing]`, thereby
    stating that it works for any tagged `Future`.
2.  Move `DirectExecutionContext` to the _libs-scala/concurrent_
    library, as it requires it and it's tiny.

CHANGELOG_BEGIN
CHANGELOG_END

* concurrent: Fix the privacy of `DirectExecutionContextInternal`.

Co-authored-by: Stephen Compall <stephen.compall@daml.com>

Co-authored-by: Stephen Compall <stephen.compall@daml.com>
2020-09-29 17:23:57 +00:00
Samir Talwar
9fa77b61a2
kvutils: Sort the output state before writing. [KVL-558] (#7515)
* kvutils: Always commit serially.

Committing in parallel will cause the set of writes to be emitted in a
random order.

CHANGELOG_BEGIN
- [Integration Kit] In kvutils, the ``BatchedSubmissionValidator`` no
  longer has a parameter for commit parallelism. Commits are now always
  written serially to preserve order.
CHANGELOG_END

* kvutils: Sort the output state before writing.

We previously wrote the output state in a random order, leading to
writes that could not be easily compared for integrity. Sorting them
allows us to validate not just the values, but the order.

This means that the exporter no longer sorts the write set, and the
integrity checker does not sort before checking.

CHANGELOG_BEGIN
- [Integration Kit] In kvutils, state is now sorted before committing.
  This allows us to provide stronger guarantees with regards to the
  serialized write sets.

  If you have implemented your own ``CommitStrategy``, you should also
  ensure the output state is sorted before committing.
CHANGELOG_END

* ledger-on-sql: Implement SQL typeclasses as values, not functions.

Let's pretend performance is important here.

* kvutils: Allow Iterables in batching ledger state operations.

A `Map[Key, Value]` is an `Iterable[(Key, Value)]`, but not a `Seq`.
This allows us to pass a `Map` straight from the committer.

* kvutils: Construct a `SortedMap` in the commit strategy.

This should be more performant than generating and then sorting a
`Vector`.

* kvutils: Sort state updates when committing after pre-execution.
2020-09-29 17:07:11 +00:00
Remy
e6b24d1a5d
Speedy Compiler: compute variable indices more generally. (#7502)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-29 18:54:21 +02:00
Bernhard Elsner
af2607cfe5
Intro to DAML Chapter 8 (#7506)
* Some minor improvements to the DAML Intro docs

CHANGELOG_BEGIN
CHANGELOG_END

* Intro to DAML Chapter 8

CHANGELOG_BEGIN
CHANGELOG_END

* Incorporate feedback

* Update docs/source/daml/intro/8_Upgrading.rst

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

* Remove wrong statements about interface files

* Complete rework to focus on dependencies, not upgrades

* Copyright headers and feedback

* Update toctree

* Get rid of warnings

* Fix template

* Fix tests

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-09-29 16:34:21 +00:00
nickchapman-da
7c038119aa
Improve the user error message if the upload-dar command fails. (#7510)
* Improve the user error message if the upload-dar command fails.

In particular we want to catch the case of a gRPC timeout exception which we know can occur if the DAR is too large. But it seems helpful to catch any exception, and shows what we caught along with the helpful message.

* use safe-exceptions
2020-09-29 14:24:53 +00:00
Sofia Faro
e9cd92f061
Deprecate the "daml 1.2" version header. (#7513)
* changelog_begin

- [DAML] The "daml 1.2" version header is now deprecated.

changelog_end

* fix some line numbers

* fix some more locations
2020-09-29 13:14:59 +00:00
Gary Verhaegen
168345f4a8
let CI delete bazel cache items (#7514)
Recently we have been seeing lots of issues with the Bazel cache. It
does not seem like it would need to delete things, but the issues
cropped up about the same time we restricted the permissions, so it's
worth trying to revert that.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-29 13:56:35 +02:00
Moritz Kiefer
89c0f6ca41
Bump test_sha (#7512)
This changed in #7501 but it’s a harmless change.

changelog_begin
changelog_end
2020-09-29 11:01:01 +00:00
Moritz Kiefer
00b80b8ea3
Separate off-ledger ond on-ledger speedy (#7501)
* Separate off-ledger ond on-ledger speedy

changelog_begin
changelog_end

* Add OnLedgerBuiltin abstract class

changelog_begin
changelog_end

* fix typo

changelog_begin
changelog_end

* Fix borked rebase

changelog_begin
changelog_end

* Remove unscoped withOnLedger

changelog_begin
changelog_end
2020-09-29 10:05:45 +00:00
Bernhard Elsner
c6965433f4
Some minor improvements to the DAML Intro docs (#7505)
* Some minor improvements to the DAML Intro docs

CHANGELOG_BEGIN
CHANGELOG_END

* Incorporate feedback
2020-09-29 08:45:17 +00:00
Bernhard Elsner
3ef1b21747
Add queryFilter to the export list (#7503)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-29 08:15:45 +00:00