* Adding `domain.ArchivedContract`
* Adding `domain.Contract`
* Returning archived and active contracts from `/command/exercise`
Improving integration tests, asserting values in the response JSON
* Updating documentation
* Do not populate workflowId if it is not provided
set it to empty string (default), it is optional in the Ledger API
* Flattening results of the `/contracts/search`,
returning a `ActiveContract` instead of `GetActiveContractsResponse`
* Fixing the test,
it is an empty array instead of empty GetActiveContractResponse object
* Updating examples
* Updating release notes
* Update unreleased.rst
Accepting suggested changes
Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
* Resolving master merge conflicts
* verbatim move http-json docs to doc tree
* add json-api index to toc, convert md to rst
* better links
* sub-doc links, proper code inline
* replace headings according to README.md
* restore newlines
* one more newline
* point to rst docs from readme
* explain purpose of the JSON API and each endpoint
* daml-head not needed anymore, as in release
* oops 2 newlines
This should make `daml start` a bit more useful since you don’t have
to switch to starting all processes separately once you start
deviating from the defaults, e.g., I found myself wanting to specify a
custom ledger id during the hackathon. This is part 1 of ##2993.
The package compiled via daml migrate was missing the actual
Upgrade/Rollback templates. This is because we used `type` instead of
`template instance` to define those templates. Also, apparently we need
to export UpgradeInstance/RollbackInstance from DA.Upgrade in the
standard library.
* Improve UX of generic templates over Ledger API
Currently, if you write
```
template Template t => Proposal t with
receiver: Party
asset: t
where ...
template Iou with ...
template instance ProposalIou = Proposal Iou
```
you'll get the following DAML-LF types:
```
record Proposal t = { receiver : Party, asset : t }
record Iou = ...
record ProposalIou = { unpack : Proposal Iou }
```
The definition of `ProposalIou` is not particularly user friendly when used
over the Ledger API.
This PR changes the definition of `ProposalIou` to
```
record ProposalIou = { receiver : Party, asset : Iou }
```
Basically, the definition of `Proposal` is copied and `t` is instantiated
with `Iou`. This should make a much nicer UX.
* Update documentation
* Add test
* Fix docs examples
* Fix release notes
* Add some disclaimers about scenarios is Sandbox
* Something on errors
* Individual let bindings per line
* Update docs/source/daml/intro/5_Restrictions.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* filter out exception stack traces logged at debug
* Adding logback.xml for DAML Assistant release
* Fixing readme
* Fixing readme
* Use the config file in the assistant
* language: compile everything in the source directory
This removes the need to specify a 'main'. Instead we 'source' in
daml.yaml should point to the source root directory.
* language: use generic templates for upgrades
Instead of generating templates we now have generic upgrade/rollback
templates in the standart library and we just create instances of in the
migration project. I will update the documentation in a follow up PR.
Let's have the correct help text in the docu until we know what we do
about MANIFEST and know whether we can drop the SOURCE argument from the
command.
* language: docu: documentation for the migrate command of damlc
This adds a section on how to migrate between two different versions of
two packages.
* addressing martin's comments
* addressing bernhard's comments
* Ledger topologies: first draft
* Participant node definition
* Regroup headings
* Marcin's comments
* Second attempt after discussion with Brian H
* Change the topic order in the navigation sidebar
* Apply suggestions from code review
Co-Authored-By: Shaul Kfir <shaul-da@users.noreply.github.com>
* Shaul's/Bernhard's comments
* Clarify the interoperability statement
* Bernhard's comments
* language: append the version to the output dar name by default.
We now by default output foo-1.0.0.dar instead just foo.dar. Also the
maven coordinate default naming got removed.
* fixing integration tests and quickstart.dar occurences
This fixes all flakiness in `damlc test` that I was able to
reproduce. Previously, I got it to fail in about 10% of the cases
whereas now I have successfully run tests 200 times under load without
issues.
There were two issues at play here:
1. We run scenarios in separate threads to be able to kill the running
Shake session quickly even if a scenario has an infinite loop or
something like that (there is a timeout but it’s quite long). This
could result in one of those left-over threads trying to issue a
request while we are already trying to shut down.
To fix that, we wait for the concurrency semaphore to be empty before
shutting down.
2. Just waiting for scenario executions is not quite sufficient as
`runAction` does not wait for all rules to finish (we could just use
runActionSync in `damlc test` but I’d rather make this work
properly). While we do wait for all scenario executions to finish
there is one gRPC request in offInterest that we do not wait for:
gcCtxs.
To fix this, I’ve now routed all gRPC requests through the semaphore
which means that we will also wait for these requests to finish (or
prevent them from spawning).
This makes more sense anyway as scenario executions are mostly fairly
cheap requests while things like setting up the context are expensive
so we want to limit their concurrency.
We should make the concurrency limit configurable but I’ll leave that
for a separate PR.
* language: docs: added package import documentation
This adds a chapter on DAML archives and how to import them into other
projects to the documentation.
* Update docs/source/daml/reference/packages.rst
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* addressing comments
* removed random include in integration kit docu
* Cleanup
* WIP
* first integration test + fixture
* minor cleanup
* Implementing ContractService.lookup
* Reverting back to endpoints.all (all2 did not work)
* Cleanup
* replace ApiValue ADT with aliases to daml-lf/transaction Value ADT
* porting rest of navigator to LF Value ADT
* Command Service WIP
* CommandService WIP
* porting more of navigator to LF Value ADT
* last error, not first
* rename ApiValueImplicits file
* special conversion features for ImmArray and FrontStack
- just .to[ImmArray] or .to[FrontStack] any random collection
* finish porting most of navigator main code
* use numeric indices for record field name fallback when pretty-printing
* tuples are not serializable
* use numeric indices for label fallback in JSON verbose encoding
* make traverseEitherStrictly more likely to preserve the seq's class
* to shortcut for ImmArraySeq .to[ImmArraySeq]
* compiling, passing navigator backend tests
* test traverseEitherStrictly more, er, strictly
* pass scalacopts through to scaladoc
* deal with unused warning
* remove unneeded function
* simpler error reporting, more private functions in ApiCodecCompressed
* move slowApply to FrontStack, test it so it actually works
* remove unneeded toStrings; better error from impossible ValueTuple case
* scalafmt FrontStackSpec
* support alternative, label-free record JSON encoding
* Adding domain.CreateCommand + corresponding json formats and dummy json format for lav1.value.Record
* CommandService.create should be done... need to test it
* TODO added
* Cleanup
* move ApiCodecCompressed, ApiValueImplicits, and some aliases to new lf-value-json package
* Using tagged TemplateId type instead of Identifier + exercise command WIP
* adapt navigator to moved pieces
* start defining scalacheck extension to ApiCodecCompressedSpec
* CommandService.exercise + introducing CommandMeta
* Adding command endpoints, can't test them yet, need lf value json formats
* fuse some list operations
- suggested by @stefanobaghino-da; thanks
* blue error message
* Minor fixes after merging librify-navigator-json-compressed, #2136
* experiment with an inductive case in TypedValueGenerators
* finish a List case for TypedValueGenerators; it's revealing
* Introducing API value to LF value converter,
CommandsValidator takes IdentifierResolverLike instead of IdentifierResolver
* cleanup
* remove accidentally readded duplicate aliases
* start tying knots in TypedValueGenerators
* verbatim copy ApiCodecCompressedSpec to lf-value-json
* shift some tests from navigator to lf-value-json
* test Optional and Map for ApiCodecCompressed
* heavier random testing of ApiCodecCompressed
* remove unused dependencies from lf-value-json
* adding value json writer
* cleanup
* Revert "cleanup"
This reverts commit 2e4d153f
* fixing the build
* cleanup
* cleaning up imports
* JsValue to API value is done, needs a test
* cleanup
* use scalac -Ypartial-unification in http-json
* simplify some Traverse instances
* factor CreateCommand and ExerciseCommand traverse instances
* Command create integration test WIP
* Command create integration test WIP, got rid of the JsonReader and JsonWriter for the values, converting values explicitly
* Extracting DomainJsonDecoder and DomainJsonEncoder
* LfV refactoring
* Create command serialize/deserialize test works
* cleanup
* resolving conflicts
* More json encode/decode tests
* logging
* command/create passes integration test now
* Adding readme
* grammar
* TODO added
* GetActiveContractsResponse encoding
* ideintifier conversion renaming
* PackageService resolveTemplateId returns domain.TemplateId now
* Resolving LF Identifier instead of Template ID, this should also work for Exercise command decoding
* cleaning up a bit
* daml-lf: show type in TypedValueGenerators-driven errors
* exercise command json encoding/decoding works
* command/exercise IOU_Transfer integration test passes now
* avoid filter for Gens; makes many contract ID gens not fail
* test ApiCodecCompressed against 100 random types, 20 random values each
* Updating README instructions
* improving error handling, failed futures, get logged and reported to the user now as 500
* [ROUTING DSL] Removing routing DSL, it did not work
* getting rid of HttpEntity.Strict match + cleanup
* fixing the merge conflict
* updating README
* use Show.shows instead of new Show
* List(_) isn't checked, but Seq(_) is slightly safer
* improving test assertions
* Adding /contracts/lookup implementation
* http-json: use ImmArraySeq instead of List; use toRightDisjuction
* http-json: .toList.toSet is shorter than fold
* http-json: replace .leftMap.map with .bimap
* http-json: use subst instead of reimplementing JsonFormat
* http-json: remove unused ExceptionHandler
* http-json: safer == comparison
* Adding two test cases for expected errors
* Adding BazelRunfiles.rlocation magic that supposed to handle windows path for bazel dependencies
* http-json: import, not extend
* Fix typo in README.md and stale link in CONTRIBUTING.md
* Fix minor typos in quickstart
* Fix various minor typos/mistakes in DAML Intro
* Make DAML code in quickstart-java example cleaner
Also update module hash as well as screenshots in docs
The sourceRoot tag of the maven exec plugin isn't supported by the maven
integration in VS Code (which really is the eclipse stack).
Using the much more verbose build-helper-maven-plugin to make the
generated sources folder known to maven now makes the project properly
loadable by VS Code.
Fixes#887.
* document contract keys in the ledger model
* address small comments by Beth and Ognjen
* restructure key consistency and authorization
* address Ognjen's second round of comments
* Apply suggestions from code review
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* add a more meat to doc about enum types
* Update docs/source/app-dev/daml-lf-translation.rst
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* Move files in daml-foundations/daml-ghc to compiler/damlc
There is also a bit of refactoring going on to actually split things
apart into sensible targets. What is still missing is a cleanup of the
module hierarchy and a cleanup of the test targets but I’ll leave
those for separate PRs.
As a nice bonus, this also reduces dependencies between targets so it
will speed up compiles.
* Update .hie-bios
* Bazel: 0.24.0 -> 0.27.0
* Update rules_haskell for Bazel 0.27 compatibility
* Update bazel-deps and bazel-watcher
* Windows escape JVM flags
* load commands at top of .bzl file
Bazel 0.27 no longer allows load commands that are not at the beginning
of the file.
* Update Bazel rules
* subpackage boundary
* native is not defined in BUILD files
* yarn: @bazel/hide-bazel-files
Seems to be required since latest rules_nodejs version. Otherwise, yarn
fails with errors about existing BUILD or BUILD.bazel files.
* grpc-java plugin visibility
* Update fat_cc_library
* Nix Python3 toolchain
* Iteration over depset
* dev_env_package: Create symlinks one level deeper
To prevent symlinking the BUILD file as well. The nested BUILD file
confuses Bazel as of 0.27 and rules_nodejs cannot find the node
executable anymore.
* Update rules_nodejs
* Add managed_directories for node_modules
* hie-bios: Extract bazel-genfiles from bazel info
Bazel 0.27 changed the genfiles location which breaks the hie-core test
on macOS.
* update cc_wrapper to Bazel 0.27
* bazel info -> bazel info bazel-genfiles
* Fix typo in BUILD
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
* check that submitter is in maintainers when looking up keys
Fixes#1866. Note that this limitation applies both for `lookupByKey`
and `fetchByKey` -- anything involving retrieving a key is affected.
* add UNTIL-LF to run tests up to a certain version of DAML-LF
* name targets for DAML tests better
* add notes about DAML-LF changes
* commit Test.daml with DAML-LF 1.5 rather than compiling it on the fly
* add scenario tests for #1866
* add warnings about future key behavior in docs
* use flag rather than version when executing
Given that we already made the max message size configurable it only
seems reasonable to also make the timeout configurable and on very
large projects, we do sometimes hit this.
* Allow controlling the gRPC message limit via daml.yaml
We have had to raise that in the past since it caused issues on large
projects so it makes sense to make it configurable.
* Update unreleased.rst
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* adapting docs to match state as is regarding not supporting dalf files
* patching release notes instead
* validating for ZIP files in Cli parser
* guarding for parsing non zipped archives
* Update release-notes.rst
* Update unreleased.rst
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* Update unreleased.rst
* Update release-notes.rst
* Update release-notes.rst
* windows: root build
* windows: fixed haskell bindings tests
* windows: disable client_server_test test
* windows: marking daml_test flaky due to #1907
* windows: removing da-hs-damlc-app run from build.ps1
* windows: disable hie-core alias of currently disabled target
* Correct links and address wording changes from beth
* daml-integration-kit: clarify ledgers being built section
- drop separate Deployment Platform column, as it was confusing. Added
as references to managed offerings for partners that have them.
- use an intra-doc reference instead of a reference via docs.daml.com
for Sandbox docs
- reword intro for kit to position platform overview better
The main reason for doing a release is that I want to unblock
@bame-da’s upgrade of the bond trading example but there have also
been a few useful fixes and improvements.
* Update roadmap now we're three months in
* Edits after Neil discussion
* Remove comments
* Update docs/source/support/roadmap.rst
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Move unreleased user-facing features to its own file
docs/source/support/release-notes.rst unfortunately represents a "global
lock" when it comes to submitting contributions: if another contribution
changed it while another was going through the CI/review process, the
latter would have to go again through the CI build after resolving the
conflict and merging the resulting commit.
The contributors originally tried to address this problem by letting the
system automatically performing this operation, but this failed because
release notes were moved to the wrong section by mistake.
This simple change would allow the contributors to let the system take
care of merging on its own, because existing release notes will no
longer be corrupted by the process.
There is a caveat: the automatic merging could result in invalid RST
(mostly because of missing newlines). This would push the task of
ensuring the release notes are valid RST to the release. I would argue
this can be done quite easily and that this is checked automatically
when rendering RST to HTML, so it could be a nuisance during release but
it would make the day-to-day contributions easier.
* Address https://github.com/digital-asset/daml/pull/1762#issuecomment-503540993
* Address https://github.com/digital-asset/daml/pull/1762#pullrequestreview-251676158
* Address https://github.com/digital-asset/daml/pull/1762#discussion_r295279530
* Remove HEAD section from release-notes.rst
* Address https://github.com/digital-asset/daml/pull/1762#pullrequestreview-251678791
* Address https://github.com/digital-asset/daml/pull/1762#issuecomment-503549896
* Add --install-assistant option
* Better doc on iActivate
* Determine whether to install assistant based on new flag
* Fix logic and update install warning
* Remove --activate from install.sh
* Add missing ]
* Change deprecation warning.
* Add release notes for new option.
* Update help text for install-assistant
* Fix release notes
* store archive size in `DarReader`
* rename `SandboxTemplateStore` to `SandboxPackageStore`
* store package info in `SandboxPackageStore`
* introduce package upload / read to write / index services
not tested yet, just a ton of plumbing
* WIP test the package service
* Fix build errors after rebase
* Move packages service to v2
* Ledger API client uses ledger API types
* Fix ReflectionIT
* Correctly handle uploading invalid dar files
* Fix reading DAR entry file sizes
* Improve package management IT
* Improve handling of duplicate packages
* Fix language-support build
* Use unique party and command names
* Rename lfpackage to language
* Rename SandboxPackageStore to InMemoryPackageStore
* Remove getCurrentTime ledger method
* Improve package management IT
* Move InMemoryActiveContracts and InMemoryPackageStore
* Use case object for UploadDarResult.Ok
* Address review comments
* Update release notes
Fixes#1311
* Use BazelRunfiles in test
This fixes#1606 which was caused by the fact that VSCode does not
send a close notification if the webview is closed.
The logic here is still a giant mess and has a bunch of stuff leftover
from previous VSCode APIs but I’ll clean it up in a separate PR.
This fixes two issues with the sandbox database migration:
* A typo in the migration script
* Error deserializing transactions due to protobuf recursion limits
Fixes#1682
* Fixes#1737: Fix broken URL for releasing uploaded artefacts to Maven Central.
Additionally, skip opening and closing staging repositories if there are no
artefacts to be uploaded.
* Fixes#1725: Correct Maven credential variables in CI release script.
Update documentation that refered explicitly to the old version, to
use refer to new version.
* Adding docs for generating visual
* Just crappy
* Lines lengths do matter
* adapting changes from PR looking lot better now
* is # the title char ?
* Updating release notes
* Colons missing
* Needs to be in a tree. Ah trees
* Spaces
* Fixes#1204: Release bindings and codegens to Maven Central.
Upload the Java and Scala Bindings with the respective code
generator binaries to Sonatype Open Source Repository
Host for synchronization with Maven Central.
* Allow slashes in ledger strings
Using '/' as the divider is a natural choice for some ledger backend
implementations and in application/workflow etc. identifiers.
* Update value.proto to include slash in LedgerStrings
* Update release notes
This is a temporary fix to unblock users that have run into this
limit. The long-term solution here is to use compression and/or make
the limit configurable.
ImmArray, FrontStack, and BackStack violated the contract between equals
and hashCode. ImmArray had a wrong implementation of hashCode, and
FrontStack and BackStack had no implementation at all.
Fixes#1623.
Scale factor for time-to-live of commands sent for ledger processing
(captured as Maximum Record Time in submitted transactions) for
"SemanticTests" suite. Useful to tune Maximum Record Time depending on
the environment and the Ledger implementation under test. Defaults to
1.0. Use numbers higher than 1.0 to make timeouts more lax, use
numbers lower than 1.0 to make timeouts more strict.
* language-support/scala: add support for specifying roots explicitly
By default, code-gen will use all templates in the given package as roots, and
generate code for all types used. This patch adds the ability to specify roots
explicitly via a set of regex.es to match the (fully qualified) template names.
This is an experiment, tests and UI need to be adjusted later.
* scala codegen rootfilter: move filtering to envIFace handling
* doc for --root option
* scalafmt
* test filterTemplatesBy
* release note for --root Scala codegen option
* First stab at clarifying how we support community
* Mention email
* Rogue space
* Edits, add CoC
* Apply suggestions from code review
Co-Authored-By: Stefano Baghino <43749967+stefanobaghino-da@users.noreply.github.com>
Fixes#1312
This PR adds support for party management in the sandbox:
Both the in-memory and the SQL backend track a list of known
parties, and implicitly add any party mentioned in a transaction.
New calls were added to the IndexService and the WriteService
for managing parties. These calls are wired to the above mentioned
persistence backends, and to a new API service.
A corresponding client interface was added to the scala API client.
An integration test was added for checking that a call to allocate a
party succeeds.
An integration test for the sandbox was added for checking that the
sandbox implicitly adds all parties mentioned in a transaction.
Extra command line arguments to the client_server_test target are passed
to the ledger-api-test-tool instead of the arguments defined in the
bazel target.
For example:
`bazel run //ledger/sandbox:conformance-test-static-time --list` will
pass the --list parameter to the ledger-api-test-tool (to print all
available tests), instead of actually running the tests in static-time mode.
The Ledger API Test Tool takes the flag --all-tests to run all defaul
and optional tests
The tool also allows multiple occurrences of the --include and --exclude
flags.
Also removes StandaloneSemanticTestRunner.
Fixes#1371
Add tTansactionServiceIT into Ledger API Test Tool as an optional test.
Available tests can be listed with the --list option.
Tests can be included with --include, and excluded with --exclude.
Fixes#1372, #1472
50MiB is no longer hard-coded on extractor, navigator input for sandbox
or any other server, permitting large packages; e.g. pass
--ledger-api-inbound-message-size-max 62914560 to extractor or navigator
to get a 60MiB limit.
Fixes#1463.
* extractor: --ledger-api-inbound-message-size-max option replaces 50MiB hard-coded [package size] limit
* navigator: make inbound buffer size configurable in navigator backend
* _actually_ change the max inbound size, scalafmt
* release note for --ledger-api-inbound-message-size-max option
* another release note for --ledger-api-inbound-message-size-max option
* Improving logging, adding scala-logging, #1502
check-enabled calls were missing for a lot of trace calls.
scala-logging relies on macros, so string concatenation won't happen.
* Release notes
* added recovery logic when ledger entry persistence fails
* adding release notes
* logging only when the queues are closed due to an error
* using error instead of warn
* Drop support for DAML-LF 1.3 from damlc
This means `damlc` now only supports versions allowing arbitrary expressions
as contract keys. This is very helpful for the upcoming new template
de/re-sugaring underpinning generic templates.
* Unpin a few DAML-LF target versions in tests
* Fix golden tests
* Adapt changelog to rebase
* Rename DAML-LF scenario tests to 1.dev
* Update tests to --target 1.dev
* Fix release notes
* Add support for optional `--templates` configuration, #1352
template configs can be passed in the format:
`--templates <module1>:<entity1>,<module2>:<entity2>`
if no templates passed, use `Filters.defaultInstance`,
which means subscribe for all templates
* TemplateConfigs is a Set now
converting set to a sorted list, when validating previous startup params
so we have a deterministic order of template configs.
* Adding test case for template filtering and logging
Test fails: Template filtration is not supported on GetTransactionTrees
RPC. To get filtered data, use the GetTransactions RPC
Some refactoring will follow.
* Proper template ID filtering, more tests
have to convert Identifier to tuple
* Updating release notes.
* Replacing filter-map chain with collect
Because the record time was mapped to the ledger effective time field
when deserializing contracts from the SQL database, a subsequent
comparison between the LETs of two nodes in the same transaction caused
the transaction to be rejected.
Fixes#1435.
The extractor --party option may now specify multiple parties, separated
by commas; e.g. instead of --party Bob you can say --party Bob,Bar,Baz
and get the contracts for all three parties in the database.
Fixes#1353.
* refactor figuring the TransactionFilter to give to API
* replace ExtractorConfig#party with parties
* adjust remainder of extractor main code to handle multiple parties
* previous extractor tests pass
* factor dar production for extractor tests
* configureExtractor to change ExtractorConfig elements
* test that party-set extracts the inclusive union of visible contracts (and only that)
* release note for extractor multi-party support
* test faithfulness of --party splitting, including with spaces
* remove unused mixins from MultiPartySpec
* update --party's help text regarding multiple parties
* report malformed party errors at extractor cmdline option parse time
* Allow leading plus sign in parseInt/parseDecimal
This behaviour is in line with the newly added DAML-LF primitives
`FROM_TEXT_INT64` and `FROM_TEXT_DECIMAL`.
* Update release notes
* Allow leading plus in parseDecimal as well
* Freeze DAML-LF 1.dev into DAML-LF 1.5
In other words, we release DAML-LF 1.5.
This is required for generic templates (#1387).
* description of FROM_TEXT_INT64 & FROM_TEXT_DECIMAL
* amend version history
add ``FROM_TEXT_INT64`` and ``FROM_TEXT_DECIMAL`` in the specification changelog
* typos
* Fix markup in DAML-LF spec
* Add release notes
* Drop support for DAML-LF 1.1 from damlc
Part of #853.
* Fix docs test
* Add show party test back
* Update release notes
* Remove target version from Java codegen test
* List all available versions.
* Add --all flag in daml version
* Save version list to cache
* Update version cacheing logic.
* Linting error
* PR revisions.
* Update release notes.
* Update daml-assistant/src/DAML/Assistant/Version.hs
* Update docs/source/support/release-notes.rst
Co-Authored-By: Beth Aitman <bethaitman@users.noreply.github.com>
* Add windows version and defender note
* Update docs/source/getting-started/installation.rst
Co-Authored-By: Neil Mitchell <35463327+neil-da@users.noreply.github.com>
* If you write an invalid range annotation for a test, raise an error, rather than making something garbage up
* Make empty record with an error, just like in Haskell
* Update the release notes
Fixes#1250
The previous behavior when receiving a transaction filter without any
party was to reply with an empty stream. Since, given the current
situation, no data could ever be served for such request, it represents
a better feedback for the user to reject such requests as carrying an
`INVALID_ARGUMENT`.
* Release 0.12.18
We have accumulated quite a few fixes and improvements in the last
week so it’s time for another release.
* tidy up release notes
* mark breaking change as such
* add createAnd syntax to prepare CreateAndExercise commands from Scala codegen contracts
* open-style ExerciseOn typeclass
* GADT-style ExerciseOn works perfectly well, so let's go with that instead
* testing implicit conversion + ExerciseOn TC lookup
* use scalatest-style typesafe === to avoid Anys
* many more ExerciseOn tests
* support ExerciseOn polymorphism in Primitive.exercise
* generate ExerciseOn references in Scala codegen, permitting `createAnd` to combine with exercise* methods
* refactor testCreateContractAndReceiveEvent to support other commands
* compare create and createAnd's command generation behavior in a simple test
* bazel style
* test CreateAndExercise from Scala codegen against sandbox
* release note for Scala codegen create-and-exercise support
* Warn if there are any missing methods in type classes in DAML
Helps with #1194
* Make missing methods a fatal warning
* Update release-notes.rst
* Fix a test that had no signatories
* Update docs/source/support/release-notes.rst
Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
* Added agreement_text field to the CreatedEvent in Ledger API.
* Changed java bindings + java codegen
* Changed utilities for scala codegen
* Made necessary changes in Sandbox to propagate the agreement text from ContractInst to the CreatedEvent
* Made changes to the navigator to show the agreement text in the contract details page when it is set and not empty
Fixes#1110
The DAML Bintray repository is now accessible without
credentials. Therefore our users don't need to change their local
maven settings.xml file. Considering that this particular step has shown
to be somewhat a barrier or hurdle to overcome, I am removing the
instructions for the settings.xml setup, and adding a note to the java
bindings documentation about adding the repository to the project's
pom.xml file.
Fixes#1207.
* Store divulgence info for contracts
* Store divulgence info for contracts
* some documenting refactors
* Use fail instead of sys.error in test
* Add release note
* Rename migration files
* Fix typo
* Fix updating divulgence info in scenarios
The ACS was comparing differently formatted contract IDs.
Fixes#1166
This is not the perfect fix since the definition `data TextMap` is still
living in the wrong module, see issue #1142. However, this PR forces people
to import `DA.TextMap` when they want to use the `TextMap` type, which is
the desired behaviour for the future.
* Fixes 895: Improve DA Bazel rules for building javadocs.
Extend the da_java_library Bazel macro to also build the Javadoc for the
target. Add the Javadoc artefacts to the release procedure.
* Add a helper function to qualify things with respect to a module
* Supress some warnings I saw when building
* Move Tuple* and Either to daml-prim:DA.Types, so they have a nice name for Java users (instead of GHC.Tuple or DA.Internal.Prelude)
* Add copyright header
* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update daml-foundations/daml-ghc/daml-prim-src/DA/Types.daml
Co-Authored-By: Martin Huschenbett <martin.huschenbett@posteo.me>
* Update the daml-lf translation of tuple types
* Fix up the scala bindings for how to use types
* Clarify what action people need to take following the release notes
* Fix an expected test
* Clarify the changelogs even more
* Run ScalaFmt
* Clean up the release notes a bit
* Use the changelog from Beth
* Update the release notes again
* Update docs/source/support/release-notes.rst
Co-Authored-By: Gerolf Seitz <gerolf.seitz@digitalasset.com>
* Fix up the scenario error messages
* Remove ExercisedEvent in Event oneof.
The Event message is only used in the Transaction message. Flat
transactions do not contain exercised events, but only created and
archived events. Therefore we can remove the ExercisedEvent from the
Event oneof, without breaking transport compatibility.
HOWEVER: The Java Bindings used to use the data.Event class for both flat
transactions and transaction trees. To properly represent the actual
event types in the two transaction structures,
1) Event is now and interface and is only used in the Transaction class.
2) there is a new interface TreeEvent, which is used in the TransactionTree class.
* CreatedEvent implements Event and TreeEvent
* ExercisedEvent implements TreeEvent
* ArchivedEvent implements Event
Some "pathological" cases where an occurrence of an exercised event
would have resulted only in an exception, are now removed (see change in
LedgerApiV1.scala).
Fixes#960.
* Add a Compatibility alias for String, for people coming from Haskell
* Clean up the deprecated messages, no point saying which DAML version given its no longer interesting information
* Cleaning up release notes
* Finish cleaning up release notes
* use non-stupid link syntax
* And fix the note at the top too
* Correct DAML to DAML stdlib
* avoiding linear searching for transactions from genesis
* validating transaction ids
* one more failing test nailed down
* fixing off by 1 error
* docs + release notes
* fixing EventIdFormatterSpec
* fixing broken validation test
* Re-order fields in records if all labels are provided
Fixes#988
* Add line to release notes
* Fix line on release notes
* Document change on the Ledger API definition
* Simplify pattern matching
* Improve and fix tests
Integration tests now look for the "Missing field label" rather then the
"Mismatching record label" when inspecting errors. Furthermore, a test
has been added that ensures that repetitions in labels still raise an
error.
* Add comment
Comment about relationship between fields length check and fields reordering based on labels
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Improve Ledger API docstring
Explicitly state the semantics of labeled fields (i.e. repeated keys are not accepted)
Co-Authored-By: stefanobaghino-da <43749967+stefanobaghino-da@users.noreply.github.com>
* Add quickstart-scala IOU example, DAML Assistant template, #614
* Move all scala examples under language-support/scala/examples
* Removing target dirs which don't get excluded by the glob, #614
* record keys locally to a single update, fixes#969
* do not delete keys in machine for nonconsuming choices, fixes#973
* amend release notes
* actualize new test results
If a variant itself is not serializable, but the synthesized record for
one of its constructors is, then said record is returned by the
interface reader in the set of type declarations, when the variant type
itself is not.
When constructing the InterfaceTree in preparation of the codegen, we
previously rejected such a situation.
We now generate Java code for such a synthesized record, as it is a more
generally correct way of interpreting DAML LF (i.e. the DAML compiler
could decide tomorrow to create such multi-component record names for
regular records).
In any case, we consider this to be an edge case, as the synthesized
record for the variant constructor cannot be used directly either from
DAML or the Ledger API.
* Migration guide for new assistant
* Add some more words about the changes and start explaining config file.
* Flesh out migration of configs.
* Fix summary of changes.
* Fix formatting of list
* Tidying up migration guide
* Add Functor/Applicative/Action instances for reader monad
This is possible because we dropped DAML-LF 1.0 support from the
compiler lately.
* Add release notes
* Fix language-server-tests
* Deprecate DA.{Map, Set} in favour of DA.Next.{Map, Set}
`DA.Next.{Map, Set}` were known as `DA.Experimental.{Map, Set}` until now.
We also remove the tests for `DA.{Map, Set}` because our test infrastructure
can't nicely deal with tons of deprecation warning. Since we're not going to
change these files anymore, this seems to be a fair trade-off.
* Fix code spans in release notes
Submitting a command via the CommandService now returns either the
transaction id (SubmitAndWaitForTransactionId), the flat transaction
(SubmitAndWaitForTransactionResponse), or the transaction tree
(SubmitAndWaitForTransactionTreeResponse).
This means that users don't have to wade through the transaction stream
to retrieve the resulting transaction. This is particularly useful in
combination with #479.
Fixes#406
* clean up v3 contract key case in TransactionVersions
* clean up duplicate cases in ValueVersions.assignVersion
* make LanguageMinorVersion a proper ADT, aliased LanguageVersion.Minor
* port DecodeV1 to LanguageMinorVersion ADT via implicit conversion
- @remyhaemmerle-da might prefer the explicit application of Stable/Dev
* make releasePrecedes private
* add dev versions to the timeline
* copyright header for LanguageMinorVersion
* build the package database for 1.dev, support 1.dev as --target
* test presence and new-ness of "dev" in timeline
* report dev versions in engine info; note 1.dev target in release notes
* spec and governance rules on 1.dev and minor dev in general
* make the governance rule about dev more direct
* 1.x
* missed plural; thanks @leo-da
* further definition of 1.dev in LFv1 spec; thanks @remyhaemmerle-da
This change is needed in preparation of #406, where we want to return a
transaction tree and flat transaction after a SubmitAndWaitForTransaction(Tree).
* Drop DAML-LF 1.0 support from compiler
This will enable us to add `Functor`, `Applicative` and `Monad` instances
for `(->) r` in the `daml-stdlib`. We'll do this in a separate PR.
* Remove codegen test for DAML-LF 1.0
* remove outdated flags from comments
* update tests in preparation for visibility rules
* check visibility of contract keys, fixes#751
* add release notes
* include visibility check in scenario runner
* stephen's suggestions
* fix type error in api server example
* scalafmt
* bring TransactionFiltration.scala up to speed with disclosure
see
<faf1cde1a1/ledger-api/grpc-definitions/com/digitalasset/ledger/api/v1/event.proto>
for an in-depth description. fixes#794.
* add tests for contract key visibility
* move a lot of ledger testing utils out of command checks
* move a lot of ledger testing utils out of command checks
* remove useless checks regarding divulgence
* add tests regarding event witnesses
* update release notes
* re-introduce safety when disclosing
* hedging against possibly gaps in offsets
* doing the math right
* adding some notes
* extracting pipeline logic
Please enter the commit message for your changes. Lines starting
* extracting "run until" logic to be testable
* testing _run until_ logic
* adding release note
* copyright
* adding link to PR
* changing lookUpByTransactionId to use TransactionPipeline
* fixing issue identified by Extractor tests
* Rename DA.TextMap.filter into filterWithKey
`filterWithKey` reflects better that the predicate used for filtering
takes the key as an argument.
* Add filter back as deprecated and change DA.Map as well
* Adapt tests to renaming
Tested with a dry run:
Copying .../com_github_digital_asset_daml/bazel-out/k8-fastbuild/bin/ledger/api-server-damlonx/api-server-damlonx_src.jar
to .../com/daml/ledger/api-server-damlonx_2.12/100.12.11/api-server-damlonx_2.12-100.12.11-sources.jar
* release: make 'ci/release.sh' runnable for dry runs.
release-dry-run.sh is outdated and duplicates logic from ci/release.sh, so it
got deleted.
* ledger-api-test-tool: release the tool together with the SDK components.
* ledger-api-test-tool: update docs to reflect distribution mechanism.
* ledger-api-test-tool: further docs refinements.
* Add Ledger API Test Tool mention into release notes.
* docs: add structure for Ledger API Test Tool
* docs: ledger-api-test-tool: move docs to DAML docs.
* docs: dlik: add copyrights
* ledger-api-test-tool: improve docs
* ledger-api-test-tool: further docs refinements.
* ledger-api-test-tool: expose stacktraces of SemanticTester to the user.
Previously timeout errors would produce no useful output. This gives some -
albeit low quality - output to help pinpoing the issues. This needs improvement
for better UX.
* docs: dlik: summarize how to use the tool against a DAML ledger.
Add field 'usedPackages' to Transaction to record the packages
that were used during interpretation to produce said transaction.
This serves as a hint to specify what packages are required to
validate the transaction. Note that this may not be sufficient
for future implementations that e.g. compile DAML-LF to JVM
bytecode and require packages containing only type definitions
as inputs.
This hint is mainly required for ledger implementations for which the
packages are tracked similarly to contract instances, and which
require that all inputs to their transaction must be declared
beforehand.
This work is required for the participant-state key-value utilities
described in issue #410 and implemented in PR #637.
* removing major LF dev version from Haskell proto codecs
* removing major LF dev version from scenario service client
* missed import
* remove Scala support for dev major version; remove --allow-dev option from sandbox cli
* Version.minorFromCliOption function
* don't build daml-stdlib artifacts for dev major
* remove damlc CLI --target dev
* release note about removed dev major LF version
* governance now discusses minor dev, no more major dev
* don't build from daml_lf_dev.proto anymore
* remove daml_lf_dev.proto
* raise deprecated release
* reserve 9999 in the ArchivePayload sum, as suggested by @bitonic
* use reserved proto keyword, as suggested by @bitonic
- `reserved` cannot occur within `oneof` block
* remove --allow-dev test
* dev removal release note followed the previous release; move it back to HEAD
* Move application architecture guide
* Changing titles etc
* Reshuffling
* More reshuffling of files and content
* Refactoring iinto more sensible pages:
* Getting most stuff into place
* A ton of tidying up
* Fixing things up
* Tidying up
* Address review comments
* Fixes
* Fix warnings etc
* Update redirects
* Try to add copyright header
* Fix headers issue
* Clarify DAML-LF relationship
* Change I missed
The documentation is in a state that interested third-parties can
consume; and will likely find valuable to consume. It also contains a
description of the current status of the integration kit and the roadmap
outlining its expected evolution.
We have added links to GitHub issues where documentation is missing, or
where it refers to missing pieces of code.
* Navigator: Fix console documentation
Arguments have been using the JSON syntax for a while.
* Navigator: Output arguments in JSON format
... to allow copy-pasting them
* Add release notes entry
* Add CreateAndExercise command to Java Bindings data layer
* Add CreateAndExercise command to DAMLe
The CreateAndExerciseCommand allows users to create a contract and
exercise a choice on it within the same transaction. Users can use this
method to implement "callable update functions" by creating a template
that calls the update function in a choice body.
Fixes#382.
* Add CreateAndExercise command handling to the sandbox
* Add CreateAndExercise command to the Ledger API
* First versions of taylor series based power and log functions
* Improve precision by switching exp algo and shifting points
* Code comments for the math library
* Trig functions
* Update daml-foundations/daml-ghc/daml-stdlib-src/DA/Math.daml
Co-Authored-By: bame-da <40762178+bame-da@users.noreply.github.com>
* More efficient integer exponentiation
* Make Powerable the typeclass for (^) only.
* Move `(^)` to `Multiplicative` and fix package-database
* Round all Decimal literals to 10 digits
* Add release notes
* Update daml-foundations/daml-ghc/daml-stdlib-src/DA/Math.daml
Co-Authored-By: bame-da <40762178+bame-da@users.noreply.github.com>
* Add comment on performance
* Remove default definition for `(^)`
* Fix comments
* Fix scenario-error test
* Fix tests again
* Explain failure of `fetch` in StdLib docs
* Explain `fetch` failure in DAML Reference docs
* bump integration tests timeout further, still seems to be flaky
The call to blockingGet can lead to no progress being made in certain
scenarios. Therefore I am removing the blocking call and replacing it
with a regular "doOnSuccess".
The DAML-LF Archive Protobuf definitions, as packaged and distributed
via Bintray and the SDK, currently packages the files in a directory
structure that does not match with the actual one, causing the usage of
`protoc` on the packaged definitions to raise errors. This commit fixes
it by packaging the files in the same directory structure as the one
found in the repository.
* fix various conversion functions from string to Decimal
Fixes#399.
This fixes a critical bug -- since:
* The DAML-LF spec specifies that the scale of `Decimal` is 10 --
that is, there are at most 10 digits past the decimal point:
<79bbf5c794/daml-lf/spec/value.rst (field-decimal)>.
* However, the code converting from the string representation that
we get on the wire was _not_ performing this check. This is due
to two reasons:
- `Decimal.check` is a function that checks whether a given
`Decimal` is within the upper and lower bounds of what the
DAML-LF spec specifies, but crucially it does _not_ check that
the scale is not exceeded:
<79bbf5c794/daml-lf/data/src/main/scala/com/digitalasset/daml/lf/data/Decimal.scala (L31)>.
This behavior is correct in some cases (more on that later),
but not in others. Crucially, `Decimal.fromString`, which was
supposed to check if a decimal string literal is valid, used
this function, which means that it accepted string literals
containing numbers out of the required scale, rounding them to
make them fit within the scale. This function has been renamed
to `Decimal.checkWithinBoundsAndRound`, and a new function
`Decimal.checkWithinBoundsAndWithinScale` has been added, which
fails if the number provided has data not within the scale.
`Decimal.fromString` now uses
`Decimal.checkWithinBoundsAndWithinScale`.
- `ApiToLfEngine.parseDecimal` assumed that `Decimal.fromString` _did_
fail when passed numbers that were in any way invalid, and
moreover did _not_ use the result of `Decimal.fromString`, but rather
re-parsed the string into an unconstrained `BigDecimal`:
<79bbf5c794/ledger/ledger-api-common/src/main/scala/com/digitalasset/platform/participant/util/ApiToLfEngine.scala (L96)>.
The reason for the code to work this way is that in the past
it was responsible for converting decimal strings both for the
current engine but also for an older version of the engine which
handled decimals of a different type. Both issues have been fixed.
* Therefore, `Decimal`s with scale exceeding the specified scale
made it into the engine, and contracts could be created containing
this invalid value.
* Once on the ledger, these bad numbers can be used to produce extremely
surprising results, due to how `Decimal` operations are
implemented. Generally speaking, all operations on `Decimal`
first compute the result and then run the output through
`Decimal.checkWithinBoundsAndRound`. The reason for this behavior
is that we specify multiplication and division as rounding their
output. Consider the case where the bad value 0.00000000005 made
it to the engine, and is then added to 100. The full-precision
result will be 100.00000000005, which after rounding becomes 100.
Therefore, on a ledger where such invalid values exist, it is not
the case that `y > 0 ==> x + y != x`, and so on.
Thanks a bunch to @briandbecker for the excellent bug report.
* fix failing test using to much precision
* Add buildifier targets.
The tool allows to check and format BUILD files in the repo.
To check if files are well formatted, run:
bazel run //:buildifier
To fix badly-formatted files run:
bazel run //:buildifier-fix
* Cleanup dade-copyright-headers formatting.
* Fix dade-copyright-headers on files with just the copyright.
* Run buildifier automatically on CI via 'fmt.sh'.
* Reformat all BUILD files with buildifier.
Excludes autogenerated Bazel files.
* TransactionServiceIT passes
* fixup
* using record time taken from TimeProvider
* taming TransactionBackPressureIT to avoid overloading of submission service
* implement AutoClosable on all Ledger related components having stateful resources
* reenabling InMemory fixture
* disabling contract key integration test for SandboxSQL fixture
* removing TODO
* bumping up timeout on TransactionServiceIT due to slow Azure pipeline
* 1 minute timeout for SqlLedgerSpec
* making jdbcurl CLI argument hidden
* updating release notes