Commit Graph

2359 Commits

Author SHA1 Message Date
Moritz Kiefer
5458053ea9 Add pending set to DAML triggers (#3502)
fixes #3360
2019-11-18 14:25:40 +00:00
associahedron
d654d7591b Improve Numeric type inference and safety by adding a scale constraint. (#3505)
* Add NumericScale typeclass

* Add release note
2019-11-18 13:53:17 +00:00
Moritz Kiefer
6a09ea7755
Support starting a DAML script from a JSON input value (#3490)
This uses the format for LF values that we already use elsewhere.

There is one annoying part in this PR where I had to duplicate the
logic for converting to the types used in the interface reader since
it is not exposed but hopefully we can get rid of this soon in a
separate PR.

fixes #3470
2019-11-18 14:42:14 +01:00
Gerolf Seitz
5f8bf411bd
Upload proto and deploy jars to maven (#3507)
* Add helper to produce an empty zip files.

This is used to generate empty sources and javadoc jars for
deploy jars later on.

* Create empty auxilliary jars.

da_java_binary:
  - empty javadoc jar
  - empty sources jar

da_java_proto_library:
  - empty javadoc jar
  - the sources jar is automatically generated by java_proto_library as a side effect

da_scala_binary:
  - empty javadoc jar
  - empty sources jar

* Support maven upload for jar-deploy and jar-proto

For jar-deploy targets we don't check for internal dependencies,
because these should already be contained in the (fat-)jar itself.

Additionally, the release program now uploads javadocs and sources
for jar-proto and jar-deploy as well to comply with maven central.

* Upload ledger-api-test-tool and kvutils + dependencies to maven central.

This is the diff running the output of the release without and with these changes.
A few artifacts now also get their javadoc and sources uploaded (mostly to bintray,
but now they are ready for a maven central upload).

ledger-api-test-tool has the scala version removed from the artifact as it is a
deploy jar and nobody should care which specific scala version is used.

Only in release/com/daml/ledger/participant-state-kvutils-java-proto/100.13.35: participant-state-kvutils-java-proto-100.13.35-javadoc.jar
Only in release/com/daml/ledger/participant-state-kvutils-java-proto/100.13.35: participant-state-kvutils-java-proto-100.13.35-sources.jar
Only in release/com/daml/ledger/testtool: ledger-api-test-tool
Only in release-before/com/daml/ledger/testtool: ledger-api-test-tool_2.12
Only in release/com/digitalasset/daml/lf/engine/trigger/runner_2.12/100.13.35: runner_2.12-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml/lf/engine/trigger/runner_2.12/100.13.35: runner_2.12-100.13.35-sources.jar
Only in release/com/digitalasset/daml-lf-blindinginfo-java-proto/100.13.35: daml-lf-blindinginfo-java-proto-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml-lf-blindinginfo-java-proto/100.13.35: daml-lf-blindinginfo-java-proto-100.13.35-sources.jar
Only in release/com/digitalasset/daml-lf-transaction-java-proto/100.13.35: daml-lf-transaction-java-proto-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml-lf-transaction-java-proto/100.13.35: daml-lf-transaction-java-proto-100.13.35-sources.jar
Only in release/com/digitalasset/daml-lf-value-java-proto/100.13.35: daml-lf-value-java-proto-100.13.35-javadoc.jar
Only in release/com/digitalasset/daml-lf-value-java-proto/100.13.35: daml-lf-value-java-proto-100.13.35-sources.jar
Only in release/com/digitalasset/damlc/100.13.35: damlc-100.13.35-javadoc.jar
Only in release/com/digitalasset/damlc/100.13.35: damlc-100.13.35-sources.jar
Only in release/com/digitalasset/extractor/100.13.35: extractor-100.13.35-javadoc.jar
Only in release/com/digitalasset/extractor/100.13.35: extractor-100.13.35-sources.jar
Only in release/com/digitalasset/ledger-service/http-json-deploy/100.13.35: http-json-deploy-100.13.35-javadoc.jar
Only in release/com/digitalasset/ledger-service/http-json-deploy/100.13.35: http-json-deploy-100.13.35-sources.jar
Only in release/com/digitalasset/navigator/100.13.35: navigator-100.13.35-javadoc.jar
Only in release/com/digitalasset/navigator/100.13.35: navigator-100.13.35-sources.jar
2019-11-18 14:40:15 +01:00
Andreas Herrmann
712bc456ba Map CommandIds in MTransaction (#3501)
* Regression test for #3485

* Respect CommandId mapping for transactions

* triggers: Fix ExerciseByKey

Make choice nonconsuming, so that no second `T` is created later.
Only execute `dedupExerciseByKey` if `T_` doesn't exist, yet.

* Update list-triggers test

* triggers: Empty commandId on foreign TransactionM

95ccc59b45 (r347287514)
2019-11-18 14:34:48 +01:00
Moritz Kiefer
1370ef3083 Upgrade ghcide and haskell-lsp (#3499) 2019-11-18 10:56:19 +00:00
Remy
43eb69cbbd DAML-LF: add GenMap tests for LF encoder (#3491)
* daml-lf: fix decoder

* daml-lf: extend testing dar for encoder

* add EOF to .lf files

* change 1.dev to 1.7 for java codegen encoding test

* formatting

* fixes
2019-11-18 10:07:13 +00:00
Martin Huschenbett
f1df336df0 Fix typo in docs for JSON API query language (#3497) 2019-11-18 08:15:05 +00:00
Martin Huschenbett
ab07b05fcb Clean up rules_daml (the bazel rules for DAML) (#3495)
There are rules that are used nowhere and seem like old cruft.
2019-11-18 08:12:47 +00:00
Brian Healey
92975551d7 individual scalatest in bazel md (#3494)
* individual scalatest in bazel md

Include instructions to run specific test in bazel

* second test_arg needed

* fix typo

* rewording and formatting
2019-11-18 02:34:40 +00:00
Martin Huschenbett
3f2f69224c Fix comment about Party type in DAML-LF Engine (#3496) 2019-11-17 12:20:42 +00:00
Remy
4bd98b6cbc DAML-LF: add GenMap in iface reader (#3487)
* daml-lf: add GenMap in iface reader

* remove useless code

* Update language-support/scala/codegen/src/main/scala/com/digitalasset/codegen/lf/LFUtil.scala

Co-Authored-By: Stephen Compall <stephen.compall@daml.com>

* please restart CI
2019-11-17 08:12:10 +00:00
Gary Verhaegen
e9e3f1bf5d add check for Standard-Change label (#3493) 2019-11-15 16:46:42 +00:00
Samir Talwar
c89d1b654e ledger-api-test-tool-on-canton: Disable tests unless run explicitly. (#3492) 2019-11-15 16:29:12 +00:00
Gary Verhaegen
8a024c549f release instructions: add label to PR (#3489) 2019-11-15 15:55:36 +00:00
Stefano Baghino
c0e4a50f1e Break up Ledger API Test Tool target to reduce average build time (#3486)
* Break up Ledger API Test Tool target to reduce average build time

* Address https://github.com/digital-asset/daml/pull/3486#discussion_r346836085

* Address https://github.com/digital-asset/daml/pull/3486#discussion_r346861509
2019-11-15 15:28:39 +00:00
Moritz Kiefer
e2cd2c1fc9 Move packaging tests to a separate test suite (#3484)
* Move packaging tests to a separate test suite

Originally, we had these as part of the integration test suite since
`bazel run damlc build` couldn’t locate `ghc-pkg` but that has been
fixed for a while.

Moving it to a separate test suite speeds things up as the integration
tests are rerun very often and also makes development much more
convenient since the new test suite supports `-p` properly to filter
to specific tests.

For now, I’ve left the upgrading tests as part of the integration
tests. I expect that we probably want to factor those out to another
test suite as well.

* fix warnings
2019-11-15 12:45:37 +00:00
Remy
0e92bc6f61
add genmap in scenario service (#3483) 2019-11-15 12:39:48 +01:00
Andreas Herrmann
c994703c0c Update rules_haskell (#3473)
* Update rules_haskell & rules_nixpkgs

* Define dadew POSIX toolchain on Windows

* Build hpp with stack and Cabal

* Replace Hazel hpp by @stackage hpp

* replace backslash by forward slash

* Cabal wrapper exclude bindist includes

* ghci-grpc patch fix missing argument

* Switch to rules_haskell master
2019-11-15 10:50:12 +00:00
Remy
4d36c01682 Daml lf genmap (#3453)
* shortcup for SBMapEmpty

* daml-lf: add GenMap in the interpreter.
2019-11-15 10:36:41 +00:00
Moritz Kiefer
64261c80d6 Fix race condition in LSP stress tests (#3482)
Previously we opened file FooX before FooX+1 which we import from FooX
so there is a race condition if we try to resolve imports in FooX fast
enough. Now we open them in reverse order to fix this.

The other option would be to write all files to disk before opening
them but given that we can easily avoid this here, I’d rather keep
things in memory.
2019-11-15 09:27:39 +00:00
Moritz Kiefer
0b784bba39
Newtype free applicatives/monads in DAML script (#3479)
This should hopefully prevent the horrifying implementation details
from leaking to users.
2019-11-15 09:32:45 +01:00
Moritz Kiefer
db1b12dbab Move packaging logic to a separate module (#3481)
It has grown large enough that by now it definitely deserves to be in
its own module.

This PR does not change any of the actual code, it simply moves it around.
2019-11-14 21:14:59 +00:00
Gerolf Seitz
e6651ccdc2 Re-release 0.13.35 as 0.13.36 (#3478) 2019-11-14 19:54:06 +00:00
Gerolf Seitz
efee9b5e44 Add sync points in flaky TransactinService tests (#3480)
Tests with multiple nodes need to introduce a synchronization
point to avoid flakiness.
2019-11-14 18:48:28 +00:00
Remy
79383bd090 fix InsertOrdMap (#3474)
* fix InsertOrdMap

* Address Samir first comment

* Address Samir second comment

* more tests
2019-11-14 18:06:47 +00:00
Gerolf Seitz
172ce90597
Upload codegen fat-jars to maven central (#3476) 2019-11-14 18:40:54 +01:00
Oliver Seeliger
583b683072 Split multi-subscription ledger api tests to local and distributed (#3475) 2019-11-14 17:12:38 +00:00
Moritz Kiefer
f746b9f6c0 Support wallclock time in DAML script (#3472)
fixes #3469
2019-11-14 16:25:15 +00:00
Remy
b7e2c17863
cleanup InsertOrdMap (#3466)
* cleanup InsertOrdMap
2019-11-14 16:27:21 +01:00
Oliver Seeliger
7744b886dd Release 0.13.35 (#3464) 2019-11-14 15:00:57 +00:00
Samir Talwar
d897b6b55a ledger-api-test-tool-on-canton: Upgrade Canton to v0.4.0. (#3468)
* ledger-api-test-tool-on-canton: Upgrade Canton to v0.4.0.

* workspace: Expose a Java library from the Canton external dependency.`

* workspace: Use double quotes for multiline strings too.
2019-11-14 14:55:38 +00:00
Moritz Kiefer
d1ce57398a
Cleanup conversions in DAML script and fix value translation (#3467)
This cleans up the remaining conversions in DAML script and fixes the
bug fixed in #3458 for DAML triggers by switching to the
ValueTranslator.
2019-11-14 15:30:46 +01:00
Robin Krom
cd1533b270 language: fix for tuple types in source generation (#3449)
* language: fix for tuple types in source generation

We correct the source generation from dalfs containing TupleN data
types. A test is added to the integration tests of daml assistant and
the `generate-src` command is improved to make this test possible.

* check that tuple type comes from DA.Types

* check that compilation succeeded

* pattern match golf

* check for tuples between 2 and 20
2019-11-14 13:46:07 +00:00
Samir Talwar
bd28808c1a
ledger: Remove redundant PostgreSQL dependencies. (#3465)
* Don't duplicate dependencies on `@postgresql_dev_env` binaries.

If you depend on `@postgresql_dev_env//:all`, you don't need anything
else.

* ledger-api-test-tool: Remove PostgreSQL dep from conformance tests.

It's already a dependency of the server.
2019-11-14 14:36:51 +01:00
Robin Krom
f2cc138204
language: reexport module in data dependencies (#3457)
This change allows to only import `module A` from the instances package
if data dependencies are present instead of  `module A` and `module
AInstances`.
2019-11-14 14:20:09 +01:00
Gerolf Seitz
e760d4749f Check internal dependencies of maven artifacts (#3454)
* Check internal dependencies of maven artifacts

All artifacts that are uploaded to maven need to also have
their dependencies uploaded to maven.

* inline tuple matching

* remove unnecessary parenthesis

* mark missing artifacts for maven upload
2019-11-14 14:18:54 +01:00
Moritz Kiefer
4eb72d496e
Fix conversion from Ledger API to Speedy in DAML triggers (#3458)
Previously, we use SValue.fromValue for the conversion. However, this
breaks in cases like Numeric where the scale information is lost. By
using the ValueTranslator instead, we avoid this issue.

There is a similar problem in DAML script but I’ll fix that in a
separate PR.

Since the ValueTranslator is package private, this PR moves the
triggers in the engine package.
2019-11-14 09:26:36 +01:00
Fabio Tudone
011cb0cdcb Fix build command typo in quickstart-scala's README.md (#3459) 2019-11-13 17:18:03 -05:00
Moritz Kiefer
f469f1e8f1
Cleanup conversions in DAML script submit (#3455)
* Cleanup conversions in DAML script submit

I’ll leave the other commands such as Query for a separate PR.
Part of this code can be shared with the DAML trigger runner but I’ll
also leave that for a separate PR

* Address review comments
2019-11-13 20:56:06 +01:00
Gary Verhaegen
07074a4759
remove Windows debug machine (#3451) 2019-11-13 18:33:15 +01:00
Samir Talwar
5b3dfc2614 reference-v2, sandbox: Add the dependency on PostgreSQL where required. (#3452)
And remove it from the tests, as they now pick it up from the binary.
2019-11-13 16:45:37 +00:00
Samir Talwar
c5d9d1014e
ledger-api-test-tool: Run tests on Canton, and fix a few issues. (#3446)
* ledger-api-test-tool-on-canton: Run Canton.

* ledger-api-test-tool-on-canton: Run the SemanticTests against Canton.

This was _so_ much work.

These will probably be flaky, so can't merge them in until we fix the
underlying issues with the tests around multi-participant allocation.

* ledger-api-test-tool: Wait for parties to arrive on all participants.

Thanks to Canton for exacerbating this bug.

Can't turn on all the tests on Canton yet as there are other spurious
failures. Will investigate next.

* ledger-api-test-tool: Move all contract key tests to ContractKeys.

If a ledger doesn't support ContractKeys, they need to be able to turn
these tests off.

* ledger-api-test-tool: If a test name is misspelled, fail immediately.

I keep getting names slightly wrong in the `--exclude` arguments and
wondering why it didn't work.

* client_server: Revert client_server_test.bzl.

Turns out I don't know what I'm doing. ¯\_(ツ)_/¯

* sandbox: Don't call `.toString` on an array. Doesn't do much.

* dev-env: Don't untar netcat automatically.

It needs to be installed with Pacman.
2019-11-13 17:27:28 +01:00
associahedron
87de36a7fe Add GenMap support in the compiler. (#3437)
* Add GenMap support in the compiler.

* Add GenMap ticket number in Upgrade.hs
2019-11-13 13:05:53 +00:00
Andreas Herrmann
9b9cce05d4 Mark ledger-api-integration-tests as flaky on Windows (#3442)
* Marke ledger-api-integration-tests as flaky

* More seldomly also flaky on Linux

* ledger-api-integration-tests separate flaky tests
2019-11-13 12:39:15 +00:00
Stefano Baghino
f55a044312 Remove font coloring (#3448) 2019-11-13 12:38:22 +00:00
Martin Huschenbett
00afadeed8
Remove a bunch of unused CLI option parsers from damlc (#3440) 2019-11-13 13:27:31 +01:00
Moritz Kiefer
0539e3e8d0
Prefetch nodejs_dev_env on Windows (#3447)
Maybe this helps ¯\_(ツ)_/¯
2019-11-13 12:47:07 +01:00
Moritz Kiefer
4ed90187bb Fetch grpc and protobuf Haskell libraries from Hackage (#3444)
* Fetch grpc and protobuf Haskell libraries from Hackage

All the changes that resulted in us fetching them from git, have been
included in the latest Hackage releases.

* Switch back to a custom build file for grpc-haskell-core

* Remove grpc-haskell-core from hazel packages
2019-11-13 11:19:01 +00:00
Moritz Kiefer
3fdc9f280c Clean trigger tracelog after each step (#3445)
Previously, we ended up accumulating trace messages which obviously is
not what you want. This PR changes this to replace the tracelog by a
new, empty TraceLog (if there actually was something to trace) and
thereby fixes this issue.

I don’t really want to start adding tests for logging output so for
now this doesn’t have a manual test but if this starts becoming a
problem again, we probably want to add a separate output source to the
trigger runner instead of going via the logger so we can test this easily.
2019-11-13 10:13:41 +00:00