Currently we catch the exception and then print out "DAR upload
succeeded.". That’s clearly not what is intended here.
changelog_begin
- [DAML Assistant] `daml ledger upload-dar` now exits with a non-zero
exit code on failures and no longer prints "DAR upload succeeded"
in error cases.
changelog_end
Before this change, the performance envelope tests used a hard-coded
number of pings and warmup pings for the tests, in particular for the
throughput test. As a result, a performance test with 100tps was only
running 2 seconds. Now, the number is derived from the target throughput
numbers.
CHANGELOG_BEGIN
CHANGELOG_END
The trigger runner (delibaretely) only cares about the high-level
API. This means that we can change the high-level API without breaking
backwards compatibility in the runner. However, we do of course have
to change the trigger code written in the high-level API.
This PR addresses this by making the code depend on the
version. Unfortunately we cannot use CPP here (something I don’t say
very often) so this is done in a Bazel function.
The last low-level breaking change was the change to `CommandId`
generation so we go back to that.
changelog_begin
changelog_end
* damlc: Use fresh names when compiling builtins
Currently, we're always using the variables names `v1`, `v2`, ... for
the lambdas we introduce during the conversion of partially applied
builtins to DAML-LF. This can lead to problems when the variable name
is already in use. The test cases used to fail because of the usage of
`v2`.
This PR fixes the issue by properly generating fresh names. There's no
test case for type variables since I don't know how to trigger an
issue. Fixing it seems a good idea nevertheless.
CHANGELOG_BEGIN
CHANGELOG_END
* Add Sofia's suggestions
CHANGELOG_BEGIN
CHANGELOG_END
* Fix a nasty typo
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Fix more issues pointed out by Sofia
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Include proto files in ScalaPB source jar
* Include proto files in ScalaPB jar
* remove empty line
* use ledger_api_proto_source_root variable
* Fix formatting
CHANGELOG_BEGIN
- Added protobuf source files to ledger-api-scalapb artifact
CHANGELOG_END
HTTP 1.1 exists since 1999 so there isn’t really a good reason not do
use this. In fact, the docs recommend to use Chunked in favor of
CloseDelimited.
changelog_begin
changelog_end
@aherrmann-da is taking care of 1.7.0-snapshot.20201027.5530.0.bdbf8977 (#7822), so they get pushed back to the end of the line.
Please do not merge this before #7822.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Cache computation of top-level values at definition level
Earlier the computation of a top-level value was only cached at the
use-site in SEVal. This introduces SDefinition which contains the same
mechanism as SEVal to cache the computation.
As expected this does not impact performance much:
before: CollectAuthority.bench //daml-lf/scenario-interpreter/CollectAuthority.dar CollectAuthority:test avgt 40 44.267 ± 0.728 ms/op
after: CollectAuthority.bench //daml-lf/scenario-interpreter/CollectAuthority.dar CollectAuthority:test avgt 40 43.693 ± 0.702 ms/op
What this does have a significant impact is on reducing the number of distinct
SValues for things like type class dictionaries etc, so that now we have one
SValue per dictionary rather than one per SEVal.
CHANGELOG_BEGIN
CHANGELOG_END
* Address code review
* Fix speedy tests
* Add MINIMAL pragma support in data-deps.
CHANGELOG_BEGIN
- [DAML Compiler] MINIMAL pragmas are now imported correctly
in data-dependencies.
CHANGELOG_END
* fix test
* Review comments
* Update compiler/damlc/daml-lf-conversion/src/DA/Daml/LFConversion.hs
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
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.
@aherrmann-da is in charge of this release.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* graph component for running UnfoldStates
* proper doc for flatMapConcatNode
* nicer internal signatures
* refactor TriggerMsg encoder
* restate trigger sink in the graph DSL
* UnfoldState functions that might be useful
* express trigger sink with graphed initial state
* fix doc comment
* add SourceShape2, a SourceShape with two outlets
* add toSource for UnfoldState
* test for iterator
* do not submit for initialState out-of-band; feed into the graph instead
* factor the forAll Future pattern for testing
* test flatMapConcatNode directly
* add changelog
CHANGELOG_BEGIN
- [Triggers] Each trigger will submit up to 8 commands at a time, rather than
submitting as fast as possible. This applies to submissions in progress,
rather than completed but pending submissions; the latter's limit is still
subject to the ledger's own limits.
See `issue #7812 <https://github.com/digital-asset/daml/pull/7812>`__.
CHANGELOG_END
* remove uncons and append, which were not needed
* log initial evaluated state again
* shape port aliases
- suggested by @cocreature; thanks
This change exposes a new endpoint with information about the ledger API version.
The current approach is to read contents of ledger-api/VERSION and provide it as it is to the user.
CHANGELOG_BEGIN
- ledger API version endpoint
CHANGELOG_END
* Amend docs to introduce the concept of DAML Connect
CHANGELOG_BEGIN
CHANGELOG_END
* Slightly change how Sandbox is positioned in the app-arch
* Mention integrated drivers in app arch docs
* Lowercase DAML network
* Improve support statement in docs
CHANGELOG_BEGIN
CHANGELOG_END
* Incorporate feedback
* Rename the last minor version "terminal"
* Lowercase drivers
* Incorporate Derek's Feedback
@nickchapman-da is taking care of 1.7.0-snapshot.20201020.5481.0.03a03957 (#7754), so they get pushed back to the end of the line.
Please do not merge this before #7754.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
* Refactor fun dep and overlap mode implementations.
This PR moves the functional dependency and overlap
mode encoding/decoding functions to a single module,
separate from the rest of LF conversion or
data-dependencies, in preparation of adding more
annotations of this sort (e.g. MINIMAL).
This involves a small amount of refactoring to get
the types to line up... It should be a little easer
to write some roundtrip tests for these now.
I'm not super satisfied with how much fun dep / overlap
mode logic is still left in LFConversion.hs and
DataDependencies.hs, but this is a step in the right
direction at least.
changelog_begin
changelog_end
* Rename Encoding to MetadatEncoding
* Factor JWT verifier CLI flags
changelog_begin
changelog_end
* Use cli-opts in auth middleware
* Use cli-opts in sandbox cli
* Mark trigger service test as long
These have become prone to timeout on CI.
Increasing the size (timeout) is a temporary fix. A proper
solution is to a) not start a fresh sandbox per test-case and b)
separate the in-mem/db and no-auth/auth configrations into
separate Bazel test targets.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
That `setFieldPrim` is so far away from `getFieldPrim` has bugged me
for a while now. I _strongly_ feel that they should be next to each
other.
There are also a few outdated comments that are brought up to date.
CHANGELOG_BEGIN
CHANGELOG_END
* make ActionTriggerAny no longer have orphan instances
* add commands-in-flight reader to TriggerUpdateA
* make getCommandsInFlight a method shared by update and rule
* add changelog
CHANGELOG_BEGIN
- [Triggers] ``getCommandsInFlight`` may be used in a high-level trigger's
``updateState``, as well as its ``rule``.
See `issue #7787 <https://github.com/digital-asset/daml/pull/7787>`__.
CHANGELOG_END
* test use of getCommandsInFlight in an updateState
* inexplicable parse error
* Internal no longer exports queryContractId
* let free interpreter suspend on a SubmitRequest
* move UnfoldState to separate file, start a custom flow for flatmapping to it
* proper handlers, getting tangled in the mutable state of it all
* tests and conversion utilities for UnfoldState
* working UnfoldState flow with far fewer tricky details, passes test
* note on laziness
* missed t update
* test empty lists better
* add bifunctor for UnfoldState
* refactor message filtering
* split message parsing from the fold
* add copyright headers to new files
* let the flow from an UnfoldState emit the states
* test flatMapConcatStates's special output semantics
* pass submit's Future back to the holder of the SubmitRequest
* parallel submission stage, here with limit 8
* feed a stream of SubmitRequests to the command submission stage
* don't fail request submit stream stage on submit failure
- There was no way before for submission errors to report themselves to the free
interpreter, which just saw Unit; now we don't drop the Future on the floor,
so we properly turn "normal" submission errors into success, and actually
propagate any "real" errors to the stream instead of logging.
* note that initialState command submissions are not throttled or backpressured
* add the parallel submission size to the failure queue size
- defense against deadlock should we later change to propagate enqueuing
failures to the stream
* no changelog
CHANGELOG_BEGIN
CHANGELOG_END
* clean up the initial namespace of getTriggerSink
The `downloadAllReachablePackages` function, which is part of the
implementation of `featch-dar`, uses an associative list when a `Map`
seems more appropriate. More appropriate in both runtime complexity as
well as code complexity. This has caught my eye while reviewing some
code nearby and I thought I have a minute to spare to improve it.
This PR replaces the associative list with a `Map`.
CHANGELOG_BEGIN
CHANGELOG_END
This follows up on #7066 and exposes the new underlying multi-key and
multi-query stream functions through the React bindings. Following the
same reasoning as in #7066, we therefore deprecate the existing
functions (with no intention of removing them) as they become redundant.
CHANGELOG_BEGIN
* JavaScript Client Libraries: Updated React bindings to expose the
recent addition of multi-key and multi-query streams in @daml/ledger.
The singular versions are marked as deprecated as they have become
redundant.
The upgrade path for `useStreamQuery` is very straightforward: the
query factory remains optional, but if specified it should return an
array of queries instead of a single query. The array may be empty,
which will return all contracts for that template (similar as not
passing in a query factory). The return values of `useStreamQuery` and
`useStreamQueries` are the same type.
```
useStreamQuery(T) --> useStreamQueries(T)
useStreamQuery(T, () => query, ...) --> useStreamQueries(T, () => [query], ...)
```
The upgrade path for `useStreamFetchByKey` is only slightly more
involved as the return type of `useStreamFetchByKeys` is a new type
called `FetchByKeysResult` instead of the existing `FetchResult`.
`FetchByKeysResult` differs from `FetchResult` in that it contains a
`contracts` field with an array of contracts instead of a singular
`contract` field. (It differs from `QueryResult` in that each element of
the returned array can also be `null`, if there is no corresponding
active contract.) Call sites can be updated as follows:
```
const {loading, contract} = useStreamFetchByKey(T, () => k, ...);
-->
const {loading, contracts} = useStreamFetchByKeys(T, () => [k], ...));
const contract = contracts[0];
```
CHANGELOG_END
This PR adds a couple of tests that ensure that various syntactic
variants of record projection all get translated into the according
DAML-LF primitive as soon as we know the record type and field name.
This PR also fixes some inconsistencies in the translations of
`getField` and `getFieldPrim`. The change for `getField` does not have
any impact if the simplifier is run since the simplifier would perform
the inlining for a partially applied `getField` we perform here.
Nevertheless, performing this inlining in the conversion to DAML-LF has
some advantages. First of all, we also run it in cases where the
simplifier is turned off, like incremental computation. Second, this is
such a crucial optimization that I want to be as sure as possible that
it is run. Third, doing the inlining in the conversion is cheap and
removes a bit of load from the simplifier. Fourth, the consistency with
the other record primitives is quite nice too.
CHANGELOG_BEGIN
CHANGELOG_END
* Fix scenario service vs struct projections bug
In a recent change, we have sped up the projection from structural
records by means of an inference in the DAML-LF type checker. This
change was made under the assumption that users of the DAML interpreter
run through package validation before compiling to the internal Speedy
AST. Unfortunately, that assumption was wrong and not covered by our
existing tests. Manually testing of a new release candidate reminded us
of the fact that the scenario service skips package validation for the
sake of faster response times in the IDE.
This PR drops the assumption that package validation is always run.
Instead, we add the old implementation of struct projection, which works
without DAML-LF type checking, back and use it whenever the AST has not
been annotated with the information inferred by the type checker. We do
the same for struct updates.
We improve test coverage by _additionally_ running the `damlc`
integration tests without package validation for the latest stable
version of DAML-LF and DAML-LF 1.dev. These tests would have caught the
issue we only discovered during manual testing.
CHANGELOG_BEGIN
CHANGELOG_END
* Add some explanations
CHANGELOG_BEGIN
CHANGELOG_END
Azure used to report the status of the entire build to GitHub, which we
use as the "required check" for PRs to be merged. Ir doesn't do that
anymore which means we can't merge anything. It's unclear whether or not
that is a deliberate change.
This attempts to work around that by creating an extra job that depends
on all the other, which GitHub could depend on.
CHANGELOG_BEGIN
CHANGELOG_END
This PR extends the failure tests with one that establishes a
websocket connection, kills the connection and reenables it at the
last offset.
changelog_begin
changelog_end
* daml assistant: cleanup of daml ledger commands
This is a cleanup of the Helper/Ledger.hs module in preparation for
further implementations of `daml ledger` commands against the JSON API.
In particular the module Compiler/Fetch.hs is removed from daml-compiler
and its contents moved over the Helper/Ledger.hs. Some renaming and
reorganization is done for clarity.
CHANGELOG_BEGIN
CHANGELOG_END
`Symbol` is the kind of type-level strings. We use type-level strings
as part of our record system. That's why we need the `Symbol` in the
first place. However, one can abstract over record fields using the
`HasField` typeclass without directly using the `Symbol` kind. Thus,
there's is no need for our users to ever use it. In fact, they
most likely don't want to use it since it does work work with
data-dependencies and we have no plans to support it in that way.
Given that `Symbol` is not necessary and doesn't work in all cases,
let's hide it from the docs so that nobody gets the idea to use it.
CHANGELOG_BEGIN
CHANGELOG_END
* Add Enum and Bounded instances to DA.Date
CHANGELOG_BEGIN
[DAML StdLib] Add Enum and Bounded instances to DA.Date
CHANGELOG_END
* Hide internal date functions in docs
* Fix line numbers
* Export Date<>Int conversion functions rather than hiding
* Update compiler/damlc/daml-stdlib-src/DA/Date.daml
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Offset the Date enum to make it zero-based
* Apply suggestions from code review
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* Improve tests
* Incorporate Martin's feedback
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
The message is built from the current commit message. Since this checks
out master, the Slack message ends up being a bit confusing.
CHANGELOG_BEGIN
CHANGELOG_END
I screwed up in #7771: `google_project_iam_binding` is defined as _the_
authoritative list of accounts for that role, not just a list of
accounts to add the role to. So in applying that rule yesterday, I
inadvertently stripped the periodic-killer machine of its role, and
therefore nothing got reset last night. The Terraform plan did not
mention this, unfortunately (though, arguably, consistently with the
semantics of the Terraform rules).
This is the same intent as #7771, but this one actually works. (Or at
least does not fail in the same way.)
CHANGELOG_BEGIN
CHANGELOG_END