Previously, it was filtered out by accident since damlc considered it
to be an old-style typeclass. This PR fixes this by adding a dummy
field.
This is primarily useful in DAML REPL since all DARs there are
importad as data-dependencies atm. It’s not actually all that useful
across SDK versions since you end up with multiple daml-script
libraries but at least within an SDK you can use it and don’t have to
think about whether your project is a dependency or data-dependency.
changelog_begin
changelog_end
Before, we could in-place update the value of a var gauge. Now, we can not only set such a value but in-place update it atomically.
CHANGELOG_BEGIN
CHANGELOG_END
Currently, when Dependabot makes a PR, not only do we need to manually
trigger CI through `/azp run`, we also need to either change the commit
or add a new one to pass the changelog check. This addresses that second
part by making a exception for PRs signed by dependabot.
This is also a bit of an excuse to play with git signatures and gpg.
CHANGELOG_BEGIN
CHANGELOG_END
* Open sourcing gatling statistics reporter
Running gatling scenarios with `RunLikeGatling` from libs-scala/gatling-utils
* cleaning up
* Replace "\n" with System.lineSeparator
so the formatting test cases pass on windows
* Testing DurationStatistics Monoid laws
* Renaming RunLikeGatling -> CustomRunner
The version in nixpkgs is v2.12.10, which means that the Scala REPL we
used was not the same version as we use in our code.
CHANGELOG_BEGIN
CHANGELOG_END
CHANGELOG_BEGIN
Upgrade Jackson to 2.11.2 to address security vulnerabilities
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* Add queryContractKey to DAML Script
This matches the behavior and the implementation of
`queryContractId`. We only return contracts for stakeholders and we
return an `Optional` so you can handle lookup failures. On the JSON
API and in DAML Studio this is fairly efficient, over the gRPC API it
degrades to a linear search.
changelog_begin
- [DAML Script] Add `queryContractKey` to the DAML Script API.
changelog_end
* Update daml-script/runner/src/main/scala/com/digitalasset/daml/lf/engine/script/LedgerInteraction.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
It looks like #6761 broke our Terraform setup by upgrading the nixpkgs
snapshot. That this has not been caught earlier is, I suppose, a
testament to how stable our infrastructure has become nowadays.
This is the same issue we had with the Google providers in #6402, i.e.
we are trying to pin the provider versions both at the nix level and at
the terraform level, with no way to force them to stay in sync.
I don't have a good proposal for such a way, and it seems rare and
innocuous enough to not warrant the investment to fix this at a more
fundamental level.
CHANGELOG_BEGIN
CHANGELOG_END
* Generate hoogle docs for daml script/triggers
This PR switches over the documentation generation for daml script and
daml triggers to the multi-page format we already use for the standard
library and extends it to also generate hoogle documentation.
All 3 hoogle files are combined in a single hoogle_db.tar.gz archive.
Since the location in the multi-page format is different, I’ve added
redirects.
I verified locally, that I can generate the hoogle database and that
the links point to the right places.
changelog_begin
changelog_end
* Fix baseurl for daml-stdlib
changelog_begin
changelog_end
We want to be able to support more than one package in our [Hoogle]
instance. In order to not have to list each file individually, we assume
the collection of Hoogle text files will be published as a tarball.
Note: we keep trying the existing file for now, because the deployment
of this change needs to be done in separate, asynchronous steps if we
want everything to keep working with no downtime:
1. We deploy the new version of the Hoogle configuration, which supports
both the new and old file structure on the docs website (this PR).
2. After the next stable version (likely 1.6) is published, the docs
site actually changes to the new format.
3. We can then clean-up the Hoogle configuration.
Any other sequence will require turning off Hoogle and coordinating with
the docs update, which seems impractical.
[Hoogle]: https://hoogle.daml.com
CHANGELOG_BEGIN
CHANGELOG_END
* Add warning for variant constructor with unit arg.
changelog_begin
- [DAML Compiler] The compiler will now emit a warning when you have a variant type constructor with a single argument of unit type ``()``. For example, ``data Foo = Bar () | Baz`` will result in a warning on the constructor ``Bar``. This is because the unit type will not be preserved when importing the package via data-dependencies. The correct solution, usually, is to remove the argument from the constructor: ``data Foo = Bar | Baz``. Note that this rule does not apply when the variant type has only one constructor, since no ambiguity arises.
changelog_end
* Rename checks in preprocessor
* Weird lint but ok
We had some issues with shadowing of type variables in our DAML-LF type
checkers because of some bugs in our implementations of substitution. As
a workaround for these issues, we suffixed each type variable with its
GHC unique during conversion to DAML-LF. Unfortunately, this leads to
new problems when using parametrized variant types and record
projections in combination with data-dependencies.
This PR, drops the unique suffix when converting to DAML-LF. This
change is possible since we fixed the bugs in the substitutions a while
ago. Fortunately, this also fixes the aforementioned problem regarding
data-dependencies.
This fixes#7284.
CHANGELOG_BEGIN
CHANGELOG_END
* Disable multi-package lsp-tests on windows.
These are consistently timing out on Windows for unknown reasons.
Disabling until we figure out how to fix the tests. See #4904
changelog_begin
changelog_end
* fix definition
@cocreature is taking care of 1.5.0-snapshot.20200908.5166.0.1623baec (#7348), so they get pushed back to the end of the line.
Please do not merge this before #7348.
CHANGELOG_BEGIN
CHANGELOG_END
Co-authored-by: Azure Pipelines DAML Build <support@digitalasset.com>
NPM doesn’t actually need this (at least it didn’t for me locally and
hopefully CI agrees) to pick up changes and it emits a very
scary-looking warning if you do pass it.
changelog_begin
changelog_end
This is an attempt to address #7034 & #7036. Strictly speaking, this
does not match their acceptance criteria, as this only supports multiple
queries, not mixed templates.
Because the two new functions can cover the exact same use cases (and
more) as the existing `streamQuery` and `streamFetchByKey`, the latter
are deprecated. The deprecation cycle I suggest is to deprecate them
immediately by annotating them as such in the documentation (done on
this PR).
That's it. I do not think we ever need to actually remove them, nor to
make them print annoying warnings or anything. There is nothing wrong
with the functions as they stand, they just don't fit in the API
anymore.
We could, at some point, move them to a separate documentation page, or
to the boottm of the existing one, but I feel even removing them from
the documentation is unnecessary.
CHANGELOG_BEGIN
- [JavaScript Client Libraries] Two new methods have been added to
`daml-ledger`: `streamQueries` and `streamFetchByKeys`. They are
similar to the existing singular versions, except they can take
multiple queries and multiple keys, respectively, and return a union
of what the corresponding individual queries/keys would have. Because
these new functions can do everything the existing ones can, we are
deprecating the latter, though there is no plan to remove them.
Upgrade path is straightforward:
```
streamQuery(t); => streamQueries(t, []);
streamQuery(t, undefined); => streamQueries(t, []);
streamQuery(t, q); => streamQueries(t, [q]);
streamFetchByKey(t, k); => streamFetchByKey(t, [k]);
```
There is one caveat, though: `streamFetchByKeys` is a little bit less
lenient in the format in which it expects the key. If your existing
code was conforming to the generated TypeScript code we provide,
everything should keep working, but if you were using plain JS or
bypassing the TS type system, it is possible that you used to
construct keys that will no longer be accepted. The new function
requires all keys to be given in the _output_ format of the JSON API,
which is a little bit more strict than the general JSON <-> LF
conversion rules.
CHANGELOG_END
* LF: shortcup failure in SValue ordering.
Before this PR comparison of lists, maps, ans structural record had a
always linear complexity.
CHANGELOG_BEGIN
CHANGELOG_END
This reverts changed made in #3416, where the standard scala was
replace by ad-hoc Speedy equality for SValue. As Speedy equality
become more permisive (e.g. it does not check for type constructor of
records, variants, and enumrations or constructor of variants or
enumerations) this is safer to use standard scala eqality for case
class.
CHANGELOG_BEGIN
CHANGELOG_END
When an error happend during decoding of JSON API answers due to missing
templates, the error was just displayed as an empty object '{}'.
CHANGELOG_BEGIN
CHANGELOG_END
* ledger-api-test-tool: Wait for futures when constructing LedgerSession.
* ledger-api-test-tool: Wait for futures on `new ParticipantSession`.
* ledger-api-test-tool: If we create two sessions, close one immediately.
* ledger-api-test-tool: Only create sessions once.
CHANGELOG_BEGIN
- [Ledger API Test Tool] Fix a race condition in which multiple
connections were created to a single participant, and only one was
shut down properly. This error was likely benign but may cause
spurious errors to show up when the test tool finishes and shuts down.
CHANGELOG_END
* ledger-api-test-tool: Let ParticipantSessionManager manage connections.
* ledger-api-test-tool: Shrink the configuration surface area.
* ledger-api-test-tool: Use `Future.traverse` to simplify LedgerSession.
* ledger-api-test-tool: Fix the ParticipantSessionManager logger.
* ledger-api-test-tool: Address issues flagged by @stefanobaghino-da.
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* ledger-api-test-tool: Make `SessionParts` a real class.
Co-authored-by: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>