Commit Graph

1825 Commits

Author SHA1 Message Date
Remy
20649cf78e ledger-api: rename decimal field to numeric in value Proto (#2688)
* add Numeric.java

* ledger-api: rename `decimal` field to `numeric` in value protobuf

* Address Gerolf's comment

* ledger-api: add missing renammings

* ledger-api: relax syntax of numbers that can be sent as numerics

* extractor:  fix

* leger-api: change format of number though ledger api

* daml-lf: fix numeric regexp

* ledger: fix tests
2019-08-29 22:51:33 +00:00
Remy
d26dcd82eb leger-api-test-tool: semantics equality (#2707)
* engine: factorize value translation out of CommandPreprocessor

* ledger-api-test: add semantic equality for events

* engine: fix package resolution for ValueTranslator
2019-08-29 16:38:13 +00:00
Rohan Jacob-Rao
8dbc556655 Sketch of generic transfers and swaps (#2640)
* Templates and scenario for generic transfers

* Simplify transfer workflow by self-issuing cash

* Generic swap in the same style as Transferrable

* Use Template class constraints instead of *Instance constraints

* Shorter asset name for transferrable/swappable templates

* Shorten some stuff

* Simplify swap acceptance, remove dependency on transfers, add some checks in scenarios

* Remove FlexibleContexts extension which should be on by default

* Move Asset typeclass and Cash instance to separate module

* Rename Swap module to Swappable

* Revert change to VERSION file
2019-08-29 16:05:24 +00:00
Gary Verhaegen
97e289e548
make release step idempotent (#2705)
At the moment, if we try to run the build of a release commit after it
has succeeded, the `git tag` step fails. We do not normally try to
rebuild old commits that had succeeded, but sometimes Azure gets
confused when we ask for rerunning specific jobs within a build, and
reruns the whole build.

This creates two (small, bubt annoying) problems:
1. It adds noise to the #team-daml channel as it notifies of the build
failure, and
2. It marks the commit as failed with a red cross on the github list of
commits, which obviously doesn't look great for release commits.

This fixes that. Note that if a release does fail after the `git tag`
step (e.g. some network error between Azure and GitHub), this **does
not** change the necessary steps to remediate, as that situation would
already be broken in the current setup. (Steps to remediate would
essentially boil down to deleting the tag on GitHub before rerunning so
the build can create it again.)
2019-08-29 15:51:37 +01:00
Robert Autenrieth
74cc2056ae
Recover indexer from errors (#2582)
Adds a loop that restarts the indexer
with a delay any time it fails.
2019-08-29 15:06:05 +02:00
Robin Krom
d4919ad319 fixed messed up release notes (#2700) 2019-08-29 12:37:34 +00:00
Robin Krom
7fca591df0
replace main file with a pointer to the source root (#2687)
* 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.
2019-08-29 13:42:33 +02:00
Oliver Seeliger
8247624fd6
H2database: Limit writes to single connection, add daml-on-x compat test (#2698)
* Add h2 database daml-on-x reference2 server compat test

* Limit H2 database writes to be single-threaded
2019-08-29 13:37:24 +02:00
Moritz Kiefer
3cda28935b Refactor DAR manifest reader (#2699)
* Refactor DAR manifest reader

This PR replaces the ad hoc string munging by a proper parser.

* Fix tests

* Fix more tests

* Factor out isHeaderChar
2019-08-29 10:26:53 +00:00
Martin Huschenbett
c3f394e94f
Release DAML SDK 0.13.21 (#2693) 2019-08-29 10:56:44 +02:00
Oliver Seeliger
ed73c850cf
Release missing sources jars (#2683)
* Release missing sources jars

* Review feedback by Gerolf
2019-08-29 08:21:57 +02:00
Martin Huschenbett
901165092e Extend release readme with intructions for manual testing comment (#2691)
Add a step to the release process readme such that people leave a comment
like "All manual tests have passed" on the release PR.
2019-08-28 18:52:27 +00:00
Remy
aa852311a0 daml-lf: minor fix in the encoder (#2694) 2019-08-28 16:30:31 +00:00
Shayne Fletcher
1a1895b722 Upgrade ghc-lib (v8.8.1.20190828.1) (#2690) 2019-08-28 15:46:14 +00:00
Moritz Kiefer
96bc868261 Mark Haskell ledger bindings tests flaky on all platforms (#2692) 2019-08-28 15:37:12 +00:00
Moritz Kiefer
abfce20ce9
Fix damlc manifest writer (#2689)
Previously, we didn’t broke at 72 chars instead of 72 bytes and we did
not take the newline character into account.
2019-08-28 16:31:20 +02:00
Moritz Kiefer
664a633e20
Fix heap corruption in grpc-haskell-core (#2685)
The details are in the patch which I will also upstream.

fixes #2644
2019-08-28 16:21:37 +02:00
Remy
834ca8d7ae
engine: fix string to numeric conversions (#2681) 2019-08-28 16:20:06 +02:00
Martin Huschenbett
f85190abe7 Add --skip-jars to daml-sdk-head help text (#2686) 2019-08-28 13:01:23 +00:00
Martin Huschenbett
596058ac3f Allow boundedly polymorphic recursive functions without type annotation (#2684)
Currently, recursive top level functions whose type is boundedly polymorphic
require a type annotation to make it through the conversion to DAML-LF.

This PR changes the conversion slightly such that a type annotation is n o
longer required.

This fixes #2669.
2019-08-28 12:56:06 +00:00
associahedron
dce578bbea damlc: Add Numeric primitives and type-level nats. (#2670)
* Add Numeric primitives and type-level nats

* Statically enforce Numeric scale in serializability check
2019-08-28 12:30:33 +00:00
Oliver Seeliger
834a06a397
Ledger API Server H2 Database support (#2425)
* Ledger API Server H2 Database support (#2528)

* Disable parallel batch ledger append due to lack of H2DB isolation
2019-08-28 14:14:21 +02:00
Shayne Fletcher
12dee7fd64 Update ghc-lib (v8.8.1.20190828) (#2674) 2019-08-28 11:35:27 +00:00
Martin Huschenbett
25d1e2ce63
Fix the safety of the empty map in the DAML-LF simplifier (#2679)
Currently, we use `Safe 1` as the safety of the `BEMapEmpty` primitive. This
is clearly wrong since `BEMapEmtpy` is not supposed to be applied to a value
(but only to a type). Thus, it must be `Safe 0`. This has not caused any
problems in the past because the type checker would have caught any
application of `BEMapEmpty` to a value.
2019-08-28 13:20:31 +02:00
Moritz Kiefer
52101479d4
Shutdown IdeState in withDamlIdeState (#2680)
Noticed this while trying to debug the segfaults.

I don’t have a concrete case where this causes issues (usually we only
call this once on startup so leaks are not an issue) but we might as
well do it properly.
2019-08-28 13:02:39 +02:00
Martin Huschenbett
016b73b3de Enable MonoLocalBinds and FlexibleContexts by default in DAML (#2678)
Both language extension are needed to improve the UX of generic templates.
Without them templates a la
```
template Template (A t) => B t with
```
would produce an error that we need `FlexibleContexts` for the
`Template (A t)` context and a warning suggesting to simplify it to
`AInstance t`. The latter would expose an implementation detail we prefer
to hide.
2019-08-28 10:21:54 +00:00
Remy
5f98347a73 daml-lf: minor fix for encoder (#2675) 2019-08-28 08:36:29 +00:00
Shayne Fletcher
8bcf6bf568
Smoke tests for newly added dlint hints (#2672) 2019-08-27 15:09:52 -04:00
Anup Kalburgi
ff77b2e285 Correcting spelling mistakes (#2671) 2019-08-27 18:35:08 +00:00
Gary Verhaegen
126ac64bbf
daml-sdk-head also installs HEAD jars (#2652) 2019-08-27 18:08:52 +02:00
Shayne Fletcher
ddf1c178e3
Upgrade hlint (#2668) 2019-08-27 10:33:47 -04:00
associahedron
bd686aa6a0 damldocs: Rewrite class method extraction and fix handling of default methods. (#2667)
* Add test case for default method signature

* Fix default method docs

* lint

* Refactor ty calculation in getMethodDocs

* Add test for multiple names in one method type sig
2019-08-27 12:50:14 +00:00
Anup Kalburgi
09b766c502 Visual integration with LSP (#2597)
* daml visualize with lsp

* Working command execution with ide

* Have to call visual now

* Split function

* Wrong constuctions of world or the module

* Working almost

* Have to gather all modules

* Now works end to end. Considers all the daml files in workspace

* removing unused code

* removing unused dependency

* Removing unused JS code and better error message

* Function re-arrange

* Removing us of heaad, instead handling error

* Format and rearranging

* Removing unused assignment

* Formating everything

* missed dependency

* Generating visual only for the file that is open

* Using modules from generated pkg, error messages

* Bringing back the commands

* Names and formating

* consitent error message

* Removing Just pattern match using _use now

* package

* Moving visual to a different module

* Function simple

* Removing Rule as it increases memeory consumption

* TODO LSP error

* White space

* Fmt things

* Handling if command was executed for a non daml files

* Better error message

* debugging

* Fix executeCommand

* Adding tests to execute command. Thanks moritz

* Unwanted lines

* Spaces and comment

* 3rd time ?

* Spaces are white

* assert equal instead of assert bool
2019-08-26 15:47:29 +00:00
Remy
2c67aaee36 Speedy: make the compiler/engine ready for Nat types (#2653)
* engine: fix compiler for Numeric

* speedy: add test for nat

* Address Jussi's comments
2019-08-26 15:45:05 +00:00
Moritz Kiefer
d9a237eb76
Upgrade to gRPC 1.23.0 (#2661) 2019-08-26 16:00:41 +02:00
Robin Krom
c1e7f0ad61
language: use generic templates for upgrades (#2605)
* 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.
2019-08-26 15:30:47 +02:00
Remy
6a96060af1 daml-lf: udpate LF protobuf for numerics (#2649)
* daml-lf: update proto for Numerics

* daml-lf: test decoder

* daml-lf: update spec

* daml-lf: polish proto doc

* damlc: address reviewers' comments

* daml-lf: minor fix
2019-08-26 11:55:48 +00:00
associahedron
d9e42d9798 Robuster logic for --install-assistant=auto (#2656)
* Robuster logic for --install-assistant=auto

* Handle Windows correctly
2019-08-26 10:02:19 +00:00
Andreas Herrmann
c1623acfbb bazel-docs: Replace references to DACH-NY repo (#2655) 2019-08-26 08:50:11 +00:00
nickchapman-da
ea02814b34
hlb, remove dependency on DAML-LF libs (#2650)
* hlb, remove dependency on DAML-LF libs

* Update language-support/hs/bindings/src/DA/Ledger/Services/PackageService.hs

newtype instead of data

Co-Authored-By: Moritz Kiefer <moritz.kiefer@purelyfunctional.org>
2019-08-23 18:00:58 +01:00
Stefano Baghino
d79e03d42c
Ensure uniqueness of decoding and encoding methods (#2651)
Fixes #2367
2019-08-23 17:31:37 +02:00
Remy
9a4dff63b2
daml-lf: introduce Numeric in internal AST (#2608)
* daml-lf: introduce numeric in daml-lf AST
* daml-lf: add test for command preprocessor
* interface-reader: fix for Numerics
* Address Gerolf's review
2019-08-23 15:27:14 +02:00
Moritz Kiefer
67c2e2a9ef
Switch to upstream gRPC-haskell (#2642)
* Switch to upstream gRPC-haskell
2019-08-23 15:10:15 +02:00
Stefano Baghino
6d1d0b80c5
Port package management tests to new test tool (#2638)
* Port package management tests to new test tool

* Address https://github.com/digital-asset/daml/pull/2638#discussion_r317025106
2019-08-23 13:55:50 +02:00
Stefano Baghino
c6d1724bf9
Fix party management service test error output (#2639) 2019-08-23 13:06:37 +02:00
Andreas Herrmann
5481f85030 hie-core tests flaky (#2646)
Rerun up to three times. Previous attempt only changed the display name
not the actual command.
2019-08-23 08:42:29 +00:00
Gerolf Seitz
139afa4e59
Properly set connection pool properties (#2637) 2019-08-23 10:24:56 +02:00
Moritz Kiefer
0419e31f0c Mark doctest integration tests as flaky (#2645)
They fail a bit too often to not mark them flaky. I’ve opened
https://github.com/digital-asset/daml/issues/2644 to track this.
2019-08-23 07:57:10 +00:00
Moritz Kiefer
4b23d936e7 Fix curl on Windows (#2643)
The old URL has gone away. The definition is taken from upstream.
2019-08-23 07:48:48 +00:00
Remy
997212c8f4
daml-lf: decommission internal Decimal type in favor of Numeric. (#2594)
* daml-lf: ValueDecimal -> ValueNumeric
* Apply suggestions from Stephen's code review
   Co-Authored-By: Stephen Compall <stephen.compall@daml.com>
* extractor: add comment about Numeric SQL format
2019-08-22 18:07:47 +02:00