Commit Graph

5280 Commits

Author SHA1 Message Date
Moritz Kiefer
d87d658245
Document standalone JAR for the JSON API (#7494)
fixes #7453

changelog_begin
changelog_end
2020-09-25 17:52:36 +02:00
Martin Huschenbett
afdfec53dd
Deprecate specifying the template in daml new positional (#7490)
We deprecate specifying the template when calling `daml new` via a
positional argument, as in
```sh
daml new foo skeleton
```
The new syntax is
```sh
daml new foo --template skeleton
```
Whenever the former version is used, we now print a not that it is
deprecated and that the latter version is the recommended way.

CHANGELOG_BEGIN
[DAML Assistant]
- Deprecate specifying the template for `daml new` via a positional
  argument.
CHANGELOG_END
2020-09-25 12:39:49 +00:00
Richard Kapolnai
6afa51bb47
Fix typos in doc (#7488)
* fix typo
CHANGELOG_BEGIN
CHANGELOG_END

* Missing closing quote in docs
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-25 13:23:33 +02:00
Samir Talwar
3f96b9b9db
sandbox + kvutils: Add the "read" component back to the health checks. [KVL-475] [KVL-483] (#7486)
* participant-integration-api: Inject health checks into the API server.

CHANGELOG_BEGIN
- [Integration Kit] The ``StandaloneApiServer`` now takes a
  ``healthChecks`` parameter, which should identify the health checks to
  be exposed over the gRPC Health Checking Protocol. This will
  typically look something like::

    healthChecks = new HealthChecks("read" -> readService, "write" -> writeService)

  Integrators may also wish to expose the health of more components.
  All components wishing to report their health must implement the
  ``ReportsHealth`` trait.
 CHANGELOG_END

* sandbox + kvutils: Add the "read" component back to the health checks.
2020-09-25 11:06:46 +00:00
Andreas Herrmann
b1872c10f7
Fix the rules_pkg GitHub release URL (#7487)
Fixes
```
WARNING: Download from https://github.com/bazelbuild/rules_pkg/releases/download/0.2.6/rules_pkg-0.2.6.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 404 Not Found
```

The 0.2.6 release tag is abandoned and has no artifact:
https://github.com/bazelbuild/rules_pkg/releases/0.2.6
We are instructed to use 0.2.6-1 instead:
https://github.com/bazelbuild/rules_pkg/releases/0.2.6-1

changelog_begin
changelog_end

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-09-25 10:35:34 +00:00
Andreas Herrmann
171ba85813
Missing closing quote in docs (#7484)
CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-09-25 09:11:09 +00:00
Sofus Mortensen
14f0a4d58e
Tuple tests - was: Added Functor instance for (,,) for completeness with fst3, curry3, etc (#7442)
* Added Functor instance for (,,) for completeness with fst3, curry3, etc

* added missing unit tests for DA.Tuple

* Reverted Functor instance on (,,)

* fix lint expectation line numbers

* Fix line numbers

changelog_begin
changelog_end

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2020-09-25 10:52:04 +02:00
Stephen Compall
354e354df5
adjust quickstart-java release smoketest instructions for prior changes (#7481)
- Followup to #7338, adjusting release test instructions for changes to the Java
  quickstart, mismatches found testing #7462.  Compare to
  docs/source/app-dev/bindings-java/quickstart/template-root/daml/Main.daml for line #
  references.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-25 08:46:35 +02:00
Richard Kapolnai
afa29516b6
Remove an unclear bit from JSON API documentation: no metaprogramming (#7480)
changelog_begin
changelog_end
2020-09-25 08:45:44 +02:00
azure-pipelines[bot]
b538c1fb59
update compat versions for 1.6.0-snapshot.20200922.5258.0.cd4a06db (#7473)
* update compat versions for 1.6.0-snapshot.20200922.5258.0.cd4a06db

CHANGELOG_BEGIN
CHANGELOG_END

* Bump to new snapshot

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-24 21:11:25 +02:00
azure-pipelines[bot]
c164efc25e
rotate release duty after 1.6.0-snapshot.20200922.5258.0.cd4a06db (#7463)
@S11001001 is taking care of 1.6.0-snapshot.20200922.5258.0.cd4a06db (#7462), so they get pushed back to the end of the line.

Please do not merge this before #7462.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-24 14:46:23 +00:00
Bernhard Elsner
331ee44978
Documentation of our support and compatibility framework (#7458)
* Documentation of our support and compatibility framework

CHANGELOG_BEGIN
CHANGELOG_END

* Update docs/source/daml-integration-kit/index.rst

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

* Update docs/source/support/component-statuses.rst

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

* Address feedback

* Update docs/source/support/compatibility.rst

Co-authored-by: Gerolf Seitz <gerolf.seitz@daml.com>

* Add Deprecations and address feedback

* Fix short title underline

* Apply suggestions from code review

Co-authored-by: Gerolf Seitz <gerolf.seitz@daml.com>

* Improve sentence on Integration Kit

* Imprive SemVer TLDR

* Uncapitalize release candidate

* Fix release timeline image

* Make the DAML Language Server CLI a Labs feature

Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Gerolf Seitz <gerolf.seitz@daml.com>
2020-09-24 14:40:57 +00:00
Andreas Herrmann
86bdf7b6ec
stack_snapshot_json on Windows (#7468)
* stack_snapshot_json on Windows

CHANGELOG_BEGIN
CHANGELOG_END

* document ad-hoc machines

Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
2020-09-24 12:03:15 +00:00
Moritz Kiefer
e53bcd90c0
Clarify some documentation around DAML triggers (#7477)
This fixes #7471 and fixes #7469.

Thanks to @lucb-da for pointing this out!

changelog_begin
changelog_end
2020-09-24 14:00:47 +02:00
nickchapman-da
eca7c78540
Tests for interleaved execution and authorization (#7476)
* Add new tests to demonstrate that authorizing checking is interleaved with execution. This work is a follow up to PR #7400, and relates to issue #132

changelog_begin
changelog_end

* naming and other small review comments
2020-09-24 11:38:56 +00:00
Martin Huschenbett
cfa05fa893
Deprecate daml damlc package (#7466)
This command will be deprecated as part of the 1.6 release.
`daml build` should be used instead to build DARs.

CHANGELOG_BEGIN
[damlc]
- Deprecate `daml damlc package` command.
CHANGELOG_END
2020-09-24 10:26:34 +00:00
Samir Talwar
40b893e9bb
ledger-api-test-tool: Retry the participant connection for a minute. (#7475)
This means we can stop writing loops to wait for the ledger to come up
wherever this is used.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-24 08:29:29 +00:00
Sofia Faro
20732edc32
Fix GSG environment variable setup instructions. (#7465)
* Fixes #7451 by telling users to use `$HOME/.daml/bin` instead of `~/.daml/bin` when setting up the PATH variable.

In addition, this PR streamlines the instructions a bit by not telling users to restart their computers (they only need to restart the terminal) and by verifying the variables only after setting them both up, so they only need to restart the terminal once (without jumping around the instructions).

changelog_begin
changelog_end

* reinstate some restarts

* Emphasize that it is the Terminal app from macOS
2020-09-23 15:49:31 +00:00
Sofia Faro
fbb29de4b2
Force newtype constructor names to match type name. (#7467)
* Force newtype ctor name to match type name.

This PR fixes the record constructor check to include newtypes, which are represented as records in DAML-LF. The non-inclusion of all newtypes was an oversight. In addition, we add a regression test.

changelog_begin

- [DAML Compiler] bugfix: Newtype constructors must have the same
  name as the newtype itself, since newtypes are record types.

changelog_end

* Change error message on newtypes

* update a test
2020-09-23 15:36:18 +00:00
Marton Nagy
071f604d6d
Enables fetching scala library sources (#7464)
* Enables fetching scala library sources

Enables fetch_sources flag for fetching scala sources.
These sources can be used for manual linking scala library if sources are not resolved otherwise

CHANGELOG_BEGIN
CHANGELOG_END

* Apply suggestions from code review

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-09-23 15:13:06 +00:00
azure-pipelines[bot]
3e09e9b4d9
release 1.6.0-snapshot.20200922.5258.0.cd4a06db (#7462)
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.

@S11001001 is in charge of this release.

CHANGELOG_BEGIN
CHANGELOG_END

Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
2020-09-23 09:28:41 -04:00
Remy
ad587e2dfb
LF: implement hashing for GenMap (#7461)
This is used (in particular) for contract keys containning GenMaps.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-23 14:14:19 +02:00
Moritz Kiefer
cd4a06db95
Move script tests to scalatest (#7445)
There isn’t really any good reason to insist on client_server_test
here so this PR replaces all of that by scalatest and a few test
fixtures which gives us better assertion failures, allows us to run
individual tests, ….

fixes #7356

changelog_begin
changelog_end
2020-09-22 16:59:12 +02:00
Remy
c00b149ed8
LF Repl: cosmetic Cleanup (#7459)
+ Use directly compiler config instead of `devMode` and `profiling` flags
+ rename `fMap` into `chain`
+ minor changes

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-22 16:42:20 +02:00
Remy
f5694ee2ea
LF: Kill ValueStruct (#7457)
Struct is not serializable and therefore should not appear as Value.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-22 13:37:59 +02:00
Remy
a899e5e4e6
Speedy: Check language version as part of Speedy compilation. (#7440)
Additionnally
+ move allowedLanguageVersion inside compiler config
+ add missing catch error insde
  ConcurrentCompiledPackages#addPackageInternal
+ implement EngineConfig method to easily produce a Compiler.Config

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-22 12:43:48 +02:00
Remy
63be90c0fd
Engine: documents for Engine configuration (#7420)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-22 09:08:02 +02:00
Moritz Kiefer
566d3a21d1
Remove version header from vscode snippet (#7452)
changelog_begin
changelog_end
2020-09-21 16:59:47 +02:00
Remy
7df0feeb58
Speedy: remove wrong comments introduced as part of #7438. (#7450)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-21 16:09:43 +02:00
Remy
42dcac38f0
[LF] Drop some tests for deprecated LF versions (#7449)
Since #5321, LF versions < 1.6 are deprecated. 
This PR drops some tests for those deprecated versions.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-21 15:36:47 +02:00
Moritz Kiefer
ce3d5b0b44
Extend DAML Script migration guide (#7448)
* Extend DAML Script migration guide

This PR extends the DAML Script migration guide with a few things that
have been added recently or popped up during the migration of various
refapps.

fixes #7403

changelog_begin
changelog_end

* Apply suggestions from code review

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>

* Rename daml on sql to daml for postgresql

changelog_begin
changelog_end

* Update docs/source/daml-script/index.rst

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>

Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
2020-09-21 15:23:56 +02:00
Moritz Kiefer
7b6663b3c4
Address security vulnerability in navigator deps (#7446)
node-forge 0.9 has an issue so this PR bumps selfsigned which in turn
bumps the bound on node-forge and allows us to upgrade to 0.10

changelog_begin
changelog_end
2020-09-21 11:34:59 +00:00
Moritz Kiefer
720d2e1b61
Upgrade stack (#7444)
changelog_begin
changelog_end
2020-09-21 09:29:05 +00:00
Remy
e1f8d9c781
DAML-LF: utility to compute duplicated keys in a transaction. (#7409)
The Engine does not verify key duplication when construction a
transaction, this task is currently let to the ledger implementation.
This PR provides an utility function to compute the duplicated keys
in a transaction.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-21 09:18:47 +02:00
Remy
65f1a247d0
Bump test_sha in perf tests (#7441)
CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 18:30:39 +00:00
nickchapman-da
4e32fde001
Cleanup following interleave execution and authorization (#7437)
* remove failedTransactions field from ScenarioLedger.RichTransaction

changelog_begin
changelog_end

* remove Blinding.checkAuthorizationAndBlind; fixup callers to use Blinding.blind when blindningInfo is required

* rename/relocate: ScenarioLedger.CommitError.FailedAuthorizations --> SError.DamlEFailedAuthorization

* fix types to demonstate that at most one FailedAuthorization is detected/reported

* address small review comments
2020-09-18 19:05:19 +01:00
Remy
76ef4c861a
Speedy: group compiler parameters into a Config case class. (#7438)
* Speedy: group compiler parameters into a Config case class.

Speedy compiler is parametrized by several option flags.  Those flags
are passed through different calls (in particular in the instance of
`CompiledPackages`.

This PR group all this configuration parameters into a case class to
pass the option in a cleaner way.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 19:32:26 +02:00
Remy
71c19901fd
Ledger-API: Validate Dar before sending it to the ledger. (#7430)
This PR implements a part of the proposal from #7093.

Here packages are validated in the participant node before to be sent to the ledger.

CHANGELOG_BEGIN

- [Ledger-API] participant node validate Dar before uploading to the ledger.
   This may increase upload time significantly.

CHANGELOG_END
2020-09-18 17:26:22 +02:00
Gary Verhaegen
2a38d03250
protect GCS bucket items (#7439)
Yesterday, a certificate expiration triggered the `patch_bazel_windows`
job to run when it shouldn't, and it overrode an artifact we depend on.
This was build from the same sources, but the build is not reproducible
so we ended up with a hash mismatch.

As far as I know, there is no good reason for CI to ever delete or
overwrite anything from our GCS buckets, so I'm removing its rights to
do so.

As an added safety measure, this PR also enables versioning on all
non-cache buckets (GCS does not support versioning on buckets with an
expiration policy).

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 15:59:23 +02:00
Gary Verhaegen
29b876920e
ci/patch_bazel_windows: fail on curl failure (#7431)
At the moment, with the `curl` call comfortably nested inside an `if`
statement, `curl` failures are interpreted as simply going down the
`else` branch of the conditional. Hoisting it up to a separate variable
declaration makes the script fail on the curl call itself.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 15:57:21 +02:00
curiousleo-da
02124c40ed
rs-grpc-bridge-test-lib: remove unneeded deps (#7435)
changelog_begin
changelog_end
2020-09-18 13:25:05 +02:00
Remy
6aa6f9245b
Engine: make package validation option. (#7436)
This is part of #7399.

This enable skipping packages validation in the engine when they are
comming from a trusted source.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-18 12:58:59 +02:00
Leonid Shlyapnikov
0730102b99
JSON API Perf Test Runner Query Store Index Support (#7434)
* Postgresql setup for Gatling perf test

* Add JSON API `query-store-index` support

changelog_begin
changelog_end
2020-09-17 16:39:00 -04:00
Stephen Compall
1e28eb5bea
reorder some of the libs-scala artifacts (#7433)
- suggested by @SamirTalwar-DA in #7347; thanks

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-17 17:12:40 +00:00
nickchapman-da
96d704b25b
Perform authorization checks during execution and not as a separate post-execution phase. (#7400)
changelog_begin
changelog_end

Adapt test for small error message change. An improvement! Previously an internal message was shown. Make test flexible enough to pass for old & new message.

Adapt expected output file. Only change is the contract-ids for active-contracts when the test ends.

fix small test bugs in testcase where authorization is wrong

temp disabled 3 tests; needs investigation; see TODO markers

temp adapt 1 test for change in error message

temp disable 1 test. needs invesigation

undo accidentally commited change to .bazelrc

add copyright header to new file

remove testcase (badActorCheck2) which is no longer expected behaviour, when authorization occurs during execution

address comments: be mre private & other tiny changes

appease scala formatter

improve expected error message in KeyNotVisibleStakeholders testcase

fix authorization issues and re-enable the 3 failing tests in EngineTest which now pass

fix auth issue and re-enable ledger-test-tool test: WronglyTypedContractIdIT

fix compatibility

re-enable test in KVUtilsTransactionSpec.scala
2020-09-17 17:50:04 +01:00
Stephen Compall
a670e68c72
add 'alter' function to DA.Map (#7427)
* add 'alter' function to DA.Map

CHANGELOG_BEGIN
CHANGELOG_END

* swap arguments for alter

- suggested by @cocreature; thanks

* alter moved to stdlib, remove from trigger lib

* use markdown formatting for alter doc

- suggested by @sofiafaro-da; thanks

* fix code block formatting

- suggested by @sofiafaro-da; thanks
2020-09-17 16:46:37 +00:00
Moritz Kiefer
86f89d5026
Split ledger-on-memory Main into multiple files (#7428)
I’d like to use this in a test fixture so this PR splits up the main
and exposes an API that gives you back the resource without having to
import Main.

changelog_begin
changelog_end
2020-09-17 17:42:27 +02:00
Gary Verhaegen
8ea85d1393
update certificates (#7432)
Our old wildcard certificate has expired. @nycnewman has already updated
our configuration to use new ones; this is just updating the tf files to
match.

CHANGELOG_BEGIN
CHANGELOG_END
2020-09-17 17:36:35 +02:00
Stephen Compall
1926ddbe9d
avoid ACS linear contract ID lookups in Trigger library (#7425)
* add Ord (ContractId a) instance

* change inner list in activeContracts to map

* adapt Internal module to new map

* support rest of Trigger daml lib

* rename adjust to alter, its Data.Map name

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* distribute type arguments for ACS activeContracts

- suggested by @cocreature; thanks

* swap arguments for alter

- suggested by @cocreature; thanks

* reformat groupActiveContracts signature

- suggested by @cocreature; thanks
2020-09-17 15:31:03 +00:00
Stephen Compall
d48e9d251d
ExecutionContext[EC] phantom for control, Future[EC, A] (#7347)
* add phantom-tagged ExecutionContext and Future to scala-utils concurrent package

* many new operations for Futures

* Future, ExecutionContext combinators from porting ledger-on-sql

- picked from 546b84ab9cdf4de2d93ec5682bdee6cfd6b385f8

* move Future, ExecutionContext companions into normal package

* lots of new docs

* many new Future utilities

* working zipWith

* tests for ExecutionContext resolution, showing what will be picked under different scenarios

* even more tests for ExecutionContext resolution

* tests showing some well-typed and ill-typed Future combinator usage

* no changelog

CHANGELOG_BEGIN
CHANGELOG_END

* missed scalafmt

* one more doc note

* split concurrent package to concurrent library

Co-authored-by: Samir Talwar <samir.talwar@digitalasset.com>
2020-09-17 07:36:50 +00:00