Nobody reported any issues and we’re not planning breaking changes so
ship it!
changelog_begin
- [Daml Profiler] The Daml profiler is now a stable feature.
changelog_end
* Improvements to the documentation with regards to offsets
changelog_begin
[Docs] Improvements to the documentation with regards to offsets
changelog_end
- Simplify wording to explain the usage of `blockingForEach` in the Java
bindings quickstart page
- Describe offsets in prose in the page about the Ledger API services
- Suggest how to perform crash recovery with offsets on the application
architecture page
- Link to the relevant Protobuf reference docs where approriate
* Apply suggestions from code review
Thanks @cocreature
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Addresses https://github.com/digital-asset/daml/pull/10180#discussion_r664001785
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Downloading and running the JAR manually is so 2019.
changelog_begin
[Docs] Document how to use the Java codegen using the Daml assistant
changelog_end
Fixes#8817
* Ledger API: bump version for LF 1.14
CHANGELOG_BEGIN
* Ledger API: bump version for LF1.14
CHANGELOG_END
* Update docs/source/support/compatibility.rst
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Update docs/source/support/compatibility.rst
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Java bindings: add DamlRecord, deprecate Record
Fixes#10130
changelog_begin
[Java bindings] In order to avoid clashing with `java.lang.Record` (introduced
in Java 14), `com.daml.ledger.javaapi.data.Record` has been renamed to
`com.daml.ledger.javaapi.data.DamlRecord`. The old name has been used to
denote a sub-type of the newly renamed one, so it can still be used, but it has
been marked as deprecated.
[Java codegen] The Java codegen now uses the `DamlRecord` type wherever `Record`
was used before.
changelog_end
Boy-scout rule:
- removed references to ~old~ ancient versioning
- used `@deprecated` Javadoc annotation wherever meaningful
- some import re-arrangement performed by the linter
* Address https://github.com/digital-asset/daml/pull/10132#discussion_r659705929
Since per-request offset can be described strictly as a special case of the new
per-query offset semantics, go ahead and describe it that way, so that really
only one model needs to be understood to fully comprehend the query request
semantics.
CHANGELOG_BEGIN
CHANGELOG_END
changelog_begin
- [Ledger API] Use of divulged contracts in later transactions is
deprecated. Divulged contracts were already incompatible with
pruning. We are working on features to handle the cases currently
covered by divulgence.
changelog_end
[docs] Add warning about using divulged contracts to the pruning doc
CHANGELOG_BEGIN
[ledger api] Add warning about incompatibility between pruning and
divulged contracts to pruning docs.
CHANGELOG_END
* Fix the notion of transaction equivalence in the ledger model for exceptions.
@andreaslochbihler-da found that our normalization rules don't normalize rollbacks across exercises, which our notion of transaction equivalence expects them to. For example, the transactions
```
rollback [ exercise [ rollback [ create ]]]
```
and
```
rollback [ exercise [ create ] ]
```
are considered equivalent under the old definition, but do not normalize to each other.
This PR is one possible solution, where we keep our current normalization rules but change the definition of transaction equivalence. In particular, instead of just requiring that the set of rolled back actions to be the same, we require that the set of "rollback roots" be the same, where a "rollback root" is an action that has a rollback node as its parent. This prevents normalization across exercises because that would eliminate some rollback roots.
The idea here is that the set of "rollback roots" encodes the set of "rolled back actions" relative to each action's subtree, unlike before where we only looked at the set of "rolled back actions" relative to the whole transaction. The set of "rollback roots" encodes all that information, but with a simple definition.
A completely different solution is to introduce new normalization rules that work across exercise nodes. Unfortunately these rules would be non-local, and that seems very difficult to do correctly & efficiently.
Part of #8020
changelog_begin
changelog_end
* rollback root -> rollback child
* Shuffle intro to make space for exceptions
changelog_begin
changelog_end
* Add a section on exceptions to the Daml intro
changelog_begin
changelog_end
* Update docs/source/daml/intro/8_Exceptions.rst
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Update docs/source/daml/intro/8_Exceptions.rst
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Add reference docs for exceptions
Not that these are reference-style docs so they are deliberately brief
and don’t focus on usecases. I’ll add a section to the Daml intro for
that in a separate PR.
changelog_begin
changelog_end
* Apply suggestions from code review
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* review comments
changelog_begin
changelog_end
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Pretty print daml.yaml in Daml ledger export
changelog_begin
changelog_end
* Use dynamic port in example-export generation
* Add daml.yaml to Daml ledger export golden test
* Sort data-dependencies for reproducibility
* Replace hashes in data-dependencies with a placeholder
To avoid test failure when any of these change.
* normalize data-dependencies path in scala client
So that the bazel build action is more reproducible itself.
* Fix Scala 2.12 build
* Factor out deleteRecursively
changelog_begin
changelog_end
* Generate ledger export in temp-dir
Build actions are not sandboxed in Windows. The ledger export will also
created a directory `deps` to store all the DALFs in. On Windows this
directory may persist across Bazel builds and may cause errors due to
attempts to overwrite an existing directory.
To avoid these issues the ledger export is generated into a temporary
directory and only the wanted files are moved to the expected output
locations in the bazel execroot afterwards.
* Close source
* Use replace instead of replaceFirst
The latter matches regex pattern instead of just substring matching
which fails with Windows paths due to `\` being interpreted as an escape
character.
* Normalize Windows \ to Unix /
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* client_server_build - user defined outputs
Let the user define a list of output files on client_server_build.
changelog_begin
changelog_end
* daml-script runner expose main(config)
changelog_begin
changelog_end
* Add an example Daml ledger export to the docs
* Build Daml ledger export
changelog_begin
changelog_end
* sh_inline_test
Support toolchain arguments to sh_inline_test. Usefuly for make variable
expansion, e.g. for the POSIX toolchain.
* Add a golden test for Daml ledger export
* Test args files as well
* Use sed from POSIX toolchain
* Add normalization comment to top-level comment
* Ignore trailing CR on Windows
The JSON formatting of the args file uses Windows line endings on
Windows. Therefore, the args.json output technically differs from the
expected output. We're happy to ignore the difference in CRLF here.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Add a ledger model page for exceptions.
This page describes the changes to the ledger model as part of the exceptions feature. The changes should be kept separate for now, but once exceptions are stable and out for a while, they should probably be incorporated into the rest of the daml ledger model.
Part of #8020. **This PR is to be merged only when we start releasing exceptions.**
changelog_begin
- [docs] The Daml ledger model has been updated to describe the changes introduced by the new exceptions feature. See here: https://docs.daml.com/concepts/ledger-model/ledger-exceptions.html
changelog_end
* Apply suggestions from code review
Co-authored-by: Ognjen Maric <ognjen.maric@digitalasset.com>
* Round 2
* Fix and simplify "after" relation!
* Easy fixes
* Diagrams for structure and integrity sections.
* Add missing diagrams :)
* clarify consistency section
* Authorization.
* Editing.
* fix label reference
Co-authored-by: Ognjen Maric <ognjen.maric@digitalasset.com>
* Factor out all encoding components
* Provide TextMap party mapping instead of record
This allows users to customize the mapping from old party names to new
party names.
* Emit bindings for parties at beginning of export
For better readability, to avoid `getParty "Alice" parties` all over the
place.
* getParty --> lookupParty to avoid conflict with Prelude
* Use DA.Traversable.mapA over TextMap
* Update integration test
* Update args.json
* Update the daml export docs
changelog_begin
* [Daml export] Users can now define a mapping from parties in the
original ledger state to parties to be used when recontructing the
ledger state. The ``parties`` component of the argument to the
generated export script now takes a mapping from old party name to new
party name.
changelog_end
* getContract --> lookupContract for consistency with lookupParty
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Take user defined mappings for unknown contracts
* Remove unused `allocateParties` helper
These are now provided in `args.json`.
* No longer fail on missing contract ids
* Generate a default args.json
* Configure daml start to run the export
Configures init-script and script-options such that `daml start` will
execute the export script with the default `args.json` input.
Configures navigator to display the default parties.
* Update daml export integration test
Input format has changed.
* Update documentation for daml ledger export
changelog_begin
* [Daml export] Daml ledger export now handles references to missing
contracts. The generated export script takes a mapping from unknown
contract ids to replacement contract ids as a parameter. Users can
prepopulate the ledger with replacements of missing contracts and
configure the export script to reference these replacements.
The generated export script no longer exposes ``testExport`` as an
entry point, instead Daml export generates a default input file
``args.json`` that can be used to execute the ``export`` function from
``daml script`` or ``daml start``.
changelog_end
* Reinstante testExport & allocateParties
Convenient for testing in Daml IDE or on ledgers that don't have
automatic party allocation.
* Add docstrings to the generated Daml export script
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
The existing public key is set to expire in May, so we've changed it.
Note: this _should_ require no other change as the private key is
unchanged (i.e. the new public key can be used to verify old
signatures), but my understanding of GPG is somewhat limited so 🤷.
CHANGELOG_BEGIN
CHANGELOG_END
* Add setTime flag
changelog_begin
* [Daml export] Enable the ``--set-time`` flag on
``daml ledger export script`` to replicate transaction time stamps.
This only works on ledgers operating in static time mode.
changelog_end
* Dump.scala --> Export.scala
So that the file name and class name match.
This was forgotten in 5e652bb2f8.
* Implement optional setTime actions
* Define Action type encompassing SetTime and Submit
Factor out construction of submit actions interleaved with setTime
actions.
This makes it easier to test the corresponding functionality in
isolation.
* EncodeSetTimeSpec
* ActionsFromTreesSpec
* update docs on daml ledger export
* Enable --set-time in integration test
To ensure that the generated code actually compiles
* Fix date/time encoding
Requires additional imports for DA.Time and DA.Date.
Requires qualified references to DA.Time.time, DA.Date.date, and
DA.Date.MONTH.
* Fix Scala 2.13
* Move setTime parameter to Action.fromTrees
* Move export transaction time docs out of caveats
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Document daml ledger export script
changelog_begin
* [Daml export] Refer to the "Ledger Export" chapter under the "Early
Access Features" for a description of the new Daml ledger export
command. This is an early access feature.
changelog_end
* Fix reference formatting
* Update docs/source/tools/export.rst
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Mark as alpha
* Clarify issue around archived contracts
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* 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
* 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>
* 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>
* Add documentation for the Daml Profiler
changelog_begin
- [Daml Profiler] Daml Connect EE now includes a profiler which can be
used to profile Daml execution time.
changelog_end
* Update docs/source/tools/profiler.rst
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* Make sphinx happy
changelog_begin
changelog_end
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* Support fetching SDK EE tarball in the assistant
This PR adds an `artifactory-api-key` field to `daml-config.yaml`. If
this is set, we will download the SDK EE tarball if it exists, falling
back to GH releases on 404s (for old releases).
changelog_begin
- [Daml Assistant] The assistant now supports an `artifactory-api-key`
field in `daml-config.yaml`. If you have a license for Daml Connect
EE you can specify this and the assistant will automatically fetch
the EE edition which provides additional functionality.
changelog_end
* Hardcode first EE snapshot
changelog_begin
changelog_end
* Add pruning stabilization to ledger API changelog
changelog_begin
changelog_end
* also can’t type outside of backport
changelog_begin
changelog_end
* I give up
changelog_begin
changelog_end
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
* Use DA.Map in triggers if available
Replaces DA.Next.Map by DA.Map in the trigger library if the DAML-LF
version supports it, i.e. above 1.11.
Selects on `DAML_GENMAP` and `DAML_GENERIC_COMPARISON` using `CPP`.
changelog_begin
- [Triggers] The trigger library now uses `DA.Map` instead of the
deprecated `DA.Next.Map` if the targeted Daml-LF version supports it.
This is a breaking change: Code that interfaced with the triggers
library using `DA.Next.Map`, e.g. with
`Daml.Trigger.getCommandsInFlight` or `Daml.Trigger.Assert.testRule`,
will need to be changed to use `DA.Map` instead.
changelog_end
* Deduplicate GMap imports in triggers
* DA.Next.Map --> DA.Map in carbon-upgrade-trigger
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Add a Ledger API changelog
changelog_begin
changelog_end
* Update docs/source/support/compatibility.rst
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
Also adds a comment to make sure we don’t forget it in the
future. Note for reviewers: Our code already only looks at the first
line, so the comment in the second line does not break anything.
changelog_begin
changelog_end
* Use cliopts.Http for OAuth 2.0 middleware
changelog_begin
- [OAuth 2.0 Middleware] You can now configure the address that the
middleware listens to using the ``--address`` flag.
The port that the middleware listens to is now configured using the
``--http-port`` flag, use 0 to dynamically choose a free port.
You can now configure a port file where the chosen port will be
written to using the ``--port-file`` flag.
changelog_end
* Add test-case for OAuth 2.0 middleware port file
* Don't forget to close source
* Fix integration test
* Update triggers/service/auth/src/main/scala/com/daml/auth/middleware/oauth2/Config.scala
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* add livez endpoint to auth middleware
* Add OAuth 2.0 middleware to Daml SDK
* unhide trigger service auth flags
changelog_begin
- [Triggers] The trigger service now supports authorization through an
auth middleware. The feature is enabled using the `--auth` and
`--auth-callback` command-line flags. Please refer to the
Authorization chapter of the trigger service documentation for further
instructions.
- [OAuth 2.0 middleware] Daml Connect now includes an implementation of
the auth middleware API that supports OAuth 2.0 Authorization Code
Grant. Please refer to the Auth Middleware and OAuth 2.0 Auth
Middleware chapters of the documentation.
changelog_end
* drop early access flag on triggers
Daml triggers, the trigger service, and the auth middleware are no
longer marked as early access features.
changelog_begin
- [Triggers] Daml Triggers and the Trigger Service are no longer in
early access status.
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Add choice observers in the ledger model.
To keep the distinction between "observer" and "choice observer"
clear I'm trying to always refer to the former as "contract observer".
The section on divulgence should probably be reworked to favor choice
observers at some point, but I'm not sure how to do that.
changelog_begin
changelog_end
* s/observer/contract observer
* Separate out the choice observer case of informees
* apply suggestion from @oggy-
* specifying choice observers in DAML contract model
* Add table correlating Connect and Ledger API version
CHANGELOG_BEGIN
CHANGELOG_END
* Use a legal character for header underlining
* Flip columns
* Remove empty line
* Replace many occurrences of DAML with Daml
* Update docs logo
* A few more CLI occurrences
CHANGELOG_BEGIN
- Change DAML capitalization and docs logo
CHANGELOG_END
* Fix some over-eager replacements
* A few mor occurrences in md files
* Address comments in *.proto files
* Change case in comments and strings in .ts files
* Revert changes to frozen proto files
* Also revert LF 1.11
* Update get-daml.sh
* Update windows installer
* Include .py files
* Include comments in .daml files
* More instances in the assistant CLI
* some more help texts
This commit fixes a few copyright headers that have been missed in the
automatic update on Jan 1, as well as the generation code in the compat
workspace so it generates the right headers.
CHANGELOG_BEGIN
CHANGELOG_END
* Remove Navigator console
This was a labs feature so we can remove it without a deprecation
cycle. It doesn’t have any known users and is almost completely
superseded by DAML REPL.
@bame-da agreed to the removal.
This also has the nice side effect of eliminating 1 of our 2
dependencies that were not Scala 2.13 compatible.
changelog_begin
- [Navigator Console] The labs feature Navigator Console has been
removed. Users are encouraged to use DAML REPL instead.
changelog_end
* Kill Navigator database docs completely
changelog_begin
changelog_end
As we strive for more inclusiveness, we are becoming less comfortable
with historically-charged terms being used in our everyday work.
This is targeted for merge on Dec 26, _after_ the necessary
corresponding changes at both the GitHub and Azure Pipelines levels.
CHANGELOG_BEGIN
- DAML Connect development is now conducted from the `main` branch,
rather than the `master` one. If you had any dependency on the
digital-asset/daml repository, you will need to update this parameter.
CHANGELOG_END
* Support multi-party submissions in DAML Script over JSON API
changelog_begin
- [DAML Script] Multi-party submissions are now also supported over
the JSON API.
changelog_end
* Fix outdated comment
changelog_begin
changelog_end
* Support multi-party submissions in the JSON API
changelog_begin
- [JSON API] Add support for multi-party submissions by allowing for
multiple actAs parties in the token and passing on readAs to the
ledger.
changelog_end
* Update ledger-service/http-json/src/main/scala/com/digitalasset/http/EndpointsCompanion.scala
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* Deprecate Sandbox persistence
changelog_begin
changelog_end
* Update docs/source/tools/sandbox.rst
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* Include in component statuses
changelog_begin
changelog_end
* Fix daml on sql Name param
changelog_begin
changelog_end
* make it compile
changelog_begin
changelog_end
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* Document participant pruning for operators
CHANGELOG_BEGIN
CHANGELOG_END
* Add references
* Add references and authorization info
* Address review comments
* Keep paragraphs on the same line
* Fix link to Pruning Service
* Add services section for Pruning Service
* Add Pruning Service to service diagrams
* Fix leftover
* How to determine a suitable pruning offset
* Expand determining a suitable offset
* Expand API impacts
* Expand limitations
* Address review comments
* Address review comments
* Flashier top-level menu
* Flashy buttons
CHANGELOG_BEGIN
CHANGELOG_END
* Increase top-level nav font-size
* Make the entire landing page box clickable
* Fix code block alignment and copy button with line numbers
* Fix code blocks with line numbers on mobile
* Reengineer code blocks properly
* More fixes to code-blocks
* Add a vertical line after line numbers
* fix minor typos
CHANGELOG_BEGIN
CHANGELOG_END
* Remove notes and comments on pragma
* minor fix: remove "again" again
* fix various typos
* remove unexplained "bank" references
* replace LET with LT
* fix typo
* remove "again"
* fix grammar
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* adjust line numbers to include
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
Noticed this while using it to test Navigator changes. Not sure for
how long this has been outdated but definitely for quite a while.
changelog_begin
changelog_end
* Docs restyle WIP
* Minor color changes
* Adjust fonts and shadows
* Remove redundant local contents
* Further fixes to "In this Section"
* Restyle previous and next buttons
* Make visited link color blue
* Top-level nav
* Change how anchors are underlined
* Fix header spacing
* Improve tables
* Improve search results
* Improve copy button
Match sphinx versions between dev-env and bazel
* Copy button and code block fixes
* Fix copy button z-index
* Making things reactive
* Make the title spacing work on mobile & tablet
* Pixel adjustment for S3 hosting
* Spacing and font-size fixes
* Fix content menu for tablet
* Tidy up menu indentation
* Reorder Mobile Menu
* Move unified nav up
CHANGELOG_BEGIN
[Docs] New styling
CHANGELOG_END
* Remove non-free fonts
* Fix button padding
* Fix spacing above first h2
* Fix pixel adjustment of h1 line
* Fix menu click effects and antialiasing
* Pixel adjust h1 line once more
* Remove the examples page from the docs in favour of one on daml.com
CHANGELOG_BEGIN
CHANGELOG_END
* Fix link from /samples to /examples
* Fix link in daml intro
* Fix link, second try
* kvutils: Use ScalaPB to generate a Scala JAR for daml_kvutils.proto.
* Bazel: Delete the unused `da_java_binary` rule, and inline `_wrap_rule`.
* Bazel: Factor out Java/Scala protobuf class generation into a helper.
CHANGELOG_BEGIN
CHANGELOG_END
* daml-lf/archive: Use `proto_jars`.
* Bazel: Remove the visibility modifier from `proto_jars`.
It's too confusing. Just make everything public.
* daml-lf/archive: Push protobuf source tarballs into `proto_jars`.
* Bazel: Add comments to the various parts of `proto_jars`.
* daml-assistant: Do unpleasant things with `location` in Bazel.
* Add party management service to the services page, targeting #8027.
CHANGELOG_BEGIN
CHANGELOG_END
* rephrase to make it more compact
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* remove unnecessary note
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* remove unnecessary note
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
* remove blank line
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
A question on discuss prompted me to read this page, and I spotted a
couple typos.
As a side note, I find references to DAML-LF versions unhelpful. I don't
think it's fair to expect our users to know the mapping between DAML
versions and DAML-LF versions.
CHANGELOG_BEGIN
CHANGELOG_END
* Link concepts "gRPC Ledger API" and "Ledger API" in glossary for #8029.
CHANGELOG_BEGIN
CHANGELOG_END
* remove gRPC Ledger API which was in the wrong place
* rephrase alternative names
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
This addresses feedback on the upgrade documentation. We switch the
example from coins to carbon certificates and add a section for the
centralized database case to make the base case clear.
CHANGELOG_BEGIN
CHANGELOG_END
* concretize item on "serving the API"
CHANGELOG_BEGIN
CHANGELOG_END
* Revert "concretize item on "serving the API""
This reverts commit 83e35114c4.
* change authentication to authorization
* remove "etc." to make item clearer
* Minor improvements to getting started doc
* add empty changelog
changelog_begin
changelog_end
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Adapt to new desugaring for choice observers.
update hash of ghc patch.
changelog_begin
changelog_end
update ghc patch to final version
update stack-snapshot hashes for ghc-lib(-parser)
update stackage_snapshot.json, following `bazel run @stackage-unpinned//:pin`
expose Optional constructors for desugared code to use
adapt LFConversion to expect a 4-tuple for a desugared choice def/sig
update LFConversion for choice-observers
first example using new choice observer syntax.
fix scala type checker to have correct scoping rules for choice-observers
remove comment from example which says it is broken
improve variable names
improve tests for choice-observer clause
only test choice-observers SINCE 1.dev
add jq queries for choice observeres
make positive statement in jq test which checks choice obserers are present
test behaviour of choice observers
squash me
typo
* test more choice-observer divulgence
* Update documention for choice observers.
changelog_begin
Support choice observers in 1.dev
changelog_end
* fix docs build
* fix daml docs choice-observers example
* address comments: rewording text
* annotate choices observers as early-access in documention
* split out documentation code-snippets which require --target=1.dev
* final tweaks to documentation text
* Make application ID configurable in trigger service
fixes#7671
changelog_begin
- [Trigger Service] The application id used by a trigger can now be
configured by an optional `applicationId` in the start request.
changelog_end
* Update triggers/service/src/main/scala/com/digitalasset/daml/lf/engine/trigger/Server.scala
Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
Co-authored-by: Andreas Herrmann <42969706+aherrmann-da@users.noreply.github.com>
* Make GHC recognise our ($) operator.
Fixes#4555 by moving ($) to GHC.Base and giving it a levity polymorphic
signature, as GHC expects. Added a regression test.
changelog_begin
changelog_end
* Update line numbers for debug...
* Fix `daml test-script` tests
changelog_begin
changelog_end
* fmt for the format gods
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Revamp trigger status endpoint
fixes#7951
The previous endpoint was a memory leak, nothing got persisted across
restarts and it omitted useful information like the metadata of the
trigger. The information is useful for testing, so I abstracted over
it so we can do what we did before in testing.
As for the endpoint, it now queries the actor for its current status
and only returns that and includes the metadata in the response.
As mentioned in #7951, I do think there is value in some kind of
history and potentially something including trace statements but I’d
like to do that properly instead of the hacky thing we have atm.
changelog_begin
- [Trigger Service] The trigger status endpoint /v1/triggers/:id now
includes metadata about the trigger like the party and the trigger
id. The logs field has been replaced by a status field.
changelog_end
* Fix ACS query test
changelog_begin
changelog_end
* Include listKnownParties in DAML Script docs
Ratko pointed out that this can often be useful in demo scenarios so
we might as well include it while documenting the caveats. I’ve also
added some subheadings since this got a bit out of hand.
changelog_begin
changelog_end
* Fix tests
changelog_begin
changelog_end
* com.digitalasset.platform --> com.daml.platform in logbacks
* correct some broken running scala test examples
* correct com.digitalasset.platform broken links
CHANGELOG_BEGIN
Correct some remaining package name references to
com.digitalasset.platform in logback and readme file
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* Add healthcheck endpoints to JSON API
This PR adds /livez and /readyz (following k8s naming scheme) that can
be used as liveness and readyness check. There isn’t much we can do
for liveness apart from showing that we can still respond to http
requests but readyness can be a bit more clever and check the ledger
connection as well as the database connection.
changelog_begin
- [JSON API] Add `/livez` and `/readyz` health check endpoints for
easier integration with k8s and other schedulers.
changelog_end
* I hate windows
changelog_begin
changelog_end
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
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
* Replace occurrances of DAML SDK in the docs with appropriate new terms
CHANGELOG_BEGIN
CHANGELOG_END
* Apply suggestions from code review
Revert two renamings.
* Fix broken internal link
The previous restriction was both too lax and too strict now that we
have multi pary queries:
1. It allowed a party in `readAs` for command submissions which just
fails on the ledger side. Changing this is technically breaking but
only if you used a token that would have been rejected as soon as you
enabled auth so that seems very resonable to break.
2. It didn’t allow extra parties in `readAs`.
This PR switches to requiring exactly one party in `actAs` while
supporting multiple parties in `readAs`.
changelog_begin
- [JSON API] JWTs on command submissions can now contain extra parties
in the `readAs` field. `actAs` is still limited to a single party.
changelog_end
* allow updating user state from high-level trigger rule
* fix tests and examples for new rule signature
* fix doc for new rule signature
* add changelog
CHANGELOG_BEGIN
- [Triggers] ``rule`` can now ``get`` and ``put`` the user-defined state just
like ``updateState`` does. It no longer accepts the state as an argument.
You can port your rule function types by replacing ``s -> TriggerA`` with
``TriggerA s``, removing the last argument from the function, and using
``get`` to retrieve the state at the beginning of the ``rule``'s ``do`` block,
if needed.
See `issue #7674 <https://github.com/digital-asset/daml/pull/7674>`__.
CHANGELOG_END
* test that rule userState changes propagate all the way out
* adapt compatibility filtering to #7681
* add ACS reader to TriggerA and TriggerStateA
* propagate changes in TriggerA, TriggerStateA structure
* allow query to be used in updateState and rule
* remove getTemplates
* remove ACS argument from updateState and rule
* fix type parameter order on query
* use query function in all tests and examples
* replace getContracts with query in documentation
* use wildcards instead of otherwise
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* rename TriggerStateA to TriggerUpdateA
- suggested by @cocreature; thanks
* missed renamings of TriggerStateA to TriggerUpdateA
- suggested by @cocreature; thanks
* make the meaning of the rlift functions clearer
* make initialize a TriggerInitializeA instead of a function; remove getContracts
* update tests and examples for new initialize signature
CHANGELOG_BEGIN
- [Triggers] Trigger ``updateState``, ``rule``, and ``initialize`` functions no
longer accept an ``ACS`` argument; instead, they must use the ``query`` action
to query the ACS, similar to the same function in DAML Script.
See `issue #7632 <https://github.com/digital-asset/daml/pull/7632>`__.
CHANGELOG_END
* disable older compatibility trigger builds
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* add ActionState to the standard library
* use 1 ActionState, 1 get, 1 put in low-level trigger library
* introduce TriggerStateA for updateState
* fix tests and examples for new updateState signature
CHANGELOG_BEGIN
- [Triggers] The ``updateState`` function now returns a ``TriggerStateA``. This
is an action like ``TriggerA``, but doesn't permit emitting commands. Instead
of taking the state as an argument and returning a new state, you can
manipulate the state with ``get``, ``put``, and ``modify``. Any existing
``updateState`` can be ported by replacing ``s -> expr`` in the lambda
expression with ``-> modify $ \s ->``, and then made to look nicer from there
as desired.
See `issue #7621 <https://github.com/digital-asset/daml/pull/7621>`__.
CHANGELOG_END
* some DAML docs for updateState and TriggerStateA
* Update JSON API docs to mention multi-party queries
Forgot to include this in #7571. Also includes the changelog which I
also forgot :sadpanda:
changelog_begin
- [JSON API] Queries on the JSON API now support multiple parties just
like the gRPC Ledger API. Single-party tokens are still
supported. Note that command submissions are still limited to a
single party following the restriction on the underlying ledger API.
changelog_end
* Update docs/source/json-api/index.rst
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
Co-authored-by: Stephen Compall <stephen.compall@daml.com>
* add getCommandsInFlight as a TriggerA action
* immediately update commandsInFlight on emitCommands
- delay until the rule had returned made sense before submitCommands was launched
immediately; this also makes `getCommandsInFlight` more sensible
* remove commands-in-flight argument from high-level Trigger rule
CHANGELOG_BEGIN
- [Triggers] The "commands in flight" or ``Map CommandId [Command]`` argument has been
removed from high-level trigger ``rule`` functions; instead, the current
commands-in-flight can be retrieved with the new ``getCommandsInFlight`` function, which
can be done immediately at the beginning of the rule's ``do`` block to preserve exact
existing trigger behavior.
See `issue #7600 <https://github.com/digital-asset/daml/pull/7600>`__.
CHANGELOG_END
* remove commands-in-flight argument from trigger tests
* update doc examples and copy in compatibility
- compatibility change will most likely entail another flag day in compatibility tests,
replacing last_pre_7456_trigger_version
* update doc text for getCommandsInFlight
* test that getCommandsInFlight gets updated during the rule
* flag day for trigger compatibility tests
sdk-version: 1.7.0-snapshot.20201006.5358.0.0c1cadcf
File: src/CopyTrigger.daml
Hidden: no
Range: 55:11-55:19
Source: typecheck
Severity: DsError
Message:
src/CopyTrigger.daml:55:12: error:
• Couldn't match type ‘TriggerA ()’ with ‘() -> TriggerA ()’
Expected type: Party
-> DA.Next.Map.Map CommandId [Command] -> () -> TriggerA ()
Actual type: Party -> ACS -> () -> TriggerA ()
• In the ‘rule’ field of a record
In the expression:
Trigger
{initialize = \ _acs -> (), updateState = \ _acs _message () -> (),
rule = copyRule, registeredTemplates = AllInDar, heartbeat = None}
In an equation for ‘copyTrigger’:
copyTrigger
= Trigger
{initialize = \ _acs -> (), updateState = \ _acs _message () -> (),
rule = copyRule, registeredTemplates = AllInDar, heartbeat = None}
* match docs on TriggerAState to current usage of these fields
* remove emittedCommands, as commandsInFlight is now kept up-to-date
* zoomed from where?
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This makes the `daml start` process listen for a key-press. When 'r' is
pressed, the package is re-build, the new package uploaded to the
in-memory sandbox and the codegen re-run.
Note: While we clean previous outputs of the code generation, there is
currently no way to drop previously uploaded packages from the in-memory
sandbox. However, it will take many re-uploads until this will become a
problem.
CHANGELOG_BEGIN
[daml start] You can now press 'r' (or 'r' + 'Enter' on Windows) in the
terminal where `daml start` is running to rebuild the DAR package and
generate JavaScript/Java/Scala bindings and upload the new package to
the sandbox. This frees the user from killing and restarting `daml
start`.
CHANGELOG_END
* Update release instructions to follow newest GSG
We've lately integrated the codegens into `daml start`, which made the GSG significantly shorter in turn. Reflect these changes in the release instructions. Also reword some parts where I found the instructions ambiguous on first reading.
CHANGELOG_BEGIN
CHANGELOG_END
* Apply suggestions
CHANGELOG_BEGIN
CHANGELOG_END
* [KVL-519] Instrument command service queues
changelog_begin
changelog_end
* Instrument max-in-flight queue
* Document inputBuffer and maxInFlight metrics
changelog_begin
[Sandbox] New metrics tracking the pending submissions and completions on the
CommandService. Check out the Metrics session in the sandbox documentation
for more details. The new metrics are input_buffer_size, input_buffer_saturation,
max_in_flight_size and max_in_flight_saturation.
changelog_end
* Fix compilations issues (1)
* Fix title underline in docs
* Refactoring of InstrumentedSource
- Rename saturation/size to length/capacity to make it more obvious what they are.
- Move the InstrumentedSource to ledger/metrics. Fits there better, with the utilities
there already for futures. Arguable both should move into libs-scala package at some point though.
- Expand the tests and make the tests less flaky. 200 runs complete fine now.
- Inc/dec the capacity counter within InstrumentedSource.
* Add missing copyright header
* Reformat
* Update ledger/metrics/src/test/scala/com/daml/metrics/InstrumentedSourceSpec.scala
Co-authored-by: hanshoglund-da <67470727+hanshoglund-da@users.noreply.github.com>
* Fix title underline in docs (again)
Co-authored-by: Jussi Maki <jussi.maki@digitalasset.com>
Co-authored-by: hanshoglund-da <67470727+hanshoglund-da@users.noreply.github.com>
* conservatively move daml-script, trigger SValue interpreters to common library
* introduce expect and JavaList pattern for converters
* clean up trigger Converter Command interpretation
* add Church Free monad
* add an action language for trigger updates
* add expectE to remove some of the joins
* convert more of the converters to expect
* tool for unrolling Free/Roll
* split handleStepResult up and clean up its pattern
* handleStepFreeResult to interpret TriggerF
* replace Free Church with Pure/Roll free from Script
* newtype for ActionTrigger
* replace update in low-level Trigger with Free TriggerF
* submit one Commands at a time
* boolean blindness strikes again
* log missed TriggerF steps
* comment actual Submit contents
* match #7501 fromPureSExpr sig change in 00b80b8ea3
* avoid using forwardPort in runTrigger
* push State back into DAML, so it can be excluded from the action list
* push Message back into DAML, unifying the action language for initialState and update
* bringing TriggerF into initial state
* really add TriggerF into initial state, with all ports, tested
* add ActionTrigger class, express initialState in its terms
* add all TriggerF actions to existing TriggerA
* Trigger.rule will no longer have Time argument
* rename getS, setS to get, put, matching C.M.T.State from transformers
* make high-level Rule evaluate to the underlying TriggerF sequence
* Assert's testRule doesn't have a transform yet
* move DamlTuple2 to common converter library
- suggested by @cocreature; thanks
* combine the two Frees, provide from Script
* remove time argument from integration tests
CHANGELOG_BEGIN
- [Triggers] The ``Time`` argument was removed from the trigger rule function; instead, it
can be fetched within the ``TriggerA`` ``do`` block by ``getTime``, as with ``Update``
and ``Scenario``. The ``LowLevel`` trigger interface has been redesigned; such triggers
need to be rewritten or ported to high-level triggers.
See `issue #7456 <https://github.com/digital-asset/daml/pull/7456>`_.
CHANGELOG_END
* add trigger rule simulator to support Assert module
* missed new Free module
- left in script per @cocreature
* remove retract as we ended up using foldFree for that purpose instead
- suggested by @cocreature; thanks
* throw ConverterException instead of RuntimeException
- suggested by @cocreature; thanks
* remove Time argument from coin-upgrade-trigger
* port trigger service tests
* port trigger scenario test
* put TriggerSetup and TriggerRule into LowLevel.Trigger instead of unboxed Free
- suggested by @cocreature; thanks
* remove Time argument from trigger compatibility test
* submit commands as soon as each `emitCommands` is sequenced
- we still collect a list, but only for tracking commandsInFlight
* filter out compatibility tests for triggers before now
* remove commented imports, libraries from new shared converter
* make the TriggerF interpreter tail-recursive
* remove unused compatibility trait
* add back new state logging
* remove refactoring comment
* rewrite some LowLevel initialStates in do
* hide Daml.Script.Free from docs
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* remove forwardPortInitialState
- suggested by @cocreature; thanks
* manually port low-level updates
- suggested by @cocreature; thanks
* remove forwardPort
- suggested by @cocreature; thanks
* fail faster on unrecognized TriggerF
- suggested by @cocreature; thanks
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
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
* 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>
* 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>
* 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>
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
* 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
* 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>
After discussion we have decided to introduce such popups through Google
Tag Manager, as the release schedule fo these sorts of JS tags does not
mesh well with the current release process of our docs site.
CHANGELOG_BEGIN
CHANGELOG_END
There is generally little need to preview the PDF version of the docs.
Also, opening up the Python server on 0.0.0.0 (the default) triggers OS
warnings on macOS.
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
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
* Extend wait time for dedupe tests to 2x dedupe window
* default clock tick interval of 10s, make it optionally configurable
CHANGELOG_BEGIN
[ledger-api-test-tool] Include new attribute for configurable clock tick
interval
CHANGELOG_END
Signed-off-by: Brian Healey <brian.healey@digitalasset.com>
* address review comments
* Address code review - use Duration
* Add documentation on --ledger-clock-granularity option
* Update documentation
* address review comments
* address warning: implicit numeric widening
* scalafmt
* ProtobufDuration alias rather than ProtoDuration for consistency with namespacing
* underline in docs
This is clearly a breaking change but triggers are still alpha so we
can get away this (confirmed with Bernhard).
changelog_begin
- [DAML Trigger] Daml.Trigger.Assert now uses DAML Script instead of scenarios.
changelog_end
* Partial update to codegen docs
* ADD: JS codegen to codegen docs
* CHANGELOG_BEGIN
ADD: JS codegen to codegen docs
CHANGELOG_END
* Make it clear we're talking about codegen
* Add extra reference to JS, JS -> TS, and mention missing Java/Scala classes
* Add placeholder for SDK version
* Add queryContractId to DAML Script
I’ve switched between a few different naming options and in the end
settled on this one:
- `lookupContract`, not too bad but misses the connection to `query`
- `queryCid`, we don’t abbreviate this in other places in our API so I
don’t think we should here.
- `queryContractId`, makes the connection clear and no
abbreviation. We could also add `queryContractKey` later
changelog_begin
- [DAML Script] Add a `queryContractId` function for querying for a
contract with the given identifier.
changelog_end
* Fix test
changelog_begin
changelog_end
* java-quickstart replace scenarios by DAML Script
This replaces the scenarios in the java quickstart project by DAML
script test cases.
The following changes were required
* Replace `getParty` by `allocateParty`.
* Replace `create` and `exercise` by `createCmd` and `exerciseCmd`.
* Replace the pattern of `submit ... do create ...; exercise ...`
by `submit ... do createAndExerciseCmd ... ...`.
* Replace instances of `submit ... do fetch ...` by `query ... ...`.
To that end I've added the following helper function.
```
queryIou : Party -> ContractId Iou -> Optional Iou
```
changelog_begin
changelog_end
* Replace queryIou by FetchIou choice
changelog_begin
changelog_end
* Add comment explaining fetch choice
Addressing review comment
https://github.com/digital-asset/daml/pull/7183#discussion_r478918758
* Support dependencies in daml_test rule
Cherry-picked from https://github.com/digital-asset/daml/pull/7264/files
Renamed `dependencies` as `deps` to stick to Bazel conventions.
* Fix quickstart `daml_test` target
* fmt
* Quote deps in daml.yaml
To avoid issues with `:` in Windows paths.
* //docs:quickstart-java - use temp dir
This target repeatedly failed to build on Windows with
```
ERROR: D:/a/1/s/docs/BUILD.bazel:538:8: declared output
'docs/quickstart-java.tar.gz' was not created by genrule. This is
probably because the genrule actually didn't create this output, or
because the output was a directory and the genrule was run remotely
(note that only the contents of declared file outputs are copied from
genrules run remotely)
```
The genrule was operating in the current working directory and builds on
Windows are not sandboxed. Conflicting files in the current working
directory could cause this to fail.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Remove authentication service from trigger service
This rips out the integration with ref-ledger-authenticator and
together with that the weird http basic auth which doesn’t actually
work for ref-ledger-authenticator outside of its testing mode and also
includes some very sketchy stuff like storing user
passwords (encrypted but still).
While the exact details of the new approach towards auth are still not
completely clear, it is clear that it is going to be sufficiently
different from what we did before that starting from a clean slate is
easier.
changelog_begin
- [Trigger Service] Parties are now specified in request bodies as
opposed to via HTTP Basic auth. This is done in preparation for
running the trigger service against authenticated ledgers.
changelog_end
* Fix integration tests
changelog_begin
changelog_end
* Deprecate noop `--application-id`
changelog_begin
[JSON API]
Hiding and deprecating `--application-id` command-line option. JSON API never used it.
It is required to instantiate LedgerClientConfiguration and was not used for any command submission.
JSON API uses Application ID specified in the JWT. See #7162
changelog_end
* removing further usage of noop applicationId
* a bit of explanation what this is for
* Clarify how to start a test ledger, and run json api with & w/o query storage
* Remove the json-api --help output and replace with a note.
* Update JSON API Authorization/Authentication sections
* Minor improvements to query section
* CHANGELOG_BEGIN
[Docs] Improve the JSON API documentation, clarify the common json-api options, and update the authorization/authentication section.
CHANGELOG_END
* Note why you would specify a Command ID in the JSON API
* Clarify how the Authorization token works
* Add warning to always run the JSON API behind a reverse proxy
* Apply suggestions from code review
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Change how we refer to the different access tokens used by the JSON API
* applicationId doesn't need to match --application-id
* remove reference to planned jwt library
* Update party allocation instructions/explanation
* Remove IAM references from Ledger API Auth
* Stop lying about secrets
* Auth shouldn't be party-specific
* Needed more stars
* Apply suggestions from code review
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Update Ledger API access token description
* Additional clarifications on the two types of tokens
* Note that each request to the JSON API can only come from a single party
* Apply suggestions from code review
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Clarify getting access tokens from your ledger operator
* Add link to JWT format in the sandbox
* Fix inconsistent title level
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Enable DAML Script service by default and document it
fixes#7193
changelog_begin
- [DAML Script] DAML Scripts are now run in DAML Studio just like
scenarios. The functionality for inspecting the results is
identical. If you encounter issues, please report them.
changelog_end
* fix double "is identical"
changelog_begin
changelog_end
* Adding `package-max-inbound-message-size`
this is to allow separate configuration settings for command submission
and package management ledger clients
* Fixing formatting
* Updating docs
changelog_begin
[JSON API] Adding `--package-max-inbound-message-size` command line option.
Optional max inbound message size in bytes used for uploading and downloading package updates. Defaults to the `max-inbound-message-size` setting.
changelog_end
* Addressing code review comments
Adds a Boolean check for the existence of an active contract with a
given key (that is visible with the current set of authorizations), and
explain `lookupByKey` in terms of it to hopefully clarify the relationship
between `lookupByKey` and `fetchByKey`.
Fixes#7143; see that for more information.
CHANGELOG_BEGIN
- [DAML Standard Library] Added a new function `visibleByKey`
which, given a contract key, returns True if the current context can
see an active contract with that key.
CHANGELOG_END
* REPL test `:json` command
changelog_begin
changelog_end
* Implement :json command in DAML REPL
changelog_begin
- [DAML REPL] You can now convert DAML expressions to JSON in the DAML
REPL using the meta-command ``:json`` for example ``:json [1, 2, 3]``.
changelog_end
* Extend DAML REPL documentation
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Fix some screen widths/zoom levels not showing the content menu collapse/expand icon
* CHANGELOG_BEGIN
[Docs] Fix some screen widths not showing the content menu collapse/expand icon
CHANGELOG_END
- Put Windows first, and add a direct link to the installer.
- Move the manual step to a separate page.
- Link to AdoptOpenJDK as they have by far the simplest download page.
CHANGELOG_BEGIN
CHANGELOG_END
* ledger-api-test-tool: Upload DARs, rather than expecting them.
This allows us to avoid knowing the DARs.
CHANGELOG_BEGIN
- [Integration Kit] When running the Ledger API Test Tool, the required
DAR files are now uploaded to the ledger automatically before running
the tests. You no longer need to upload these DARs before running the
test tool.
CHANGELOG_END
* ledger-api-test-cool: Factor out configuration construction.
* ledger-api-test-tool: Upload DARs to all participants.
And don't prime Canton.
* docs: Document that the Ledger API Test Tool uploads DARs by itself now.
* ledger-api-test-tool-on-canton: Remove unused code in the runner.
CHANGELOG_BEGIN
Add documentation for the ordering guarantees on the Ledger API
and for causal consistency with interoperable ledgers
CHANGELOG_END
Co-authored-by: Ognjen Maric <ognjen.maric@digitalasset.com>
Co-authored-by: Bernhard Elsner <40762178+bame-da@users.noreply.github.com>
This is set per participant since it is similar to the token file.
fixes#7029
changelog_begin
- [DAML Script/DAML REPL] You can now configure the application id via
`--application-id` or the `--participant-config`. This is primarily
useful if you are working against a ledger with authentication and
need to match the application id in your token.
changelog_end
* Factor out tar/gzip reproducibility flags
* use mktgz in package-app
* Bazel managed tar/gzip
* Remove quiet = True
As stated in the comment this is no longer required with Bazel >= 3.0.
* Build package-app as a sh_binary
This way Bazel will manage the runtime dependencies tar, gzip, mktgz,
and patchelf.
package-app.sh changes directory so it needs to make sure that all paths
are absolute and that the runfiles tree/manifest location is forwarded
to programs called by package-app.sh.
* Avoid file path too long errors
* Fix readlink -f on MacOS
* Document abspath
changelog_begin
changelog_end
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Use Bazel builtin pkg_tar rule
* Use @rules_pkg//:pkg.bzl%pkg_tar
The pkg_tar rule builtin to Bazel has been deprecated.
See https://docs.bazel.build/versions/master/be/pkg.html
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
The docs talked about `emitCommands` while the code talked about
`dedupExercise`. I’m increasingly leaning towards recommending
`emitCommands` for everything so I’ve switched the code instead of the
docs.
changelog_begin
changelog_end
* Change error code for invalid offsets for transaction stream and completion stream requests
* Expanded application architecture docs on how to build application with ledger api failover capabilities.
Fixes#6842.
CHANGELOG_BEGIN
- [Ledger API] The error code for requesting a transaction stream
with an offset beyond the ledger end changed from INVALID_ARGUMENT
to OUT_OF_RANGE. This makes it easier to handle scenarios where
an application fails over to a backup participant which hasn't
caught up with the ledger yet.
- [Ledger API] The command completion service now validates the offset and
returns the OUT_OF_RANGE error if the request offset is beyond the ledger end.
- [Documentation] Added a section on how to write DAML applications
that can fail over between multiple eventually consistent Ledger API endpoints
where command deduplication works across these Ledger API endpoints, which
can be useful for addressing HA and/or DR scenarios.
CHANGELOG_END
We’ve had a few confused users run into issues because of
this. `fsevents` (which is basically impossible to avoid as a
dependency) requires NodeJS 8.16 but for some reason Ubuntu 18.04
sticks to the unsupported 8.10.
changelog_begin
changelog_end
* DAML REPL :show imports
changelog_begin
- [DAML REPL] You can now list the currently imported modules using
the REPL command ``:show imports``.
changelog_end
* Accept \r\n on Windows.
* REPL functests use text mode file for stdin/out
So that `\r\n` will be mapped to `\n` automatically on Windows.
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
* Extend `daml new` to accept template as an option
The two positional arguments keep confusing users so this PR changes
things to allow the template to be passed via `--template`. Using a
positional argument still works so this is not breaking.
I’ve updated all docs to use the less confusing syntax.
changelog_begin
- [DAML Assistant] You can now use ``daml new project-name
--template=template-name`` instead of ``daml new project-name
template-name``. The old CLI syntax continues to be supported.
changelog_end
* Update docs/source/getting-started/index.rst
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
Co-authored-by: Martin Huschenbett <martin.huschenbett@posteo.me>
* DAML REPL help and module commands
changelog_begin
- [DAML REPL] You can now type ``:help`` at the REPL prompt to see a
list of possible REPL commands.
- [DAML REPL] You can now add and remove module imports using
``:module [+-] Some.Module``.
changelog_end
* REPL :module functests
* Improve module not imported error message
* DAML REPL document REPL commands
* Update docs/source/daml-repl/index.rst
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
Co-authored-by: Andreas Herrmann <andreas.herrmann@tweag.io>
Co-authored-by: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
This PR extends DAML REPL to also support `let` bindings which plays
well with the improved support for pure expressions. We support both
pattern bindings and function bindings.
changelog_begin
- [DAML REPL] DAML REPL can now run without a ledger. Take a look at
the documentation for details.
- [DAML REPL] DAML REPL now supports ``let`` bindings to bind pure
expressions. Take a look at the documentation for details.
changelog_end
This PR makes the ``--ledger-host`` and ``--ledger-port`` parameters
optional so DAML REPL works without a ledger which is useful now that
we have better. support for pure expressions. This just piggybacks on
DAML Script’s multiparticipant support so there are no significant
changes on the service.
Docs are updated and we have a testcase.
Side note: What is still missing is `let x = …` in DAML REPL. I’ll
tackle that in a separate PR.
changelog_begin
changelog_end
* Update DAML Studio documentation
This updates the DAML Studio docs primarily focusing on the table view
which was completely omitted so far. This also includes the new
disclosure information.
This is probably best reviewed locally.
changelog_begin
changelog_end
* No copyright header for samples
changelog_begin
changelog_end
* Move to SDK tools section
changelog_begin
changelog_end
* fix typo
fixes#6775
changelog_begin
changelog_end
* Update docs/source/daml/daml-studio.rst
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
Co-authored-by: Sofia Faro <sofia.faro@digitalasset.com>
* Print results in DAML REPL and support pure expressions
This extends DAML REPL to behave similar to GHCi in that it prints
results if the result is an instance of `Show` and it also supports
pure, non-script expressions now. We copy the same hack from GHCi and
typecheck multiple times. This doesn’t seem to have any noticeable
performance impact (which makes sense, the expressions are tiny and
the overhead of grpc is much much bigger).
Docs and tests are updated.
fixes#6780
changelog_begin
changelog_end
* windows is garbage
* but I fixed it \o/
* Rename getReplLogger to newReplLogger
changelog_begin
changelog_end
* Update existing docs, removing references to old time model
* Add detailed time model docs
* Rename ledger effective time to ledger time
CHANGELOG_BEGIN
CHANGELOG_END
* Add a --timeout option to `daml ledger` commands
At least in the compatibility tests, we see timeouts fairly regularly
in the tests for fetch-dar. If we see those timeouts in the tests, I
see no reason why our users should never see that especially on
actually distributed ledgers and hardcoded timeouts are a bad idea
anyway so now they are configurable.
I’ve also changed the timeout for the fetch tests (those are the only
once I’ve seen timeout) to 120s.
changelog_begin
- [DAML Assistant] The `daml ledger` commands now accept a `--timeout`
option which can be used to change the timeout for API requests from
the default of 30s.
changelog_end
* Generate parties as uuids to avoid collisions
changelog_begin
changelog_end
* Match on Deadline Exceeded as well
changelog_begin
changelog_end
* Update compatibility/bazel_tools/test_utils/DA/Test/Util.hs
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
* Update daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
* Add some docs
changelog_begin
changelog_end
* Better version checks
changelog_begin
changelog_end
* fix imports
changelog_begin
changelog_end
* This is not how you exception
changelog_begin
changelog_end
* Update daml-assistant/daml-helper/src/DA/Daml/Helper/Main.hs
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
This references the old assistant and the deprecated configuration
files. The positioning for Navigator right now (correct me if I'm wrong)
is that it's a development tool, so I don't think it makes a lot of
sense publicizing it otherwise.
Closes#3237
changelog_begin
changelog_end
* Add `platform-version` field to `daml.yaml`
This PR adds the `platform-version` field to `daml.yaml`. Based on the
approach agreed upon in #6558, the logic for this all sits in
`daml-helper` and there are no changes to the assistant.
The details of how the logic work are in a comment so I’m not going to
repeat them here but the commands that are affected are:
- `daml sandbox`
- `daml sandbox-classic`
- `daml json-api`
- `daml start` (but only for sandbox and the JSON API, not for
Navigator or anything else)
For tests, I’ve added a test to the compat workspace that installs two
SDKs simultaneously and tries out various combinations and verifies
that we get the correct version. Open to other ideas for testing this
but that seemed like the most sensible option that actually tests what
we run.
changelog_begin
- [DAML Assistant] You can now specify the version of Sandbox and the
JSON API independently of your SDK version by setting
``platform-version`` in your ``daml.yaml``. This is useful if you
are deploying to a ledger that is running components from a
different SDK version. See
https://docs.daml.com/tools/assistant.html#project-config-file-daml-yaml
for details.
changelog_end
* Run platform-version tests
changelog_begin
changelog_end
* Fix tag globbing
changelog_begin
changelog_end
* fmt
changelog_begin
changelog_end
* .
changelog_begin
changelog_end
* Try to fix env vars
changelog_begin
changelog_end
* Remove hardcoded references to 1.2.0
changelog_begin
changelog_end
* Rephrase doc comment
changelog_begin
changelog_end
* get things to compile
changelog_begin
changelog_end
* maybe fix things for realz
changelog_begin
changelog_end
* Remove debugging output
changelog_begin
changelog_end
* Get angry at windows
changelog_begin
changelog_end
* why is windows
changelog_begin
changelog_end
* .
changelog_begin
changelog_end