* Add RemoteApiProxy fixture type.
This is in preparation for using Sandbox IT suite as part of the Ledger API Test
Tool.
* ledger-api-test-tool: Drop reset functionality.
This is no longer necessary for the tool and it does not scale with the types of
tests in the suite.
* integration-tests: Fail if the server under fixture is stuck.
This makes sure that a server getting stuck will get detected by a test, instead
of ignoring it and potentially allowing the server to linger.
* integration-test: Make semantic testing runs independent.
It manges parties and command identifier to include a unique (random) suffix in
all ledger-commited identifiers. This allows the test to run against a Ledger
API without reseting it.
* ledger-api-test-tool: Unify test code using scenario runner with IT suite.
This reuses the scenario runner test code from the IT suite, instead of
reimplementing it. This should be a no-op (except for tests reports formatting).
* Review fixes.
* Ledger API Test Tool: Provide logback config.
This quites Ledger API Test Tool output.
* Make sure akka threads are terminated at end of test runs.
This makrs Akka threads to be daemons, hence forcing them to be closed at the
end of Ledger Api Test Tool.
* Use Ledger API Test Tool in tests of reference server.
* Add Apache commons-lang3.
* Ledger API Test Tool: Implement custom test reporter.
This addresses two needs:
- avoid using buggy scalatest test reporter;
- pretty-prints test results prettier.
* dade-copyright-headers: return success on successful reformatting.
* Back parseInt/parseDecimal by DAML-LF primitives when available
DAML-LF 1.5 introduces two new primitives `FROM_TEXT_INT64` and
`FROM_TEXT_DECIMAL`. We translate `parseInt` and `parseDecimal` to
these primitives when compiling to DAML-LF 1.5 or later.
This fixes#1398.
* Fix DAML-LF decoder (Scala)
* 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
I don't add tests since they will all become useless once we desugar the
surface syntax to the new type class representation. At this point all
existing tests will kick in.
This is part of #1387.
* 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
This was already possible before via the DAML_PROJECT environment
variable but for users that want to call damlc directly, e.g., via
damlc.jar a CLI flag can be more convenient.
* 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
* Isolate daml-on-x prototype
* Implement TransactionService of index api.
Towards the first milestone of the daml-on-x integration steps
* fix compiler error after last-minute refactoring
* formatting
* remove unnecessary dependency from api-server-damlonx
* Fix some inconsistencies.
This prevents binaries from including random logback configuration via library
dependencies.
Relevant binaries were found with:
bazel query --order_output=no --universe_scope='//...:*' \
'kind(".*(test|binary).*", allrdeps(//ledger/ledger-api-integration-tests:ledger-api-integration-tests-lib))'
These files were used to publish the `.proto` files on NPM so that the
dependency could be defined in the Node.js bindings package manifest.
These files are not longer used and can be safely removed from this
repository.
Instead of scattering the information regarding a single template across
multiple type class instances, we put it all into a single type class,
more precisley into its default method implementations.
This has the additional benefit that we can merge the `Creatable` class
into `Template` and `Exercisable` into `Choice` again.
The only potential downside of this approach is that we can call, say,
`signatory` on `Proposal t` only if there's an instance
`ProposalInstance t`. However, this might actually also be an upside.
This is part of #1387.
We want to verify that our approach works even when the generic template
definition and its instantiation live in different modules.
This is part of #1387.
Currently, we match on any class named `Template`. This PR changes it such
that we only matchon `Template` from `DA.Internal.Template`. Similarly for
`Choice` and `TemplateKey`.
Unfortunately, default method implementation names do not carry a module
name with them, this we need to continue matching on them unqualified.
This change is a preparation for #1387. We'll have two sets of type classes
for templates during the implementation phase of generic templates, although
the new set will be hidden from the documentation.
The current version in first-order abstract syntax style does not play well
with dictionary sanitization in the corner case of a type class which has
exactly on method and this method has a default implementation. As a side
effect we also eliminate a few lambdas in the generated code.
I've deliberatly removed the handling of forall coercions and coercion
applications since we don't have any code triggering them. I'll add them
back as soon as we find such code. In the meantime, I prefer not handling
these cases and blowing up loudly rather than silently doing something
which might be wrong.
This fixes#1379.
* ValuePrimitiveEncoding.Mapped, mixin for the "axiom" parts of mapped and xmapped
* remove ValuePrimitiveEncoding.mapped
- it was okay with 1 inductive case, but now there will be 4, so just
mixin Mapped instead
* mark members of ValuePrimitiveEncoding.Mapped final
- mixins are easier to get right if you mark everything final
* add Maps to random tests
* replace <: Template[A] with : TC in ValuePrimitiveEncoding#valueContractId
- no current subclass uses this context bound, but it may be useful for
encodings that wish to make ContractId encodings dependent on the type
parameter
* replace : TC with no bound in ValuePrimitiveEncoding#valueContractId
- fixes#1325
- can reintroduce : TC with #822
* stub test for generating with #1315's liberated contract IDs
- commented out because we still want to test codegen with stable LF
only
* undo useless changes
* ContractId#apply is unbounded
* ghc compiles generics
* more general kind conversion
* rename varKind to tyVarKind for clarity
* added a comment regarding a check for origin of Meta constructor in conversion
* added reference to original Generics.hs and git commit hash
* added copyright header
* fixing doc generation
* update dar reader test
* no PolyKinds in generics
* functional dependencies and small fixes
* convert MetaData, MetaSel, MetaCons types
The main purpose of this is to get rid of the `fetch` preceding each
`exercise`. This will work for DAML-LF 1.5 when it is frozen.
This finishes #1347.
* Make the actors optional in DAML-LF's exercise instruction
If they are not present, the controllers will be filled in. Surface DAML
does this currenty anyway by fetching the contract and computing the
choice controllers before each `exercise`. This change will allow for
getting rid of the additional `fetch` preceding each `exercise`.
The compiler does not use the new form yet. I will do this in a separate
PR together with tests for the new behaviour.
This fixes#1347.
* Fix DAML-LF type checker test
* Check presence of actors for old DAML-LF versions in decoder
This is a preparation for making the actors in DAML-LF's exercise
instruction optional (see #1347).
This is technically a breaking change but since `exerciseExplicit` has never
been exposed via the documentation, we don't add a release note.
* Rename Value's ContractId to VContractId
* daml-lf: a bit more about PartyId
* daml-lf: Concatenable MatchingStringModule
* daml-lf make clear type used for Scenarios only
* daml-lf create ContractId, LedgerId, TransactionId
* sandbox-sql conversion util
* LedgerName -> LedgerString
* futher type cleanup in the sandbox
* daml-lf add test for LedgerString
* fixing tests
* a bit more safety in the DB
* Address Stephen's comments
* fix rebase
* More fixes for StringModule
* change length of LedgerString (256 -> 255)
* webide: analytics
Because we don't control the html content of the actual web ide, we
won't integrate with the more common front end js for google analytics.
Instead we use server side communications.
* webide: add page to events
* Use closable Stream in Haskell ledger bindings
* move PastAndFuture abstraction into ledger interface code
* distinguish past/future transactions in return of Ledger.getTransactionsPF
* first cut: nim-console running against a ledger
* remove flaky failing 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>
Fixes#1306
The problem was caused by the following steps:
1. We first call setFilesOfInterest. However that does not block until
ofInterestRule finishes and subsequent calls to shakeRun will kill
the current run so we never reach the point where the scenario
context roots are updated.
2. We then call runScenarios before ever setting up the context roots
and throw an exception.
I disabled this in the past because the tests were to slow. They have gotten
quite a bit faster since then and I'm slowly getting scared by the fact we
don't do this right now. Also, it incentivices us to drop support for old
DAML-LF versions more frequently, which will most of the time also remove
complexity from the compiler.